diff --git a/.gitignore b/.gitignore index 50d797850..c5a5256b7 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ hs_err_pid*.log /libsrc/ffdec_lib/nbproject/private/ /libsrc/ffdec_lib/javadoc/ /libsrc/ffdec_lib/coverage/ +/libsrc/ffdec_lib/reports/ /libsrc/ffdec_lib/dist/ /libsrc/ffdec_lib/testdata/decompile/ /libsrc/ffdec_lib/testdata/recompile/ diff --git a/build.xml b/build.xml index 6e26a5682..10116c23a 100644 --- a/build.xml +++ b/build.xml @@ -2,8 +2,8 @@ Builds project FFDec - - + + @@ -11,6 +11,10 @@ + + + + @@ -55,5 +59,5 @@ - + diff --git a/build_common.xml b/build_common.xml index ff70fd1ff..065749bee 100644 --- a/build_common.xml +++ b/build_common.xml @@ -71,7 +71,7 @@ - + @@ -320,7 +320,16 @@ - + + + + + + + + + + diff --git a/lib/ffdec_lib.jar b/lib/ffdec_lib.jar new file mode 100644 index 000000000..a64b0677d Binary files /dev/null and b/lib/ffdec_lib.jar differ diff --git a/lib/ffdec_lib.license.txt b/lib/ffdec_lib.license.txt new file mode 100644 index 000000000..65c5ca88a --- /dev/null +++ b/lib/ffdec_lib.license.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/libsrc/ffdec_lib/build.xml b/libsrc/ffdec_lib/build.xml new file mode 100644 index 000000000..9ddce4e40 --- /dev/null +++ b/libsrc/ffdec_lib/build.xml @@ -0,0 +1,41 @@ + + + + Builds project FFDec Library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libsrc/ffdec_lib/build_common.xml b/libsrc/ffdec_lib/build_common.xml new file mode 100644 index 000000000..b43486160 --- /dev/null +++ b/libsrc/ffdec_lib/build_common.xml @@ -0,0 +1,224 @@ + + + Builds project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libsrc/ffdec_lib/license.txt b/libsrc/ffdec_lib/license.txt new file mode 100644 index 000000000..65c5ca88a --- /dev/null +++ b/libsrc/ffdec_lib/license.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/libsrc/ffdec_lib/nbproject/project.xml b/libsrc/ffdec_lib/nbproject/project.xml new file mode 100644 index 000000000..2f8b6af38 --- /dev/null +++ b/libsrc/ffdec_lib/nbproject/project.xml @@ -0,0 +1,102 @@ + + + org.netbeans.modules.ant.freeform + + + ffdec_lib + + + + ffdec_lib + + + + + . + UTF-8 + + + + java + src + UTF-8 + + + + java + test + UTF-8 + + + + + build + + + clean + + + javadoc + + + run + + + test + + + clean + build + + + + folder + build + build + + + + + + src + + + + test + + + build.xml + + + + + + + + + + + + + + + + src + ../../lib/LZMA.jar;../../lib/avi.jar;../../lib/flamingo-6.2.jar;../../lib/gif.jar;../../lib/gnujpdf.jar;../../lib/jargs.jar;../../lib/jl1.0.1.jar;../../lib/jna-3.5.1.jar;../../lib/jpacker.jar;../../lib/jpproxy.jar;../../lib/jsyntaxpane-0.9.5.jar;../../lib/nellymoser.jar;../../lib/sfntly.jar;../../lib/substance-6.2.jar;../../lib/substance-flamingo-6.2.jar;../../lib/trident-6.2.jar;../../lib/ttf.jar + build + 1.7 + + + test + + ../../lib/LZMA.jar;../../lib/avi.jar;../../lib/flamingo-6.2.jar;../../lib/gif.jar;../../lib/gnujpdf.jar;../../lib/jargs.jar;../../lib/jl1.0.1.jar;../../lib/jna-3.5.1.jar;../../lib/jpacker.jar;../../lib/jpproxy.jar;../../lib/jsyntaxpane-0.9.5.jar;../../lib/nellymoser.jar;../../lib/sfntly.jar;../../lib/substance-6.2.jar;../../lib/substance-flamingo-6.2.jar;../../lib/trident-6.2.jar;../../lib/ttf.jar;build/classes;testlib/emma.jar;testlib/emma_ant.jar;testlib/testng-6.8.jar + 1.7 + + + + diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java new file mode 100644 index 000000000..6fe661b92 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public interface AbortRetryIgnoreHandler { + + public static int UNDEFINED = -1; + public static int ABORT = 0; + public static int RETRY = 1; + public static int IGNORE = 2; + + public int handle(Throwable thrown); + + public AbortRetryIgnoreHandler getNewInstance(); +} diff --git a/src/com/jpexs/decompiler/flash/AppStrings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AppStrings.java similarity index 59% rename from src/com/jpexs/decompiler/flash/AppStrings.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AppStrings.java index 30f372bf9..944afce77 100644 --- a/src/com/jpexs/decompiler/flash/AppStrings.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/AppStrings.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.util.ResourceBundle; - -/** - * - * @author JPEXS - */ -public class AppStrings { - - private static Class resourceClass; - private static ResourceBundle resourceBundle; - - public static void setResourceClass(Class cls) { - resourceClass = cls; - updateLanguage(); - } - - public static String getResourcePath(Class cls) { - String name = cls.getName(); - if (name.startsWith("com.jpexs.decompiler.flash.gui.")) { - name = name.substring("com.jpexs.decompiler.flash.gui.".length()); - name = "com.jpexs.decompiler.flash.gui.locales." + name; - } - return name; - } - - public static String translate(String key) { - return resourceBundle.getString(key); - } - - public static String translate(String bundle, String key) { - ResourceBundle b = ResourceBundle.getBundle(bundle); - return b.getString(key); - } - - public static void updateLanguage() { - resourceBundle = ResourceBundle.getBundle(getResourcePath(resourceClass)); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.util.ResourceBundle; + +/** + * + * @author JPEXS + */ +public class AppStrings { + + private static Class resourceClass; + private static ResourceBundle resourceBundle; + + public static void setResourceClass(Class cls) { + resourceClass = cls; + updateLanguage(); + } + + public static String getResourcePath(Class cls) { + String name = cls.getName(); + if (name.startsWith("com.jpexs.decompiler.flash.gui.")) { + name = name.substring("com.jpexs.decompiler.flash.gui.".length()); + name = "com.jpexs.decompiler.flash.gui.locales." + name; + } + return name; + } + + public static String translate(String key) { + return resourceBundle.getString(key); + } + + public static String translate(String bundle, String key) { + ResourceBundle b = ResourceBundle.getBundle(bundle); + return b.getString(key); + } + + public static void updateLanguage() { + resourceBundle = ResourceBundle.getBundle(getResourcePath(resourceClass)); + } +} diff --git a/src/com/jpexs/decompiler/flash/ApplicationInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java similarity index 70% rename from src/com/jpexs/decompiler/flash/ApplicationInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java index d5f83598e..af221a2b1 100644 --- a/src/com/jpexs/decompiler/flash/ApplicationInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import java.io.IOException; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java new file mode 100644 index 000000000..3cc4e1a9f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public abstract class BaseLocalData { + +} diff --git a/src/com/jpexs/decompiler/flash/BinarySWFBundle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BinarySWFBundle.java similarity index 77% rename from src/com/jpexs/decompiler/flash/BinarySWFBundle.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BinarySWFBundle.java index 61b070df6..9358e101d 100644 --- a/src/com/jpexs/decompiler/flash/BinarySWFBundle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BinarySWFBundle.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.helpers.SwfHeaderStreamSearch; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DisassemblyListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DisassemblyListener.java new file mode 100644 index 000000000..c3f8a2d4d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DisassemblyListener.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public interface DisassemblyListener { + + public void progress(String phase, long pos, long total); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EndOfStreamException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EndOfStreamException.java new file mode 100644 index 000000000..1dd428d75 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EndOfStreamException.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public class EndOfStreamException extends RuntimeException { + + public EndOfStreamException() { + super("Premature end of the stream reached"); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EventListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EventListener.java new file mode 100644 index 000000000..ac343b28b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/EventListener.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public interface EventListener { + + public void handleEvent(String event, Object data); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java new file mode 100644 index 000000000..007809374 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.util.HashSet; + +/** + * + * @author JPEXS + */ +public class FinalProcessLocalData { + + public final HashSet temporaryRegisters; + + public FinalProcessLocalData() { + temporaryRegisters = new HashSet<>(); + } +} diff --git a/src/com/jpexs/decompiler/flash/RetryTask.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RetryTask.java similarity index 56% rename from src/com/jpexs/decompiler/flash/RetryTask.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RetryTask.java index 2350ad225..81496bd1e 100644 --- a/src/com/jpexs/decompiler/flash/RetryTask.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RetryTask.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public class RetryTask { - - private final RunnableIOEx r; - private final AbortRetryIgnoreHandler handler; - public Object result; - - public RetryTask(RunnableIOEx r, AbortRetryIgnoreHandler handler) { - this.r = r; - this.handler = handler; - } - - public void run() throws IOException { - boolean retry; - do { - retry = false; - try { - r.run(); - } catch (Exception ex) { - switch (handler.handle(ex)) { - case AbortRetryIgnoreHandler.ABORT: - throw ex; - case AbortRetryIgnoreHandler.RETRY: - retry = true; - break; - case AbortRetryIgnoreHandler.IGNORE: - break; - } - } - } while (retry); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public class RetryTask { + + private final RunnableIOEx r; + private final AbortRetryIgnoreHandler handler; + public Object result; + + public RetryTask(RunnableIOEx r, AbortRetryIgnoreHandler handler) { + this.r = r; + this.handler = handler; + } + + public void run() throws IOException { + boolean retry; + do { + retry = false; + try { + r.run(); + } catch (Exception ex) { + switch (handler.handle(ex)) { + case AbortRetryIgnoreHandler.ABORT: + throw ex; + case AbortRetryIgnoreHandler.RETRY: + retry = true; + break; + case AbortRetryIgnoreHandler.IGNORE: + break; + } + } + } while (retry); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOEx.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOEx.java new file mode 100644 index 000000000..6597703d9 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOEx.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public interface RunnableIOEx { + + public void run() throws IOException; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java new file mode 100644 index 000000000..c24899a3b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @param + * @author JPEXS + */ +public abstract class RunnableIOExResult implements RunnableIOEx { + + public T result; +} diff --git a/src/com/jpexs/decompiler/flash/SWC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java similarity index 77% rename from src/com/jpexs/decompiler/flash/SWC.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java index 04a327b7a..ad88984d1 100644 --- a/src/com/jpexs/decompiler/flash/SWC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java @@ -1,79 +1,78 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.io.IOException; -import java.io.InputStream; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -/** - * - * @author JPEXS - */ -public class SWC extends ZippedSWFBundle { - - public SWC(InputStream is) throws IOException { - super(is); - keySet.clear(); - this.is.reset(); - ZipInputStream zip = new ZipInputStream(this.is); - ZipEntry entry; - try { - while ((entry = zip.getNextEntry()) != null) { - if (entry.getName().equals("catalog.xml")) { - try { - SAXParserFactory factory = SAXParserFactory.newInstance(); - SAXParser saxParser = factory.newSAXParser(); - DefaultHandler handler = new DefaultHandler() { - - @Override - public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { - if (qName.equalsIgnoreCase("library")) { - String path = attributes.getValue("path"); - if (path != null) { - keySet.add(path); - } - } - } - - }; - saxParser.parse(zip, handler); - } catch (Exception ex) { - - } - return; - } - } - } catch (IOException ex) { - Logger.getLogger(ZippedSWFBundle.class.getName()).log(Level.SEVERE, null, ex); - } - } - - @Override - public String getExtension() { - return "swc"; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/** + * + * @author JPEXS + */ +public class SWC extends ZippedSWFBundle { + + public SWC(InputStream is) throws IOException { + super(is); + keySet.clear(); + this.is.reset(); + ZipInputStream zip = new ZipInputStream(this.is); + ZipEntry entry; + try { + while ((entry = zip.getNextEntry()) != null) { + if (entry.getName().equals("catalog.xml")) { + try { + SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParser saxParser = factory.newSAXParser(); + DefaultHandler handler = new DefaultHandler() { + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + if (qName.equalsIgnoreCase("library")) { + String path = attributes.getValue("path"); + if (path != null) { + keySet.add(path); + } + } + } + + }; + saxParser.parse(zip, handler); + } catch (Exception ex) { + + } + return; + } + } + } catch (IOException ex) { + Logger.getLogger(ZippedSWFBundle.class.getName()).log(Level.SEVERE, null, ex); + } + } + + @Override + public String getExtension() { + return "swc"; + } + +} diff --git a/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java similarity index 99% rename from src/com/jpexs/decompiler/flash/SWF.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 4d8a9a1af..522ddc408 100644 --- a/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import SevenZip.Compression.LZMA.Decoder; diff --git a/src/com/jpexs/decompiler/flash/SWFBundle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFBundle.java similarity index 50% rename from src/com/jpexs/decompiler/flash/SWFBundle.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFBundle.java index 769dfae07..961d9b096 100644 --- a/src/com/jpexs/decompiler/flash/SWFBundle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFBundle.java @@ -1,39 +1,38 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import com.jpexs.helpers.streams.SeekableInputStream; -import java.io.IOException; -import java.util.Map; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public interface SWFBundle { - - public int length(); - - public Set getKeys(); - - public SeekableInputStream getSWF(String key) throws IOException; - - public Map getAll() throws IOException; - - public String getExtension(); -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import com.jpexs.helpers.streams.SeekableInputStream; +import java.io.IOException; +import java.util.Map; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public interface SWFBundle { + + public int length(); + + public Set getKeys(); + + public SeekableInputStream getSWF(String key) throws IOException; + + public Map getAll() throws IOException; + + public String getExtension(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFCompression.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFCompression.java new file mode 100644 index 000000000..5217fdeb5 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFCompression.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public enum SWFCompression { + + NONE, ZLIB, LZMA +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java new file mode 100644 index 000000000..c62c3cb00 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public class SWFHeader { + + /** + * Version of SWF + */ + public int version; + + /** + * Uncompressed size of the file + */ + public long fileSize; + + /** + * Used compression mode + */ + public SWFCompression compression = SWFCompression.NONE; + + /** + * LZMA properties + */ + public byte[] lzmaProperties; + + /** + * ScaleForm GFx + */ + public boolean gfx = false; + +} diff --git a/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java similarity index 99% rename from src/com/jpexs/decompiler/flash/SWFInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index a5045f1f9..f32206885 100644 --- a/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java similarity index 98% rename from src/com/jpexs/decompiler/flash/SWFOutputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java index a8d3ffd52..00ee20d22 100644 --- a/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.tags.DefineBitsLosslessTag; diff --git a/src/com/jpexs/decompiler/flash/SWFSearch.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java similarity index 89% rename from src/com/jpexs/decompiler/flash/SWFSearch.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java index 37db1180b..93d6a6fc0 100644 --- a/src/com/jpexs/decompiler/flash/SWFSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.helpers.Helper; diff --git a/src/com/jpexs/decompiler/flash/SWFSourceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java similarity index 72% rename from src/com/jpexs/decompiler/flash/SWFSourceInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java index 948f29282..77eefc1f5 100644 --- a/src/com/jpexs/decompiler/flash/SWFSourceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSourceInfo.java @@ -1,95 +1,94 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import com.jpexs.helpers.Path; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public class SWFSourceInfo { - - private final InputStream inputStream; - private final String file; - private final String fileTitle; - - public SWFSourceInfo(InputStream inputStream, String file, String fileTitle) { - this.inputStream = inputStream; - this.file = file; - this.fileTitle = fileTitle; - } - - public InputStream getInputStream() { - return inputStream; - } - - public String getFile() { - return file; - } - - public String getFileTitle() { - return fileTitle; - } - - /** - * Get title of the file - * - * @return file title - */ - public String getFileTitleOrName() { - if (fileTitle != null) { - return fileTitle; - } - return file; - } - - public boolean isBundle() { - if (inputStream == null) { - File fileObj = new File(file); - String fileName = fileObj.getName(); - if (fileName.startsWith("asdec_") && fileName.endsWith(".tmp")) { - return false; - } - String extension = Path.getExtension(fileObj); - return !(extension.equals(".swf") || extension.equals(".gfx")); - } - return false; - } - - public SWFBundle getBundle(boolean noCheck, SearchMode searchMode) throws IOException { - if (!isBundle()) { - return null; - } - - String extension = Path.getExtension(new File(file)); - InputStream is = new BufferedInputStream(new FileInputStream(file)); - switch (extension) { - case ".swc": - return new SWC(is); - case ".zip": - return new ZippedSWFBundle(is); - default: - return new BinarySWFBundle(is, noCheck, searchMode); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import com.jpexs.helpers.Path; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public class SWFSourceInfo { + + private final InputStream inputStream; + private final String file; + private final String fileTitle; + + public SWFSourceInfo(InputStream inputStream, String file, String fileTitle) { + this.inputStream = inputStream; + this.file = file; + this.fileTitle = fileTitle; + } + + public InputStream getInputStream() { + return inputStream; + } + + public String getFile() { + return file; + } + + public String getFileTitle() { + return fileTitle; + } + + /** + * Get title of the file + * + * @return file title + */ + public String getFileTitleOrName() { + if (fileTitle != null) { + return fileTitle; + } + return file; + } + + public boolean isBundle() { + if (inputStream == null) { + File fileObj = new File(file); + String fileName = fileObj.getName(); + if (fileName.startsWith("asdec_") && fileName.endsWith(".tmp")) { + return false; + } + String extension = Path.getExtension(fileObj); + return !(extension.equals(".swf") || extension.equals(".gfx")); + } + return false; + } + + public SWFBundle getBundle(boolean noCheck, SearchMode searchMode) throws IOException { + if (!isBundle()) { + return null; + } + + String extension = Path.getExtension(new File(file)); + InputStream is = new BufferedInputStream(new FileInputStream(file)); + switch (extension) { + case ".swc": + return new SWC(is); + case ".zip": + return new ZippedSWFBundle(is); + default: + return new BinarySWFBundle(is, noCheck, searchMode); + } + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SearchMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SearchMode.java new file mode 100644 index 000000000..303e9d17b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SearchMode.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public enum SearchMode { + + ALL, BIGGEST, SMALLEST, FIRST, LAST +} diff --git a/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java similarity index 71% rename from src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java index d33aa8070..414458a42 100644 --- a/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.types.ABCException; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java new file mode 100644 index 000000000..c3b64ed8b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/Version.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * @author JPEXS + */ +public class Version { + + public int versionId; + public String revision; + public String versionName; + public String longVersionName; + public String releaseDate; + public String appName; + public String appFullName; + public String updateLink; + public boolean nightly; + public Map> changes = new HashMap<>(); +} diff --git a/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java similarity index 83% rename from src/com/jpexs/decompiler/flash/ZippedSWFBundle.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java index a810e20eb..b76ac20a7 100644 --- a/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.helpers.Helper; diff --git a/src/com/jpexs/decompiler/flash/abc/ABC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java similarity index 98% rename from src/com/jpexs/decompiler/flash/abc/ABC.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java index 0cca2173e..f7b1a87b2 100644 --- a/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc; import com.jpexs.decompiler.flash.EventListener; diff --git a/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java similarity index 95% rename from src/com/jpexs/decompiler/flash/abc/ABCInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java index 89742c8c6..52a37cc9f 100644 --- a/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc; import com.jpexs.decompiler.flash.abc.types.Decimal; diff --git a/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java similarity index 89% rename from src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index 10af35cc9..576d162ea 100644 --- a/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -1,286 +1,285 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -import com.jpexs.decompiler.flash.abc.types.Decimal; -import com.jpexs.decompiler.flash.abc.types.InstanceInfo; -import com.jpexs.decompiler.flash.abc.types.MethodInfo; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.abc.types.Namespace; -import com.jpexs.decompiler.flash.abc.types.traits.Trait; -import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; -import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; -import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; -import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; -import com.jpexs.decompiler.flash.abc.types.traits.Traits; -import com.jpexs.helpers.utf8.Utf8Helper; -import java.io.IOException; -import java.io.OutputStream; - -public class ABCOutputStream extends OutputStream { - - private final OutputStream os; - - public ABCOutputStream(OutputStream os) { - this.os = os; - } - - @Override - public void write(int b) throws IOException { - os.write(b); - } - - public void writeU30(long value) throws IOException { - writeS32(value); - /*boolean loop = true; - boolean underZero=value<0; - - if(underZero){ - value = value & 0xFFFFFFFF; - }else{ - value = value & 0x7FFFFFFF; - } - do { - int ret = (int) (value & 0x7F); - if (value < 0x80) { - loop = false; - } - if (value > 0x7F) { - ret += 0x80; - } - write(ret); - value = value >> 7; - } while (loop); - */ - } - - public void writeU32(long value) throws IOException { - boolean loop = true; - value &= 0xFFFFFFFF; - do { - int ret = (int) (value & 0x7F); - if (value < 0x80) { - loop = false; - } - if (value > 0x7F) { - ret += 0x80; - } - write(ret); - value >>= 7; - } while (loop); - } - - public void writeS24(long value) throws IOException { - int ret = (int) (value & 0xff); - write(ret); - value >>= 8; - ret = (int) (value & 0xff); - write(ret); - value >>= 8; - ret = (int) (value & 0xff); - write(ret); - } - - public void writeS32(long value) throws IOException { - boolean belowZero = value < 0; - /*if (belowZero) { - value = -value; - }*/ - int bitcount = 0; - boolean loop = true; - //value = value & 0xFFFFFFFF; - do { - bitcount += 7; - int ret = (int) (value & 0x7F); - if (value < 0x80) { - if (belowZero) { //&& bitcount < 35 - ret += 0x80; - } else { - loop = false; - } - } else { - ret += 0x80; - } - - if (bitcount == 35) { - ret &= 0xf; - } - write(ret); - if (bitcount == 35) { - break; - } - value >>= 7; - } while (loop); - } - - public void writeLong(long value) throws IOException { - byte[] writeBuffer = new byte[8]; - writeBuffer[7] = (byte) (value >>> 56); - writeBuffer[6] = (byte) (value >>> 48); - writeBuffer[5] = (byte) (value >>> 40); - writeBuffer[4] = (byte) (value >>> 32); - writeBuffer[3] = (byte) (value >>> 24); - writeBuffer[2] = (byte) (value >>> 16); - writeBuffer[1] = (byte) (value >>> 8); - writeBuffer[0] = (byte) (value); - write(writeBuffer); - } - - public void writeDouble(double value) throws IOException { - writeLong(Double.doubleToLongBits(value)); - } - - public void writeU8(int value) throws IOException { - write(value); - } - - public void writeU16(int value) throws IOException { - write(value & 0xff); - write((value >> 8) & 0xff); - } - - public void writeString(String s) throws IOException { - byte[] sbytes = Utf8Helper.getBytes(s); - writeU30(sbytes.length); - write(sbytes); - } - - public void writeNamespace(Namespace ns) throws IOException { - write(ns.kind); - boolean found = false; - for (int k = 0; k < Namespace.nameSpaceKinds.length; k++) { - if (Namespace.nameSpaceKinds[k] == ns.kind) { - writeU30(ns.name_index); - found = true; - break; - } - } - if (!found) { - throw new RuntimeException("Invalid ns kind:" + ns.kind); - } - } - - public void writeMultiname(Multiname m) throws IOException { - writeU8(m.kind); - if ((m.kind == 7) || (m.kind == 0xd)) { // CONSTANT_QName and CONSTANT_QNameA. - writeU30(m.namespace_index); - writeU30(m.name_index); - } - if ((m.kind == 9) || (m.kind == 0xe)) { // CONSTANT_Multiname and CONSTANT_MultinameA. - writeU30(m.name_index); - writeU30(m.namespace_set_index); - } - if ((m.kind == 0xf) || (m.kind == 0x10)) { //CONSTANT_RTQName and CONSTANT_RTQNameA - writeU30(m.name_index); - } - if ((m.kind == 0x1B) || (m.kind == 0x1C)) { //CONSTANT_MultinameL and CONSTANT_MultinameLA - writeU30(m.namespace_set_index); - } - if (m.kind == 0x1D) { - writeU30(m.qname_index); - writeU30(m.params.size()); - for (int i = 0; i < m.params.size(); i++) { - writeU30(m.params.get(i)); - } - } - //kind==0x11,0x12 nothing CONSTANT_RTQNameL and CONSTANT_RTQNameLA. - } - - public void writeMethodInfo(MethodInfo mi) throws IOException { - writeU30(mi.param_types.length); - writeU30(mi.ret_type); - for (int i = 0; i < mi.param_types.length; i++) { - writeU30(mi.param_types[i]); - } - writeU30(mi.name_index); - write(mi.flags); - if ((mi.flags & 8) == 8) { - writeU30(mi.optional.length); - for (int i = 0; i < mi.optional.length; i++) { - writeU30(mi.optional[i].value_index); - write(mi.optional[i].value_kind); - } - } - - if ((mi.flags & 128) == 128) { //if has_paramnames - for (int i = 0; i < mi.paramNames.length; i++) { - writeU30(mi.paramNames[i]); - } - } - } - - public void writeTrait(Trait t) throws IOException { - writeU30(t.name_index); - write((t.kindFlags << 4) + t.kindType); - if (t instanceof TraitSlotConst) { - TraitSlotConst t1 = (TraitSlotConst) t; - writeU30(t1.slot_id); - writeU30(t1.type_index); - writeU30(t1.value_index); - if (t1.value_index != 0) { - write(t1.value_kind); - } - } - if (t instanceof TraitMethodGetterSetter) { - TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; - writeU30(t2.disp_id); - writeU30(t2.method_info); - } - if (t instanceof TraitClass) { - TraitClass t3 = (TraitClass) t; - writeU30(t3.slot_id); - writeU30(t3.class_info); - } - if (t instanceof TraitFunction) { - TraitFunction t4 = (TraitFunction) t; - writeU30(t4.slot_id); - writeU30(t4.method_info); - } - if ((t.kindFlags & 4) == 4) { - writeU30(t.metadata.length); - for (int i = 0; i < t.metadata.length; i++) { - writeU30(t.metadata[i]); - } - } - } - - public void writeTraits(Traits t) throws IOException { - writeU30(t.traits.size()); - for (int i = 0; i < t.traits.size(); i++) { - writeTrait(t.traits.get(i)); - } - } - - public void writeInstanceInfo(InstanceInfo ii) throws IOException { - writeU30(ii.name_index); - writeU30(ii.super_index); - write(ii.flags); - if ((ii.flags & 8) == 8) { - writeU30(ii.protectedNS); - } - writeU30(ii.interfaces.length); - for (int i = 0; i < ii.interfaces.length; i++) { - writeU30(ii.interfaces[i]); - } - writeU30(ii.iinit_index); - writeTraits(ii.instance_traits); - } - - public void writeDecimal(Decimal value) throws IOException { - write(value.data); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +import com.jpexs.decompiler.flash.abc.types.Decimal; +import com.jpexs.decompiler.flash.abc.types.InstanceInfo; +import com.jpexs.decompiler.flash.abc.types.MethodInfo; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.abc.types.traits.Trait; +import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; +import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; +import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; +import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; +import com.jpexs.decompiler.flash.abc.types.traits.Traits; +import com.jpexs.helpers.utf8.Utf8Helper; +import java.io.IOException; +import java.io.OutputStream; + +public class ABCOutputStream extends OutputStream { + + private final OutputStream os; + + public ABCOutputStream(OutputStream os) { + this.os = os; + } + + @Override + public void write(int b) throws IOException { + os.write(b); + } + + public void writeU30(long value) throws IOException { + writeS32(value); + /*boolean loop = true; + boolean underZero=value<0; + + if(underZero){ + value = value & 0xFFFFFFFF; + }else{ + value = value & 0x7FFFFFFF; + } + do { + int ret = (int) (value & 0x7F); + if (value < 0x80) { + loop = false; + } + if (value > 0x7F) { + ret += 0x80; + } + write(ret); + value = value >> 7; + } while (loop); + */ + } + + public void writeU32(long value) throws IOException { + boolean loop = true; + value &= 0xFFFFFFFF; + do { + int ret = (int) (value & 0x7F); + if (value < 0x80) { + loop = false; + } + if (value > 0x7F) { + ret += 0x80; + } + write(ret); + value >>= 7; + } while (loop); + } + + public void writeS24(long value) throws IOException { + int ret = (int) (value & 0xff); + write(ret); + value >>= 8; + ret = (int) (value & 0xff); + write(ret); + value >>= 8; + ret = (int) (value & 0xff); + write(ret); + } + + public void writeS32(long value) throws IOException { + boolean belowZero = value < 0; + /*if (belowZero) { + value = -value; + }*/ + int bitcount = 0; + boolean loop = true; + //value = value & 0xFFFFFFFF; + do { + bitcount += 7; + int ret = (int) (value & 0x7F); + if (value < 0x80) { + if (belowZero) { //&& bitcount < 35 + ret += 0x80; + } else { + loop = false; + } + } else { + ret += 0x80; + } + + if (bitcount == 35) { + ret &= 0xf; + } + write(ret); + if (bitcount == 35) { + break; + } + value >>= 7; + } while (loop); + } + + public void writeLong(long value) throws IOException { + byte[] writeBuffer = new byte[8]; + writeBuffer[7] = (byte) (value >>> 56); + writeBuffer[6] = (byte) (value >>> 48); + writeBuffer[5] = (byte) (value >>> 40); + writeBuffer[4] = (byte) (value >>> 32); + writeBuffer[3] = (byte) (value >>> 24); + writeBuffer[2] = (byte) (value >>> 16); + writeBuffer[1] = (byte) (value >>> 8); + writeBuffer[0] = (byte) (value); + write(writeBuffer); + } + + public void writeDouble(double value) throws IOException { + writeLong(Double.doubleToLongBits(value)); + } + + public void writeU8(int value) throws IOException { + write(value); + } + + public void writeU16(int value) throws IOException { + write(value & 0xff); + write((value >> 8) & 0xff); + } + + public void writeString(String s) throws IOException { + byte[] sbytes = Utf8Helper.getBytes(s); + writeU30(sbytes.length); + write(sbytes); + } + + public void writeNamespace(Namespace ns) throws IOException { + write(ns.kind); + boolean found = false; + for (int k = 0; k < Namespace.nameSpaceKinds.length; k++) { + if (Namespace.nameSpaceKinds[k] == ns.kind) { + writeU30(ns.name_index); + found = true; + break; + } + } + if (!found) { + throw new RuntimeException("Invalid ns kind:" + ns.kind); + } + } + + public void writeMultiname(Multiname m) throws IOException { + writeU8(m.kind); + if ((m.kind == 7) || (m.kind == 0xd)) { // CONSTANT_QName and CONSTANT_QNameA. + writeU30(m.namespace_index); + writeU30(m.name_index); + } + if ((m.kind == 9) || (m.kind == 0xe)) { // CONSTANT_Multiname and CONSTANT_MultinameA. + writeU30(m.name_index); + writeU30(m.namespace_set_index); + } + if ((m.kind == 0xf) || (m.kind == 0x10)) { //CONSTANT_RTQName and CONSTANT_RTQNameA + writeU30(m.name_index); + } + if ((m.kind == 0x1B) || (m.kind == 0x1C)) { //CONSTANT_MultinameL and CONSTANT_MultinameLA + writeU30(m.namespace_set_index); + } + if (m.kind == 0x1D) { + writeU30(m.qname_index); + writeU30(m.params.size()); + for (int i = 0; i < m.params.size(); i++) { + writeU30(m.params.get(i)); + } + } + //kind==0x11,0x12 nothing CONSTANT_RTQNameL and CONSTANT_RTQNameLA. + } + + public void writeMethodInfo(MethodInfo mi) throws IOException { + writeU30(mi.param_types.length); + writeU30(mi.ret_type); + for (int i = 0; i < mi.param_types.length; i++) { + writeU30(mi.param_types[i]); + } + writeU30(mi.name_index); + write(mi.flags); + if ((mi.flags & 8) == 8) { + writeU30(mi.optional.length); + for (int i = 0; i < mi.optional.length; i++) { + writeU30(mi.optional[i].value_index); + write(mi.optional[i].value_kind); + } + } + + if ((mi.flags & 128) == 128) { //if has_paramnames + for (int i = 0; i < mi.paramNames.length; i++) { + writeU30(mi.paramNames[i]); + } + } + } + + public void writeTrait(Trait t) throws IOException { + writeU30(t.name_index); + write((t.kindFlags << 4) + t.kindType); + if (t instanceof TraitSlotConst) { + TraitSlotConst t1 = (TraitSlotConst) t; + writeU30(t1.slot_id); + writeU30(t1.type_index); + writeU30(t1.value_index); + if (t1.value_index != 0) { + write(t1.value_kind); + } + } + if (t instanceof TraitMethodGetterSetter) { + TraitMethodGetterSetter t2 = (TraitMethodGetterSetter) t; + writeU30(t2.disp_id); + writeU30(t2.method_info); + } + if (t instanceof TraitClass) { + TraitClass t3 = (TraitClass) t; + writeU30(t3.slot_id); + writeU30(t3.class_info); + } + if (t instanceof TraitFunction) { + TraitFunction t4 = (TraitFunction) t; + writeU30(t4.slot_id); + writeU30(t4.method_info); + } + if ((t.kindFlags & 4) == 4) { + writeU30(t.metadata.length); + for (int i = 0; i < t.metadata.length; i++) { + writeU30(t.metadata[i]); + } + } + } + + public void writeTraits(Traits t) throws IOException { + writeU30(t.traits.size()); + for (int i = 0; i < t.traits.size(); i++) { + writeTrait(t.traits.get(i)); + } + } + + public void writeInstanceInfo(InstanceInfo ii) throws IOException { + writeU30(ii.name_index); + writeU30(ii.super_index); + write(ii.flags); + if ((ii.flags & 8) == 8) { + writeU30(ii.protectedNS); + } + writeU30(ii.interfaces.length); + for (int i = 0; i < ii.interfaces.length; i++) { + writeU30(ii.interfaces[i]); + } + writeU30(ii.iinit_index); + writeTraits(ii.instance_traits); + } + + public void writeDecimal(Decimal value) throws IOException { + write(value.data); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java index 4528827f6..96aba3e8a 100644 --- a/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/ClassPath.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ClassPath.java similarity index 61% rename from src/com/jpexs/decompiler/flash/abc/ClassPath.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ClassPath.java index b4f88020f..3a4f9f61e 100644 --- a/src/com/jpexs/decompiler/flash/abc/ClassPath.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ClassPath.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -import java.util.Objects; - -/** - * - * @author JPEXS - */ -public class ClassPath { - - public String packageStr; - public String className; - - public ClassPath(String packageStr, String className) { - this.packageStr = packageStr; - this.className = className; - } - - @Override - public String toString() { - return (packageStr == null || packageStr.isEmpty()) ? className : packageStr + "." + className; - } - - @Override - public int hashCode() { - int hash = 7; - hash = 37 * hash + Objects.hashCode(this.packageStr); - hash = 37 * hash + Objects.hashCode(this.className); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final ClassPath other = (ClassPath) obj; - if (!Objects.equals(this.packageStr, other.packageStr)) { - return false; - } - if (!Objects.equals(this.className, other.className)) { - return false; - } - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +import java.util.Objects; + +/** + * + * @author JPEXS + */ +public class ClassPath { + + public String packageStr; + public String className; + + public ClassPath(String packageStr, String className) { + this.packageStr = packageStr; + this.className = className; + } + + @Override + public String toString() { + return (packageStr == null || packageStr.isEmpty()) ? className : packageStr + "." + className; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 37 * hash + Objects.hashCode(this.packageStr); + hash = 37 * hash + Objects.hashCode(this.className); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ClassPath other = (ClassPath) obj; + if (!Objects.equals(this.packageStr, other.packageStr)) { + return false; + } + if (!Objects.equals(this.className, other.className)) { + return false; + } + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java index e7c95c6af..8c689d3da 100644 --- a/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -public class CopyOutputStream extends OutputStream { - - private final OutputStream os; - private final InputStream is; - private long pos = 0; - private final int TEMPSIZE = 5; - private final int[] temp = new int[TEMPSIZE]; - private int tempPos = 0; - public int ignoreFirst = 0; - - public CopyOutputStream(OutputStream os, InputStream is) { - this.os = os; - this.is = is; - } - - @Override - public void write(int b) throws IOException { - temp[tempPos] = b; - tempPos = (tempPos + 1) % TEMPSIZE; - - pos++; - int r = is.read(); - if ((b & 0xff) != r) { - if (ignoreFirst <= 0) { - os.flush(); - - boolean output = true; - - if (output) { - System.out.println("Position: " + pos); - System.out.print("Last written:"); - for (int i = 0; i < TEMPSIZE; i++) { - System.out.print("" + Integer.toHexString(temp[(tempPos + i) % TEMPSIZE]) + " "); - } - System.out.println(""); - System.out.println("More expected:"); - for (int i = 0; i < TEMPSIZE; i++) { - System.out.println("" + Integer.toHexString(is.read())); - } - - System.out.println(""); - System.out.println(Integer.toHexString(r) + " expected but " + Integer.toHexString(b) + " found"); - } - throw new NotSameException(pos); - } else { - ignoreFirst--; - } - } - os.write(b); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +public class CopyOutputStream extends OutputStream { + + private final OutputStream os; + private final InputStream is; + private long pos = 0; + private final int TEMPSIZE = 5; + private final int[] temp = new int[TEMPSIZE]; + private int tempPos = 0; + public int ignoreFirst = 0; + + public CopyOutputStream(OutputStream os, InputStream is) { + this.os = os; + this.is = is; + } + + @Override + public void write(int b) throws IOException { + temp[tempPos] = b; + tempPos = (tempPos + 1) % TEMPSIZE; + + pos++; + int r = is.read(); + if ((b & 0xff) != r) { + if (ignoreFirst <= 0) { + os.flush(); + + boolean output = true; + + if (output) { + System.out.println("Position: " + pos); + System.out.print("Last written:"); + for (int i = 0; i < TEMPSIZE; i++) { + System.out.print("" + Integer.toHexString(temp[(tempPos + i) % TEMPSIZE]) + " "); + } + System.out.println(""); + System.out.println("More expected:"); + for (int i = 0; i < TEMPSIZE; i++) { + System.out.println("" + Integer.toHexString(is.read())); + } + + System.out.println(""); + System.out.println(Integer.toHexString(r) + " expected but " + Integer.toHexString(b) + " found"); + } + throw new NotSameException(pos); + } else { + ignoreFirst--; + } + } + os.write(b); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/NotSameException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/NotSameException.java new file mode 100644 index 000000000..2727e166f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/NotSameException.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +import com.jpexs.helpers.Helper; + +public class NotSameException extends RuntimeException { + + public NotSameException(long pos) { + super("Streams are not the same at pos " + Helper.formatHex((int) pos, 8)); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/RenameType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/RenameType.java new file mode 100644 index 000000000..3bdaa2919 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/RenameType.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +/** + * + * @author JPEXS + */ +public enum RenameType { + + TYPENUMBER, + RANDOMWORD +} diff --git a/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java similarity index 89% rename from src/com/jpexs/decompiler/flash/abc/ScriptPack.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 6241fd96e..14baa2857 100644 --- a/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -1,201 +1,200 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.abc.types.MethodBody; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.abc.types.Namespace; -import com.jpexs.decompiler.flash.abc.types.traits.Trait; -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.helpers.FileTextWriter; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import com.jpexs.decompiler.flash.treeitems.TreeElementItem; -import com.jpexs.helpers.CancellableWorker; -import com.jpexs.helpers.Helper; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - */ -public class ScriptPack implements TreeElementItem { - - public ABC abc; - public int scriptIndex; - public List traitIndices; - private final ClassPath path; - - @Override - public SWF getSwf() { - return abc.swf; - } - - public ClassPath getPath() { - return path; - } - - public ScriptPack(ClassPath path, ABC abc, int scriptIndex, List traitIndices) { - this.abc = abc; - this.scriptIndex = scriptIndex; - this.traitIndices = traitIndices; - this.path = path; - } - - public String getPathPackage() { - String packageName = ""; - for (int t : traitIndices) { - Multiname name = abc.script_info.get(scriptIndex).traits.traits.get(t).getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - packageName = ns.getName(abc.constants); //assume not null - } - } - return packageName; - } - - public String getPathScriptName() { - String scriptName = ""; - for (int t : traitIndices) { - Multiname name = abc.script_info.get(scriptIndex).traits.traits.get(t).getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - scriptName = name.getName(abc.constants, new ArrayList()); - } - } - return scriptName; - } - - /*public String getPath() { - String packageName = ""; - String scriptName = ""; - for (int t : traitIndices) { - Multiname name = abc.script_info[scriptIndex].traits.traits.get(t).getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - packageName = ns.getName(abc.constants); - scriptName = name.getName(abc.constants, new ArrayList()); - } - } - return packageName.equals("") ? scriptName : packageName + "." + scriptName; - }*/ - private static String makeDirPath(String packageName) { - if (packageName.isEmpty()) { - return ""; - } - String[] pathParts; - if (packageName.contains(".")) { - pathParts = packageName.split("\\."); - } else { - pathParts = new String[]{packageName}; - } - for (int i = 0; i < pathParts.length; i++) { - pathParts[i] = Helper.makeFileName(pathParts[i]); - } - return Helper.joinStrings(pathParts, File.separator); - } - - public void convert(final NulWriter writer, final List abcList, final List traits, final ScriptExportMode exportMode, final boolean parallel) throws InterruptedException { - for (int t : traitIndices) { - Trait trait = traits.get(t); - Multiname name = trait.getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - trait.convertPackaged(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); - } else { - trait.convert(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); - } - } - } - - public void appendTo(GraphTextWriter writer, List abcList, List traits, ScriptExportMode exportMode, boolean parallel) throws InterruptedException { - for (int t : traitIndices) { - Trait trait = traits.get(t); - Multiname name = trait.getName(abc); - Namespace ns = name.getNamespace(abc.constants); - if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - trait.toStringPackaged(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); - } else { - trait.toString(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); - } - } - } - - public void toSource(GraphTextWriter writer, final List abcList, final List traits, final ScriptExportMode exportMode, final boolean parallel) throws InterruptedException { - writer.suspendMeasure(); - int timeout = Configuration.decompilationTimeoutFile.get(); - try { - CancellableWorker.call(new Callable() { - @Override - public Void call() throws Exception { - convert(new NulWriter(), abcList, traits, exportMode, parallel); - return null; - } - }, timeout, TimeUnit.SECONDS); - } catch (TimeoutException ex) { - writer.continueMeasure(); - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", ex); - Helper.appendTimeoutComment(writer, timeout); - return; - } catch (ExecutionException ex) { - writer.continueMeasure(); - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", ex); - Helper.appendErrorComment(writer, ex); - return; - } - writer.continueMeasure(); - - appendTo(writer, abcList, traits, exportMode, parallel); - } - - public File export(String directory, List abcList, ScriptExportMode exportMode, boolean parallel) throws IOException { - String scriptName = getPathScriptName(); - String packageName = getPathPackage(); - File outDir = new File(directory + File.separatorChar + makeDirPath(packageName)); - if (!outDir.exists()) { - if (!outDir.mkdirs()) { - if (!outDir.exists()) { - throw new IOException("cannot create directory " + outDir); - } - } - } - String fileName = outDir.toString() + File.separator + Helper.makeFileName(scriptName) + ".as"; - - File file = new File(fileName); - try (FileTextWriter writer = new FileTextWriter(Configuration.getCodeFormatting(), new FileOutputStream(file))) { - try { - toSource(writer, abcList, abc.script_info.get(scriptIndex).traits.traits, exportMode, parallel); - } catch (InterruptedException ex) { - Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, null, ex); - } - } - return file; - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.abc.types.MethodBody; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.abc.types.traits.Trait; +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.helpers.FileTextWriter; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import com.jpexs.decompiler.flash.treeitems.TreeElementItem; +import com.jpexs.helpers.CancellableWorker; +import com.jpexs.helpers.Helper; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + */ +public class ScriptPack implements TreeElementItem { + + public ABC abc; + public int scriptIndex; + public List traitIndices; + private final ClassPath path; + + @Override + public SWF getSwf() { + return abc.swf; + } + + public ClassPath getPath() { + return path; + } + + public ScriptPack(ClassPath path, ABC abc, int scriptIndex, List traitIndices) { + this.abc = abc; + this.scriptIndex = scriptIndex; + this.traitIndices = traitIndices; + this.path = path; + } + + public String getPathPackage() { + String packageName = ""; + for (int t : traitIndices) { + Multiname name = abc.script_info.get(scriptIndex).traits.traits.get(t).getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + packageName = ns.getName(abc.constants); //assume not null + } + } + return packageName; + } + + public String getPathScriptName() { + String scriptName = ""; + for (int t : traitIndices) { + Multiname name = abc.script_info.get(scriptIndex).traits.traits.get(t).getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + scriptName = name.getName(abc.constants, new ArrayList()); + } + } + return scriptName; + } + + /*public String getPath() { + String packageName = ""; + String scriptName = ""; + for (int t : traitIndices) { + Multiname name = abc.script_info[scriptIndex].traits.traits.get(t).getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + packageName = ns.getName(abc.constants); + scriptName = name.getName(abc.constants, new ArrayList()); + } + } + return packageName.equals("") ? scriptName : packageName + "." + scriptName; + }*/ + private static String makeDirPath(String packageName) { + if (packageName.isEmpty()) { + return ""; + } + String[] pathParts; + if (packageName.contains(".")) { + pathParts = packageName.split("\\."); + } else { + pathParts = new String[]{packageName}; + } + for (int i = 0; i < pathParts.length; i++) { + pathParts[i] = Helper.makeFileName(pathParts[i]); + } + return Helper.joinStrings(pathParts, File.separator); + } + + public void convert(final NulWriter writer, final List abcList, final List traits, final ScriptExportMode exportMode, final boolean parallel) throws InterruptedException { + for (int t : traitIndices) { + Trait trait = traits.get(t); + Multiname name = trait.getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + trait.convertPackaged(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); + } else { + trait.convert(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); + } + } + } + + public void appendTo(GraphTextWriter writer, List abcList, List traits, ScriptExportMode exportMode, boolean parallel) throws InterruptedException { + for (int t : traitIndices) { + Trait trait = traits.get(t); + Multiname name = trait.getName(abc); + Namespace ns = name.getNamespace(abc.constants); + if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { + trait.toStringPackaged(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); + } else { + trait.toString(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList(), parallel); + } + } + } + + public void toSource(GraphTextWriter writer, final List abcList, final List traits, final ScriptExportMode exportMode, final boolean parallel) throws InterruptedException { + writer.suspendMeasure(); + int timeout = Configuration.decompilationTimeoutFile.get(); + try { + CancellableWorker.call(new Callable() { + @Override + public Void call() throws Exception { + convert(new NulWriter(), abcList, traits, exportMode, parallel); + return null; + } + }, timeout, TimeUnit.SECONDS); + } catch (TimeoutException ex) { + writer.continueMeasure(); + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", ex); + Helper.appendTimeoutComment(writer, timeout); + return; + } catch (ExecutionException ex) { + writer.continueMeasure(); + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", ex); + Helper.appendErrorComment(writer, ex); + return; + } + writer.continueMeasure(); + + appendTo(writer, abcList, traits, exportMode, parallel); + } + + public File export(String directory, List abcList, ScriptExportMode exportMode, boolean parallel) throws IOException { + String scriptName = getPathScriptName(); + String packageName = getPathPackage(); + File outDir = new File(directory + File.separatorChar + makeDirPath(packageName)); + if (!outDir.exists()) { + if (!outDir.mkdirs()) { + if (!outDir.exists()) { + throw new IOException("cannot create directory " + outDir); + } + } + } + String fileName = outDir.toString() + File.separator + Helper.makeFileName(scriptName) + ".as"; + + File file = new File(fileName); + try (FileTextWriter writer = new FileTextWriter(Configuration.getCodeFormatting(), new FileOutputStream(file))) { + try { + toSource(writer, abcList, abc.script_info.get(scriptIndex).traits.traits, exportMode, parallel); + } catch (InterruptedException ex) { + Logger.getLogger(ScriptPack.class.getName()).log(Level.SEVERE, null, ex); + } + } + return file; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java similarity index 99% rename from src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index df1c65927..1a16a6ea6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java similarity index 89% rename from src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java index d358bbafc..06daf20d8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java @@ -1,246 +1,245 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import com.jpexs.decompiler.flash.abc.RenameType; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.Random; -import java.util.Set; -import java.util.regex.Pattern; - -/** - * - * @author JPEXS - */ -public class AVM2Deobfuscation { - - private static final Random rnd = new Random(); - private static final int DEFAULT_FOO_SIZE = 10; - - public static final String[] reservedWords = { - "as", "break", "case", "catch", "class", "const", "continue", "default", "delete", "do", "each", "else", - "extends", "false", "finally", "for", "function", "get", "if", "implements", "import", "in", "instanceof", - "interface", "internal", "is", "native", "new", "null", "override", "package", "private", "protected", "public", - "return", "set", "super", "switch", "this", "throw", "true", "try", "typeof", "use", "var", /*"void",*/ "while", - "with", "dynamic", "default", "final", "in", "static"}; - public static final String VALID_FIRST_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"; - public static final String VALID_NEXT_CHARACTERS = VALID_FIRST_CHARACTERS + "0123456789"; - public static final String VALID_NS_CHARACTERS = ".:$"; - public static final String FOO_CHARACTERS = "bcdfghjklmnpqrstvwz"; - public static final String FOO_JOIN_CHARACTERS = "aeiouy"; - - private final ConstantPool constants; - private final Map usageTypesCount = new HashMap<>(); - - public AVM2Deobfuscation(ConstantPool constants) { - this.constants = constants; - } - - private static boolean isReserved(String s) { - for (String rw : reservedWords) { - if (rw.equals(s.trim())) { - return true; - } - } - return false; - } - - private boolean isValidNSPart(String s) { - boolean isValid = true; - if (isReserved(s)) { - isValid = false; - } - - if (isValid) { - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) > 127) { - isValid = false; - break; - } - } - } - if (isValid) { - Pattern pat = Pattern.compile("^([" + Pattern.quote(VALID_FIRST_CHARACTERS) + "]" + "[" + Pattern.quote(VALID_FIRST_CHARACTERS + VALID_NEXT_CHARACTERS + VALID_NS_CHARACTERS) + "]*)*$"); - if (!pat.matcher(s).matches()) { - isValid = false; - } - } - return isValid; - } - - public String builtInNs(String ns) { - if (ns == null) { - return null; - } - if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) { - return "flash.utils.flash_proxy"; - } - if (ns.equals("http://adobe.com/AS3/2006/builtin")) { - return "-"; - } - return null; - } - - private String fooString(HashMap deobfuscated, String orig, boolean firstUppercase, int rndSize, String usageType, RenameType renameType) { - boolean exists; - String ret; - int pos = 0; - - if (usageType == null) { - usageType = "name"; - } - if (usageTypesCount.containsKey(usageType)) { - pos = usageTypesCount.get(usageType); - } - - loopfoo: - do { - exists = false; - ret = ""; - if (renameType == RenameType.TYPENUMBER) { - pos++; - ret = usageType + "_" + pos; - } else if (renameType == RenameType.RANDOMWORD) { - int len = 3 + rnd.nextInt(rndSize - 3); - - for (int i = 0; i < len; i++) { - String c = ""; - if ((i % 2) == 0) { - c = "" + FOO_CHARACTERS.charAt(rnd.nextInt(FOO_CHARACTERS.length())); - } else { - c = "" + FOO_JOIN_CHARACTERS.charAt(rnd.nextInt(FOO_JOIN_CHARACTERS.length())); - } - if (i == 0 && firstUppercase) { - c = c.toUpperCase(Locale.ENGLISH); - } - ret += c; - } - } - for (int i = 1; i < constants.getStringCount(); i++) { - if (constants.getString(i).equals(ret)) { - exists = true; - rndSize += 1; - continue loopfoo; - } - } - if (isReserved(ret)) { - exists = true; - rndSize += 1; - continue; - } - if (deobfuscated.containsValue(ret)) { - exists = true; - rndSize += 1; - continue; - } - } while (exists); - usageTypesCount.put(usageType, pos); - deobfuscated.put(orig, ret); - return ret; - } - - public int deobfuscatePackageName(Map stringUsageTypes, Set stringUsages, HashMap namesMap, int strIndex, RenameType renameType) { - if (strIndex <= 0) { - return strIndex; - } - String s = constants.getString(strIndex); - if (builtInNs(s) != null) { - return strIndex; - } - boolean isValid = isValidNSPart(s); - if (!isValid) { - String newName; - if (namesMap.containsKey(s)) { - newName = constants.setString(strIndex, namesMap.get(s)); - } else { - String[] parts = null; - if (s.contains(".")) { - parts = s.split("\\."); - } else { - parts = new String[]{s}; - } - String ret = ""; - for (int p = 0; p < parts.length; p++) { - if (p > 0) { - ret += "."; - } - if (!isValidNSPart(parts[p])) { - ret += fooString(namesMap, parts[p], false, DEFAULT_FOO_SIZE, "package", renameType); - } else { - ret += parts[p]; - } - } - newName = ret; - namesMap.put(s, newName); - } - if (stringUsages.contains(strIndex)) { - strIndex = constants.addString(newName); - } else { - constants.setString(strIndex, newName); - } - - } - return strIndex; - } - - public int deobfuscateName(Map stringUsageTypes, Set stringUsages, Set namespaceUsages, HashMap namesMap, int strIndex, boolean firstUppercase, RenameType renameType) { - if (strIndex <= 0) { - return strIndex; - } - String s = constants.getString(strIndex); - boolean isValid = true; - if (isReserved(s)) { - isValid = false; - } - - if (isValid) { - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) > 127) { - isValid = false; - break; - } - } - } - - if (isValid) { - Pattern pat = Pattern.compile("^[" + Pattern.quote(VALID_FIRST_CHARACTERS) + "]" + "[" + Pattern.quote(VALID_FIRST_CHARACTERS + VALID_NEXT_CHARACTERS) + "]*$"); - if (!pat.matcher(s).matches()) { - isValid = false; - } - } - - if (!isValid) { - String newname; - if (namesMap.containsKey(s)) { - newname = namesMap.get(s); - } else { - newname = fooString(namesMap, constants.getString(strIndex), firstUppercase, DEFAULT_FOO_SIZE, stringUsageTypes.get(strIndex), renameType); - } - if (stringUsages.contains(strIndex) || namespaceUsages.contains(strIndex)) { //this name is already referenced as String - strIndex = constants.addString(s); //add new index - } - constants.setString(strIndex, newname); - if (!namesMap.containsKey(s)) { - namesMap.put(s, constants.getString(strIndex)); - } - } - return strIndex; - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import com.jpexs.decompiler.flash.abc.RenameType; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.Random; +import java.util.Set; +import java.util.regex.Pattern; + +/** + * + * @author JPEXS + */ +public class AVM2Deobfuscation { + + private static final Random rnd = new Random(); + private static final int DEFAULT_FOO_SIZE = 10; + + public static final String[] reservedWords = { + "as", "break", "case", "catch", "class", "const", "continue", "default", "delete", "do", "each", "else", + "extends", "false", "finally", "for", "function", "get", "if", "implements", "import", "in", "instanceof", + "interface", "internal", "is", "native", "new", "null", "override", "package", "private", "protected", "public", + "return", "set", "super", "switch", "this", "throw", "true", "try", "typeof", "use", "var", /*"void",*/ "while", + "with", "dynamic", "default", "final", "in", "static"}; + public static final String VALID_FIRST_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"; + public static final String VALID_NEXT_CHARACTERS = VALID_FIRST_CHARACTERS + "0123456789"; + public static final String VALID_NS_CHARACTERS = ".:$"; + public static final String FOO_CHARACTERS = "bcdfghjklmnpqrstvwz"; + public static final String FOO_JOIN_CHARACTERS = "aeiouy"; + + private final ConstantPool constants; + private final Map usageTypesCount = new HashMap<>(); + + public AVM2Deobfuscation(ConstantPool constants) { + this.constants = constants; + } + + private static boolean isReserved(String s) { + for (String rw : reservedWords) { + if (rw.equals(s.trim())) { + return true; + } + } + return false; + } + + private boolean isValidNSPart(String s) { + boolean isValid = true; + if (isReserved(s)) { + isValid = false; + } + + if (isValid) { + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) > 127) { + isValid = false; + break; + } + } + } + if (isValid) { + Pattern pat = Pattern.compile("^([" + Pattern.quote(VALID_FIRST_CHARACTERS) + "]" + "[" + Pattern.quote(VALID_FIRST_CHARACTERS + VALID_NEXT_CHARACTERS + VALID_NS_CHARACTERS) + "]*)*$"); + if (!pat.matcher(s).matches()) { + isValid = false; + } + } + return isValid; + } + + public String builtInNs(String ns) { + if (ns == null) { + return null; + } + if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) { + return "flash.utils.flash_proxy"; + } + if (ns.equals("http://adobe.com/AS3/2006/builtin")) { + return "-"; + } + return null; + } + + private String fooString(HashMap deobfuscated, String orig, boolean firstUppercase, int rndSize, String usageType, RenameType renameType) { + boolean exists; + String ret; + int pos = 0; + + if (usageType == null) { + usageType = "name"; + } + if (usageTypesCount.containsKey(usageType)) { + pos = usageTypesCount.get(usageType); + } + + loopfoo: + do { + exists = false; + ret = ""; + if (renameType == RenameType.TYPENUMBER) { + pos++; + ret = usageType + "_" + pos; + } else if (renameType == RenameType.RANDOMWORD) { + int len = 3 + rnd.nextInt(rndSize - 3); + + for (int i = 0; i < len; i++) { + String c = ""; + if ((i % 2) == 0) { + c = "" + FOO_CHARACTERS.charAt(rnd.nextInt(FOO_CHARACTERS.length())); + } else { + c = "" + FOO_JOIN_CHARACTERS.charAt(rnd.nextInt(FOO_JOIN_CHARACTERS.length())); + } + if (i == 0 && firstUppercase) { + c = c.toUpperCase(Locale.ENGLISH); + } + ret += c; + } + } + for (int i = 1; i < constants.getStringCount(); i++) { + if (constants.getString(i).equals(ret)) { + exists = true; + rndSize += 1; + continue loopfoo; + } + } + if (isReserved(ret)) { + exists = true; + rndSize += 1; + continue; + } + if (deobfuscated.containsValue(ret)) { + exists = true; + rndSize += 1; + continue; + } + } while (exists); + usageTypesCount.put(usageType, pos); + deobfuscated.put(orig, ret); + return ret; + } + + public int deobfuscatePackageName(Map stringUsageTypes, Set stringUsages, HashMap namesMap, int strIndex, RenameType renameType) { + if (strIndex <= 0) { + return strIndex; + } + String s = constants.getString(strIndex); + if (builtInNs(s) != null) { + return strIndex; + } + boolean isValid = isValidNSPart(s); + if (!isValid) { + String newName; + if (namesMap.containsKey(s)) { + newName = constants.setString(strIndex, namesMap.get(s)); + } else { + String[] parts = null; + if (s.contains(".")) { + parts = s.split("\\."); + } else { + parts = new String[]{s}; + } + String ret = ""; + for (int p = 0; p < parts.length; p++) { + if (p > 0) { + ret += "."; + } + if (!isValidNSPart(parts[p])) { + ret += fooString(namesMap, parts[p], false, DEFAULT_FOO_SIZE, "package", renameType); + } else { + ret += parts[p]; + } + } + newName = ret; + namesMap.put(s, newName); + } + if (stringUsages.contains(strIndex)) { + strIndex = constants.addString(newName); + } else { + constants.setString(strIndex, newName); + } + + } + return strIndex; + } + + public int deobfuscateName(Map stringUsageTypes, Set stringUsages, Set namespaceUsages, HashMap namesMap, int strIndex, boolean firstUppercase, RenameType renameType) { + if (strIndex <= 0) { + return strIndex; + } + String s = constants.getString(strIndex); + boolean isValid = true; + if (isReserved(s)) { + isValid = false; + } + + if (isValid) { + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) > 127) { + isValid = false; + break; + } + } + } + + if (isValid) { + Pattern pat = Pattern.compile("^[" + Pattern.quote(VALID_FIRST_CHARACTERS) + "]" + "[" + Pattern.quote(VALID_FIRST_CHARACTERS + VALID_NEXT_CHARACTERS) + "]*$"); + if (!pat.matcher(s).matches()) { + isValid = false; + } + } + + if (!isValid) { + String newname; + if (namesMap.containsKey(s)) { + newname = namesMap.get(s); + } else { + newname = fooString(namesMap, constants.getString(strIndex), firstUppercase, DEFAULT_FOO_SIZE, stringUsageTypes.get(strIndex), renameType); + } + if (stringUsages.contains(strIndex) || namespaceUsages.contains(strIndex)) { //this name is already referenced as String + strIndex = constants.addString(s); //add new index + } + constants.setString(strIndex, newname); + if (!namesMap.containsKey(s)) { + namesMap.put(s, constants.getString(strIndex)); + } + } + return strIndex; + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java index 5ff1f5af8..6422968be 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class CodeStats { - - public int maxstack = 0; - public int maxscope = 0; - public int maxlocal = 1; - public int initscope = 0; - public boolean has_set_dxns = false; - public boolean has_activation = false; - public InstructionStats[] instructionStats; - - public GraphTextWriter toString(GraphTextWriter writer, ABC abc, List fullyQualifiedNames) { - writer.appendNoHilight("Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal).newLine(); - int i = 0; - int ms = 0; - for (InstructionStats stats : instructionStats) { - int deltastack = stats.ins.definition.getStackDelta(stats.ins, abc); - if (stats.stackpos > ms) { - ms = stats.stackpos; - } - writer.appendNoHilight(i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(writer, LocalData.create(abc.constants, null, fullyQualifiedNames))).newLine(); - i++; - } - return writer; - } - - public CodeStats(AVM2Code code) { - instructionStats = new InstructionStats[code.code.size()]; - for (int i = 0; i < code.code.size(); i++) { - instructionStats[i] = new InstructionStats(code.code.get(i)); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class CodeStats { + + public int maxstack = 0; + public int maxscope = 0; + public int maxlocal = 1; + public int initscope = 0; + public boolean has_set_dxns = false; + public boolean has_activation = false; + public InstructionStats[] instructionStats; + + public GraphTextWriter toString(GraphTextWriter writer, ABC abc, List fullyQualifiedNames) { + writer.appendNoHilight("Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal).newLine(); + int i = 0; + int ms = 0; + for (InstructionStats stats : instructionStats) { + int deltastack = stats.ins.definition.getStackDelta(stats.ins, abc); + if (stats.stackpos > ms) { + ms = stats.stackpos; + } + writer.appendNoHilight(i + ":" + stats.stackpos + (deltastack >= 0 ? "+" + deltastack : deltastack) + "," + stats.scopepos + " " + stats.ins.toString(writer, LocalData.create(abc.constants, null, fullyQualifiedNames))).newLine(); + i++; + } + return writer; + } + + public CodeStats(AVM2Code code) { + instructionStats = new InstructionStats[code.code.size()]; + for (int i = 0; i < code.code.size(); i++) { + instructionStats[i] = new InstructionStats(code.code.get(i)); + } + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java similarity index 94% rename from src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java index 98b23e67c..f58e198ee 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2; import com.jpexs.decompiler.flash.abc.types.Decimal; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java new file mode 100644 index 000000000..bfc0fd979 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +public class ConvertException extends RuntimeException { + + public int line; + + public ConvertException(String s, int line) { + super(s + " on line " + line); + this.line = line; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java new file mode 100644 index 000000000..816fe19fe --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TranslateStack; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ConvertOutput { + + public TranslateStack stack; + public List output; + + public ConvertOutput(TranslateStack stack, List output) { + this.stack = stack; + this.output = output; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java new file mode 100644 index 000000000..3cac6e347 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +/** + * + * @author JPEXS + */ +public class InstructionStats { + + public boolean seen = false; + public int stackpos = 0; + public int scopepos = 0; + public int stackpos_after = 0; + public int scopepos_after = 0; + public AVM2Instruction ins; + + public InstructionStats(AVM2Instruction ins) { + this.ins = ins; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java new file mode 100644 index 000000000..e94848bda --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +public class InvalidInstructionArguments extends RuntimeException { + + public InvalidInstructionArguments() { + super("Invalid method arguments"); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java new file mode 100644 index 000000000..8c4c44e4d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import java.util.HashMap; +import java.util.Stack; + +public class LocalDataArea { + + public Stack operandStack = new Stack<>(); + public Stack scopeStack = new Stack<>(); + public HashMap localRegisters = new HashMap<>(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java new file mode 100644 index 000000000..7c26cc2be --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +public class UnknownInstructionCode extends RuntimeException { + + public int code; + + public UnknownInstructionCode(int code) { + super("Unknown instruction code: 0x" + Integer.toHexString(code)); + this.code = code; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java new file mode 100644 index 000000000..c46e6fc23 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2; + +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TranslateStack; +import java.util.List; + +public class UnknownJumpException extends RuntimeException { + + public TranslateStack stack; + public int ip; + public List output; + + public UnknownJumpException(TranslateStack stack, int ip, List output) { + this.stack = stack; + this.ip = ip; + this.output = output; + } + + @Override + public String toString() { + return "Unknown jump to " + ip; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java similarity index 98% rename from src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 120209c7f..6ce7ce3e7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.graph; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index 77b1cbcb0..f59c7c887 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.graph; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java similarity index 95% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java index f2bbfdf70..c485a7413 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java new file mode 100644 index 000000000..eaf8cf356 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns; + +/** + * + * @author JPEXS + */ +public class DeobfuscatePopIns extends PopIns { + + public DeobfuscatePopIns() { + instructionName = "ffdec_deobfuscatepop"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java new file mode 100644 index 000000000..04de05357 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions; + +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TranslateStack; +import java.util.HashMap; + +public interface IfTypeIns { + + public abstract void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java similarity index 90% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 2a5de4b2c..8ad08c3d1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java new file mode 100644 index 000000000..702ed5972 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.abc.types.MethodBody; +import java.util.HashMap; +import java.util.List; +import java.util.Stack; + +public interface SetTypeIns { + + public abstract String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, MethodBody body, HashMap localRegNames, List fullyQualifiedNames) throws InterruptedException; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java new file mode 100644 index 000000000..9d03b5658 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions; + +/** + * + * @author JPEXS + */ +public class TagInstruction extends InstructionDefinition { + + public static final long serialVersionUID = 1L; + + public TagInstruction(String tagName) { + super(-1, tagName, new int[0]); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java index 07942d5b7..10cc567da 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf32Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java index c15978ae8..18791cd25 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Lf64Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java index 508db45e9..d700ccd2a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li16Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java index 7e6a6db2c..a678e6f0f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li32Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java index d90954e35..68c1bd56d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Li8Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java index d66bf0f6f..84e6214c8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf32Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java index 8d02c7ef0..e69d2b1ca 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sf64Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java index 6e6f429d1..15c9df723 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si16Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java index 677bbef60..d1634975e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si32Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java index 068d51c4d..1f4792ea3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Si8Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java index 9ed08da47..82d2d158a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi16Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java index 74194f77c..3394ff8e8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi1Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java index 657257dd3..a9585a7c9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/alchemy/Sxi8Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java index 263f2d708..c2b12e1e1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java index 04a9c753f..0b9af4668 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/AddIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java index 4ae7b76c6..5b5c9220f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java index 45188268c..14bed8082 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DecrementIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java index a93985653..82625ad2d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/DivideIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java index 81201a2b9..12ef018b2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java index 022d7925a..1fb30c2c7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/IncrementIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java index e5a0f3c63..b3e384b44 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/ModuloIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java index ebbf96a6d..61b48b256 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java index 00bd0ef01..4ce9e68b2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/MultiplyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java index af23a6589..d6072fc2e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java index 14f4ef6d0..af0e1b66a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NegateIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java index 753271b92..c7a9f98fe 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/NotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java index bb2dd1c6a..1430b7c33 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java index 48add6e15..fb515f2a8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/arithmetic/SubtractIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java index cbf7fbff4..5f50dce7a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitAndIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java index 05757cc7f..31d41e0cf 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitNotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java index 3a0396e97..31a562bb7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitOrIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java index ab7ea9890..6ae330f15 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/BitXorIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java index b3a6ad0f2..c2ecbba38 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java index 8502d9827..02423fffd 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java index f916d5583..d93f2e4c2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java index 9c2f4eb31..1e6075d9b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/EqualsIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java index c81564660..4933419bb 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterEqualsIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java index 9508ae123..43684628f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/GreaterThanIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java index 77d121f9b..f7405dbd8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessEqualsIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java index d447861e0..f0ae52133 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/LessThanIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java index e5ad0ca79..b91474832 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/comparison/StrictEqualsIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.comparison; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java similarity index 87% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java index aa61ca175..a9897d72e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java similarity index 84% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java index c6831a535..6e1561cbc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java index 9904a4729..2fd22e7da 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructSuperIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java index 1288a302b..d3c5c599a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewActivationIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java index cb81df29a..aef6e01be 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewArrayIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java index 15889b306..5c5c415c6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewCatchIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java index 88b632b26..8f5c6d548 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewClassIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java index 789036b85..e808ba667 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewFunctionIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java index 939a0db76..117ce1710 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/NewObjectIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.construction; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java new file mode 100644 index 000000000..a7d801df7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +public class DebugFileIns extends InstructionDefinition { + + public DebugFileIns() { + super(0xf1, "debugfile", new int[]{AVM2Code.DAT_STRING_INDEX}); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java new file mode 100644 index 000000000..9c66abebe --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +public class DebugIns extends InstructionDefinition { + + public DebugIns() { + super(0xef, "debug", new int[]{AVM2Code.DAT_DEBUG_TYPE, AVM2Code.DAT_STRING_INDEX, AVM2Code.DAT_REGISTER_INDEX, AVM2Code.OPT_U30}); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java new file mode 100644 index 000000000..a26c8701f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +public class DebugLineIns extends InstructionDefinition { + + public DebugLineIns() { + super(0xf0, "debugline", new int[]{AVM2Code.DAT_LINENUM}); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java index 0eec99b14..cab5b50e3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java similarity index 79% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java index eeba28db0..e02589f81 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallMethodIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java index 02cb9e48a..300d8f96b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java index 34fa78e47..f21b302a9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java index 99d55d4ec..fae4b9646 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java similarity index 79% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java index f97d1ffd5..f3a333563 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallStaticIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java index 21915d67d..a2d5d3f2f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java index dfa3cbbfc..ffbbe05f2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallSuperVoidIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.executing; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java index c416f1cda..431b817b6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java index 17ed6f964..31f434f80 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java index b8f18d336..ba0fe7927 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java index 21a7ad9c4..34a46e651 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java index f89878a07..7702346be 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java index 178942c08..b141e0cd2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java index 89947e730..484aff01b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java index 570ccec23..6e4cfa713 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java index 172c640d0..1a19267de 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java index 6dbad8f53..f535c6277 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java index da73905c4..5db7a8c5c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java index 59535414e..9c76dc663 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java index 4e3a5251e..3f6442b16 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java index f66cc4247..0e273f0c1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java index 7f413dd0d..1356adfdf 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java index 432f6f731..540df39d9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/LookupSwitchIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.jumps; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java similarity index 81% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java index db2437b2b..4e29ad505 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java similarity index 81% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java index 503568cd9..e5df21c9c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/DecLocalIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java index 9a8c9014e..7858ad50f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal0Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java new file mode 100644 index 000000000..e822cc9b4 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import java.util.List; + +public class GetLocal1Ins extends GetLocalTypeIns { + + public GetLocal1Ins() { + super(0xd1, "getlocal_1", new int[]{}); + } + + @Override + public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { + lda.operandStack.push(lda.localRegisters.get(1)); + } + + @Override + public int getRegisterId(AVM2Instruction par0) { + return 1; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java new file mode 100644 index 000000000..eed78d148 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import java.util.List; + +public class GetLocal2Ins extends GetLocalTypeIns { + + public GetLocal2Ins() { + super(0xd2, "getlocal_2", new int[]{}); + } + + @Override + public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { + lda.operandStack.push(lda.localRegisters.get(2)); + } + + @Override + public int getRegisterId(AVM2Instruction par0) { + return 2; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java new file mode 100644 index 000000000..b747dadec --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import java.util.List; + +public class GetLocal3Ins extends GetLocalTypeIns { + + public GetLocal3Ins() { + super(0xd3, "getlocal_3", new int[]{}); + } + + @Override + public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { + lda.operandStack.push(lda.localRegisters.get(3)); + } + + @Override + public int getRegisterId(AVM2Instruction par0) { + return 3; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java similarity index 53% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java index b974086d5..443f60d48 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalIns.java @@ -1,40 +1,39 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import java.util.List; - -public class GetLocalIns extends GetLocalTypeIns { - - public GetLocalIns() { - super(0x62, "getlocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}); - } - - @Override - public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { - lda.operandStack.push(lda.localRegisters.get((int) (long) (Long) arguments.get(0))); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return ins.operands[0]; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import java.util.List; + +public class GetLocalIns extends GetLocalTypeIns { + + public GetLocalIns() { + super(0x62, "getlocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}); + } + + @Override + public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { + lda.operandStack.push(lda.localRegisters.get((int) (long) (Long) arguments.get(0))); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return ins.operands[0]; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java similarity index 79% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java index 39c5622b1..ffcafca7f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java index e1a4c81c7..fb84b0c16 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java index 9d8b46ea6..dfb15f3be 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/IncLocalIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java index 287f60553..015c63b9c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/KillIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java new file mode 100644 index 000000000..7699e8ece --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public class SetLocal0Ins extends SetLocalTypeIns { + + public SetLocal0Ins() { + super(0xd4, "setlocal_0", new int[]{}); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return 0; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java new file mode 100644 index 000000000..d411ededc --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public class SetLocal1Ins extends SetLocalTypeIns { + + public SetLocal1Ins() { + super(0xd5, "setlocal_1", new int[]{}); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return 1; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java new file mode 100644 index 000000000..c6e5dc9c2 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public class SetLocal2Ins extends SetLocalTypeIns { + + public SetLocal2Ins() { + super(0xd6, "setlocal_2", new int[]{}); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return 2; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java new file mode 100644 index 000000000..ccf356e8d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public class SetLocal3Ins extends SetLocalTypeIns { + + public SetLocal3Ins() { + super(0xd7, "setlocal_3", new int[]{}); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return 3; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java new file mode 100644 index 000000000..308d1fa70 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public class SetLocalIns extends SetLocalTypeIns { + + public SetLocalIns() { + super(0x63, "setlocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}); + } + + @Override + public int getRegisterId(AVM2Instruction ins) { + return ins.operands[0]; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java similarity index 89% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java index 957226f13..abd2790f4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalTypeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java index 9004d5f8e..cbc61fb0c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java index e62a5583b..a80368ccd 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindDefIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java index 482a74045..76bb2bf6f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java index 55a2e8739..749e7133a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/FindPropertyStrictIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java index 4d8cdf688..c61c4c65e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetDescendantsIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java index e313e0f30..b3438bbbc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalScopeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java index fa2fa06c8..a902bbf89 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java index 76b196dce..2b2f7a67c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java index c9230d250..178e34b14 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java index c14ee9d23..17cb55a05 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetScopeObjectIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java similarity index 83% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java index 672e64a37..e2fd4f17d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java index 6935776c8..c1836128e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java index 793d74f0e..1ce1aae58 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNext2Ins.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java index 3a2985488..d131e93b0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/HasNextIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java index eac8032fc..51128fd85 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java index 85a198522..452ae3247 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java new file mode 100644 index 000000000..acce2949b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.other; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +public class LabelIns extends InstructionDefinition { +//this can be target of branch + + public LabelIns() { + super(0x09, "label", new int[]{}); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java index dbd5ec4a6..37441a98c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextNameIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java index af06872b5..51fb27c30 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NextValueIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java new file mode 100644 index 000000000..00d156db1 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.other; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +public class NopIns extends InstructionDefinition { + + public NopIns() { + super(0x02, "nop", new int[]{}); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java index 16185f400..c936b931e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnValueIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java index b34c547c8..66076767a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ReturnVoidIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java index 3773b3d54..9728eec9c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetGlobalSlotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java similarity index 92% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java index df9a83783..94249aa57 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java similarity index 92% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java index 2a8a676d2..a22e48a9d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java index 3838c3593..5d87c7724 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java index d9be45d19..9d70fde42 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/ThrowIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java index 22a0f85e7..1c417e8fb 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/DupIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java index 97a3840c1..2c3bee7a4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java index 56c33c5d0..7ba5f3161 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PopScopeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java index 222258a59..af5163a6c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushByteIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java index 36ab7b4c3..0a634902a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushDoubleIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java index 2ce908986..ee92221ee 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushFalseIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java index e4ff5b65e..9e6ebe17b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java new file mode 100644 index 000000000..e414d70e6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; + +/** + * + * @author JPEXS + */ +public interface PushIntegerTypeIns { +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java index aee4dd7d2..7766494f5 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNamespaceIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java index acf01f0e3..cc6110c73 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNanIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java index 4f46562a1..baaecb611 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushNullIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java index 891d31958..7127436e7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java index 5e9000e9f..b273ca0d6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushShortIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java index 3b7be1bbe..f519e1e8b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushStringIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java index 53f1db5ec..534e95aef 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushTrueIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java index cfad84d42..98daf30bb 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUIntIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java index 9193a87b8..4ee559576 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushUndefinedIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java index 971714bde..ee08d1fea 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushWithIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java index 576d50041..5344514d4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/SwapIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java index 0c9cbee29..6169e6792 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ApplyTypeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java index b31479f6c..1b674eb0f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java index efe87b6c9..8f18f1f7e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/AsTypeLateIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java index e7742ba38..936e2f858 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java index 244c61521..0f17033f6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java new file mode 100644 index 000000000..cf6a59696 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.instructions.types; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.graph.GraphTargetItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public interface CoerceOrConvertTypeIns { + + public GraphTargetItem getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java index 5d0b4ceab..837929159 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceSIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java index aa8960db2..65b3079a2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertBIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java index 15fbd1572..7a921c605 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertDIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java similarity index 79% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java index c2c7b56e9..8225ed9f6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertIIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java index a842aa4e8..605c8c447 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertOIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java index 9547dc2ab..d223dc7e0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertSIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java index 447b4e695..261a1f28b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/ConvertUIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java index f1f24d8c2..c3c4a6a3c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/InstanceOfIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java index eb41a70f6..f96ecf481 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java index f75610fed..fe39e234a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/IsTypeLateIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java index d04b066ed..3900babce 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/TypeOfIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java index 280b92d6b..474bf280c 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/CheckFilterIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.xml; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java index 98e5fe7bc..67f41f51a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.xml; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java index 207f51fb4..e1b488e51 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/DXNSLateIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.xml; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java index 8beab2475..bc55259d0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXAttrIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.xml; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java index 3b8912046..40e99ee36 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/xml/EscXElemIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.xml; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java similarity index 87% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java index fc3280cdc..6694e6e31 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java similarity index 60% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java index a9ab1855d..be73248b9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class AlchemyLoadAVM2Item extends AVM2Item { - - private final String name; - private final GraphTargetItem ofs; - - public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphTargetItem ofs, String name) { - super(instruction, PRECEDENCE_PRIMARY); - this.name = name; - this.ofs = ofs; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("op_" + name + "("); - ofs.toString(writer, localData); - return writer.append(") /*Alchemy*/"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class AlchemyLoadAVM2Item extends AVM2Item { + + private final String name; + private final GraphTargetItem ofs; + + public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphTargetItem ofs, String name) { + super(instruction, PRECEDENCE_PRIMARY); + this.name = name; + this.ofs = ofs; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("op_" + name + "("); + ofs.toString(writer, localData); + return writer.append(") /*Alchemy*/"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java similarity index 59% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java index c2f38edb1..79c4c9d73 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class AlchemySignExtendAVM2Item extends AVM2Item { - - private final String name; - - public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphTargetItem value, String name) { - super(instruction, PRECEDENCE_PRIMARY); - this.name = name; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("op_" + name + "("); - value.toString(writer, localData); - return writer.append(") /*Alchemy*/"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class AlchemySignExtendAVM2Item extends AVM2Item { + + private final String name; + + public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphTargetItem value, String name) { + super(instruction, PRECEDENCE_PRIMARY); + this.name = name; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("op_" + name + "("); + value.toString(writer, localData); + return writer.append(") /*Alchemy*/"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java index e5dc869cb..a7a899bef 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class AlchemyStoreAVM2Item extends AVM2Item { - - private final String name; - private final GraphTargetItem ofs; - - public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem ofs, String name) { - super(instruction, PRECEDENCE_PRIMARY); - this.name = name; - this.ofs = ofs; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("op_" + name + "("); - ofs.toString(writer, localData); - writer.append(","); - value.toString(writer, localData); - return writer.append(") /*Alchemy*/"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class AlchemyStoreAVM2Item extends AVM2Item { + + private final String name; + private final GraphTargetItem ofs; + + public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem ofs, String name) { + super(instruction, PRECEDENCE_PRIMARY); + this.name = name; + this.ofs = ofs; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("op_" + name + "("); + ofs.toString(writer, localData); + writer.append(","); + value.toString(writer, localData); + return writer.append(") /*Alchemy*/"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java index 49a2f79f1..4ed2b81b4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java index 2e83d2b70..e184ad105 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushFalseIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushTrueIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class BooleanAVM2Item extends AVM2Item { - - public Boolean value; - - public BooleanAVM2Item(AVM2Instruction instruction, Boolean value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(value ? "true" : "false"); - } - - @Override - public Object getResult() { - return value; - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, value ? new PushTrueIns() : new PushFalseIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushFalseIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushTrueIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class BooleanAVM2Item extends AVM2Item { + + public Boolean value; + + public BooleanAVM2Item(AVM2Instruction instruction, Boolean value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(value ? "true" : "false"); + } + + @Override + public Object getResult() { + return value; + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, value ? new PushTrueIns() : new PushFalseIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java index b249f48b0..6ff2993e0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java @@ -1,75 +1,74 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallAVM2Item extends AVM2Item { - - public GraphTargetItem receiver; - public GraphTargetItem function; - public List arguments; - - public CallAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, GraphTargetItem function, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.receiver = receiver; - this.function = function; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - /*String recPart = ""; receiver.toString(constants, localRegNames) + writer.append("."); - if (receiver instanceof NewActivationAVM2Item) { - recPart = ""; - } - if (receiver instanceof ThisAVM2Item) { - recPart = ""; - }*/ - if (function.getPrecedence() > precedence) { - writer.append("("); - function.toString(writer, localData); - writer.append(")"); - } else { - function.toString(writer, localData); - } - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int a = 0; a < arguments.size(); a++) { - if (a > 0) { - writer.append(","); - } - arguments.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallAVM2Item extends AVM2Item { + + public GraphTargetItem receiver; + public GraphTargetItem function; + public List arguments; + + public CallAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, GraphTargetItem function, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.receiver = receiver; + this.function = function; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + /*String recPart = ""; receiver.toString(constants, localRegNames) + writer.append("."); + if (receiver instanceof NewActivationAVM2Item) { + recPart = ""; + } + if (receiver instanceof ThisAVM2Item) { + recPart = ""; + }*/ + if (function.getPrecedence() > precedence) { + writer.append("("); + function.toString(writer, localData); + writer.append(")"); + } else { + function.toString(writer, localData); + } + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int a = 0; a < arguments.size(); a++) { + if (a > 0) { + writer.append(","); + } + arguments.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java index 5f27ad881..5aaae0f2b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallMethodAVM2Item extends AVM2Item { - - public GraphTargetItem receiver; - public String methodName; - public List arguments; - - public CallMethodAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.receiver = receiver; - this.methodName = methodName; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - receiver.toString(writer, localData); - writer.append("."); - writer.append(methodName); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int a = 0; a < arguments.size(); a++) { - if (a > 0) { - writer.append(","); - } - arguments.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; //FIXME - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallMethodAVM2Item extends AVM2Item { + + public GraphTargetItem receiver; + public String methodName; + public List arguments; + + public CallMethodAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.receiver = receiver; + this.methodName = methodName; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + receiver.toString(writer, localData); + writer.append("."); + writer.append(methodName); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int a = 0; a < arguments.size(); a++) { + if (a > 0) { + writer.append(","); + } + arguments.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; //FIXME + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java index e89600856..7c86a6739 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropertyIns; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallPropertyAVM2Item extends AVM2Item { - - public GraphTargetItem receiver; - public GraphTargetItem propertyName; - public List arguments; - public boolean isVoid; - - public CallPropertyAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem propertyName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.receiver = receiver; - this.propertyName = propertyName; - this.arguments = arguments; - this.isVoid = isVoid; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - formatProperty(writer, receiver, propertyName, localData); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int a = 0; a < arguments.size(); a++) { - if (a > 0) { - writer.append(","); - } - arguments.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, receiver, arguments, - new AVM2Instruction(0, new CallPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName), arguments.size()}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallPropertyAVM2Item extends AVM2Item { + + public GraphTargetItem receiver; + public GraphTargetItem propertyName; + public List arguments; + public boolean isVoid; + + public CallPropertyAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem propertyName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.receiver = receiver; + this.propertyName = propertyName; + this.arguments = arguments; + this.isVoid = isVoid; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + formatProperty(writer, receiver, propertyName, localData); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int a = 0; a < arguments.size(); a++) { + if (a > 0) { + writer.append(","); + } + arguments.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, receiver, arguments, + new AVM2Instruction(0, new CallPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName), arguments.size()}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java index 062d74188..a00f5eacf 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallStaticAVM2Item extends AVM2Item { - - public GraphTargetItem receiver; - public String methodName; - public List arguments; - - public CallStaticAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.receiver = receiver; - this.methodName = methodName; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - receiver.toString(writer, localData); - writer.append("."); - writer.append(methodName); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int a = 0; a < arguments.size(); a++) { - if (a > 0) { - writer.append(","); - } - arguments.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallStaticAVM2Item extends AVM2Item { + + public GraphTargetItem receiver; + public String methodName; + public List arguments; + + public CallStaticAVM2Item(AVM2Instruction instruction, GraphTargetItem receiver, String methodName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.receiver = receiver; + this.methodName = methodName; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + receiver.toString(writer, localData); + writer.append("."); + writer.append(methodName); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int a = 0; a < arguments.size(); a++) { + if (a > 0) { + writer.append(","); + } + arguments.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java index 517c66dd2..cc6f213b3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java @@ -1,69 +1,68 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallSuperAVM2Item extends AVM2Item { - - public GraphTargetItem receiver; - public GraphTargetItem multiname; - public List arguments; - public boolean isVoid; - - public CallSuperAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem multiname, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.receiver = receiver; - this.multiname = multiname; - this.arguments = arguments; - this.isVoid = isVoid; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (!receiver.toString().equals("this")) { - receiver.toString(writer, localData); - writer.append("."); - } - writer.append("super."); - multiname.toString(writer, localData); - writer.append("("); - String args = ""; - for (int a = 0; a < arguments.size(); a++) { - if (a > 0) { - writer.append(","); - } - arguments.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallSuperAVM2Item extends AVM2Item { + + public GraphTargetItem receiver; + public GraphTargetItem multiname; + public List arguments; + public boolean isVoid; + + public CallSuperAVM2Item(AVM2Instruction instruction, boolean isVoid, GraphTargetItem receiver, GraphTargetItem multiname, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.receiver = receiver; + this.multiname = multiname; + this.arguments = arguments; + this.isVoid = isVoid; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (!receiver.toString().equals("this")) { + receiver.toString(writer, localData); + writer.append("."); + } + writer.append("super."); + multiname.toString(writer, localData); + writer.append("("); + String args = ""; + for (int a = 0; a < arguments.size(); a++) { + if (a > 0) { + writer.append(","); + } + arguments.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java similarity index 55% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java index 957490a5f..c878b8267 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class ClassAVM2Item extends AVM2Item { - - public Multiname className; - - public ClassAVM2Item(Multiname className) { - super(null, PRECEDENCE_PRIMARY); - this.className = className; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(className.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class ClassAVM2Item extends AVM2Item { + + public Multiname className; + + public ClassAVM2Item(Multiname className) { + super(null, PRECEDENCE_PRIMARY); + this.className = className; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(className.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java similarity index 87% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java index 53fd5c3cf..37df67aa7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java index f56c1ce7d..fe474cd73 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java index 5565f31a1..e7a959573 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java @@ -1,68 +1,67 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ConstructPropAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public GraphTargetItem propertyName; - public List args; - - public ConstructPropAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, List args) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.propertyName = propertyName; - this.args = args; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("new "); - int idx = writer.getLength(); - object.toString(writer, localData); - if (idx < writer.getLength()) { - writer.append("."); - } - propertyName.toString(writer, localData); - writer.spaceBeforeCallParenthesies(args.size()); - writer.append("("); - for (int a = 0; a < args.size(); a++) { - if (a > 0) { - writer.append(","); - } - args.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ConstructPropAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public GraphTargetItem propertyName; + public List args; + + public ConstructPropAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, List args) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.propertyName = propertyName; + this.args = args; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("new "); + int idx = writer.getLength(); + object.toString(writer, localData); + if (idx < writer.getLength()) { + writer.append("."); + } + propertyName.toString(writer, localData); + writer.spaceBeforeCallParenthesies(args.size()); + writer.append("("); + for (int a = 0; a < args.size(); a++) { + if (a > 0) { + writer.append(","); + } + args.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java index e6b107308..576888280 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructSuperIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ConstructSuperAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public List args; - - public ConstructSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, List args) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.args = args; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (!object.toString().equals("this")) { - object.toString(writer, localData); - writer.append("."); - } - writer.spaceBeforeCallParenthesies(args.size()); - writer.append("super("); - for (int a = 0; a < args.size(); a++) { - if (a > 0) { - writer.append(","); - } - args.get(a).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object, args, - new AVM2Instruction(0, new ConstructSuperIns(), new int[]{args.size()}, new byte[0]) - ); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructSuperIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ConstructSuperAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public List args; + + public ConstructSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, List args) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.args = args; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (!object.toString().equals("this")) { + object.toString(writer, localData); + writer.append("."); + } + writer.spaceBeforeCallParenthesies(args.size()); + writer.append("super("); + for (int a = 0; a < args.size(); a++) { + if (a > 0) { + writer.append(","); + } + args.get(a).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object, args, + new AVM2Instruction(0, new ConstructSuperIns(), new int[]{args.size()}, new byte[0]) + ); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java index 7edc921f0..32d0c95bc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java similarity index 56% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java index fda55f8af..270c6403b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class DecLocalAVM2Item extends AVM2Item { - - public int regIndex; - - public DecLocalAVM2Item(AVM2Instruction instruction, int regIndex) { - super(instruction, PRECEDENCE_POSTFIX); - this.regIndex = regIndex; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append(localRegName(localData.localRegNames, regIndex)); - return writer.append("--"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class DecLocalAVM2Item extends AVM2Item { + + public int regIndex; + + public DecLocalAVM2Item(AVM2Instruction instruction, int regIndex) { + super(instruction, PRECEDENCE_POSTFIX); + this.regIndex = regIndex; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append(localRegName(localData.localRegNames, regIndex)); + return writer.append("--"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java index c555d6ec3..5017d57aa 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.Set; - -public class DecrementAVM2Item extends AVM2Item { - - public DecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); - this.value = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - value.toString(writer, localData); - return writer.append(" - 1"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(value.getResult()) - 1; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Set; + +public class DecrementAVM2Item extends AVM2Item { + + public DecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_ADDITIVE); + this.value = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + value.toString(writer, localData); + return writer.append(" - 1"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(value.getResult()) - 1; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java index 0e9c74906..7c4979241 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.DXNSLateIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author Jindra - */ -public class DefaultXMLNamespace extends AVM2Item { - - private final GraphTargetItem ns; - - public DefaultXMLNamespace(AVM2Instruction instruction, GraphTargetItem ns) { - super(instruction, NOPRECEDENCE); - this.ns = ns; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("default xml namespace = "); - return ns.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, ns, ins(new DXNSLateIns())); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.DXNSLateIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author Jindra + */ +public class DefaultXMLNamespace extends AVM2Item { + + private final GraphTargetItem ns; + + public DefaultXMLNamespace(AVM2Instruction instruction, GraphTargetItem ns) { + super(instruction, NOPRECEDENCE); + this.ns = ns; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("default xml namespace = "); + return ns.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, ns, ins(new DXNSLateIns())); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java index 235949531..1e190b2fa 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXAttrIns; -import static com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item.ins; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author Jindra - */ -public class EscapeXAttrAVM2Item extends AVM2Item { - - public EscapeXAttrAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE); - this.value = expression; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("{"); - value.toString(writer, localData); - return writer.append("}"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, ins(new EscXAttrIns())); - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXAttrIns; +import static com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item.ins; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author Jindra + */ +public class EscapeXAttrAVM2Item extends AVM2Item { + + public EscapeXAttrAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { + super(instruction, NOPRECEDENCE); + this.value = expression; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("{"); + value.toString(writer, localData); + return writer.append("}"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, ins(new EscXAttrIns())); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java index ec34c0d00..d41035f14 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXElemIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author Jindra - */ -public class EscapeXElemAVM2Item extends AVM2Item { - - public EscapeXElemAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE); - this.value = expression; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("{"); - value.toString(writer, localData); - return writer.append("}"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, ins(new EscXElemIns())); - } - -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXElemIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author Jindra + */ +public class EscapeXElemAVM2Item extends AVM2Item { + + public EscapeXElemAVM2Item(AVM2Instruction instruction, GraphTargetItem expression) { + super(instruction, NOPRECEDENCE); + this.value = expression; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("{"); + value.toString(writer, localData); + return writer.append("}"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, ins(new EscXElemIns())); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java similarity index 57% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java index 573e18f15..378c2ab01 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java @@ -1,52 +1,51 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class FilteredCheckAVM2Item extends AVM2Item { - - GraphTargetItem object; - - public FilteredCheckAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, NOPRECEDENCE); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return object.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class FilteredCheckAVM2Item extends AVM2Item { + + GraphTargetItem object; + + public FilteredCheckAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, NOPRECEDENCE); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return object.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java similarity index 59% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java index ea3823bef..0a71cc6c1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class FindDefAVM2Item extends AVM2Item { - - public Multiname propertyName; - - public FindDefAVM2Item(AVM2Instruction instruction, Multiname propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(propertyName.getNamespace(localData.constantsAvm2).getName(localData.constantsAvm2)); //assume not null name - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class FindDefAVM2Item extends AVM2Item { + + public Multiname propertyName; + + public FindDefAVM2Item(AVM2Instruction instruction, Multiname propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(propertyName.getNamespace(localData.constantsAvm2).getName(localData.constantsAvm2)); //assume not null name + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java similarity index 56% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java index a8bd170e8..c7e977809 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class FindPropertyAVM2Item extends AVM2Item { - - public GraphTargetItem propertyName; - - public FindPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class FindPropertyAVM2Item extends AVM2Item { + + public GraphTargetItem propertyName; + + public FindPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java index 172e492d8..6dc2aa994 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushDoubleIns; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class FloatValueAVM2Item extends NumberValueAVM2Item { - - public Double value; - - public FloatValueAVM2Item(AVM2Instruction instruction, Double value) { - super(instruction); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("" + value); - } - - @Override - public Object getResult() { - return value; - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, new PushDoubleIns(), new int[]{((AVM2SourceGenerator) generator).abc.constants.getDoubleId(value, true)}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushDoubleIns; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class FloatValueAVM2Item extends NumberValueAVM2Item { + + public Double value; + + public FloatValueAVM2Item(AVM2Instruction instruction, Double value) { + super(instruction); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("" + value); + } + + @Override + public Object getResult() { + return value; + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, new PushDoubleIns(), new int[]{((AVM2SourceGenerator) generator).abc.constants.getDoubleId(value, true)}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java similarity index 86% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java index 2c40df52b..e37d5c77f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java @@ -1,167 +1,166 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.types.Namespace; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.HashMap; -import java.util.List; - -public class FullMultinameAVM2Item extends AVM2Item { - - public int multinameIndex; - public GraphTargetItem name; - public GraphTargetItem namespace; - - public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex, GraphTargetItem name) { - super(instruction, PRECEDENCE_PRIMARY); - this.multinameIndex = multinameIndex; - this.name = name; - this.namespace = null; - } - - public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex) { - super(instruction, PRECEDENCE_PRIMARY); - this.multinameIndex = multinameIndex; - this.name = null; - this.namespace = null; - } - - public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex, GraphTargetItem name, GraphTargetItem namespace) { - super(instruction, PRECEDENCE_PRIMARY); - this.multinameIndex = multinameIndex; - this.name = name; - this.namespace = namespace; - } - - public boolean isRuntime() { - return (name != null) || (namespace != null); - } - - public boolean isXML(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) throws InterruptedException { - String cname; - if (name != null) { - cname = name.toString(LocalData.create(constants, localRegNames, fullyQualifiedNames)); - } else { - cname = (constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames)); - } - String cns = ""; - if (namespace != null) { - cns = namespace.toString(LocalData.create(constants, localRegNames, fullyQualifiedNames)); - } else { - Namespace ns = constants.getMultiname(multinameIndex).getNamespace(constants); - if ((ns != null) && (ns.name_index != 0)) { - cns = ns.getName(constants); - } - } - return cname.equals("XML") && cns.isEmpty(); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (namespace != null) { - namespace.toString(writer, localData); - writer.append("::"); - } else { - /*Namespace ns = constants.getMultiname(multinameIndex).getNamespace(constants); - if ((ns != null)&&(ns.name_index!=0)) { - ret = hilight(ns.getName(constants) + "::")+ret; - }*/ - } - if (name != null) { - writer.append("["); - name.toString(writer, localData); - writer.append("]"); - } else { - ConstantPool constants = localData.constantsAvm2; - List fullyQualifiedNames = localData.fullyQualifiedNames; - writer.append(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames)); - } - return writer; - } - - public boolean compareSame(FullMultinameAVM2Item other) { - if (multinameIndex != other.multinameIndex) { - return false; - } - GraphTargetItem tiName = name; - if (name != null) { - name = name.getThroughDuplicate(); - } - while (tiName instanceof LocalRegAVM2Item) { - if (((LocalRegAVM2Item) tiName).computedValue != null) { - tiName = ((LocalRegAVM2Item) tiName).computedValue.getThroughNotCompilable().getThroughDuplicate(); - } else { - break; - } - } - - GraphTargetItem tiName2 = other.name; - if (tiName2 != null) { - tiName2 = tiName2.getThroughDuplicate(); - } - while (tiName2 instanceof LocalRegAVM2Item) { - if (((LocalRegAVM2Item) tiName2).computedValue != null) { - tiName2 = ((LocalRegAVM2Item) tiName2).computedValue.getThroughNotCompilable().getThroughDuplicate(); - } else { - break; - } - } - if (tiName != tiName2) { - return false; - } - - GraphTargetItem tiNameSpace = namespace; - if (tiNameSpace != null) { - tiNameSpace = tiNameSpace.getThroughDuplicate(); - } - while (tiNameSpace instanceof LocalRegAVM2Item) { - if (((LocalRegAVM2Item) tiNameSpace).computedValue != null) { - tiNameSpace = ((LocalRegAVM2Item) tiNameSpace).computedValue.getThroughNotCompilable().getThroughDuplicate(); - } - } - - GraphTargetItem tiNameSpace2 = other.namespace; - if (tiNameSpace2 != null) { - tiNameSpace2 = tiNameSpace2.getThroughDuplicate(); - } - while (tiNameSpace2 instanceof LocalRegAVM2Item) { - if (((LocalRegAVM2Item) tiNameSpace2).computedValue != null) { - tiNameSpace2 = ((LocalRegAVM2Item) tiNameSpace2).computedValue.getThroughNotCompilable().getThroughDuplicate(); - } - } - if (tiNameSpace != tiNameSpace2) { - return false; - } - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.HashMap; +import java.util.List; + +public class FullMultinameAVM2Item extends AVM2Item { + + public int multinameIndex; + public GraphTargetItem name; + public GraphTargetItem namespace; + + public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex, GraphTargetItem name) { + super(instruction, PRECEDENCE_PRIMARY); + this.multinameIndex = multinameIndex; + this.name = name; + this.namespace = null; + } + + public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex) { + super(instruction, PRECEDENCE_PRIMARY); + this.multinameIndex = multinameIndex; + this.name = null; + this.namespace = null; + } + + public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex, GraphTargetItem name, GraphTargetItem namespace) { + super(instruction, PRECEDENCE_PRIMARY); + this.multinameIndex = multinameIndex; + this.name = name; + this.namespace = namespace; + } + + public boolean isRuntime() { + return (name != null) || (namespace != null); + } + + public boolean isXML(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) throws InterruptedException { + String cname; + if (name != null) { + cname = name.toString(LocalData.create(constants, localRegNames, fullyQualifiedNames)); + } else { + cname = (constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames)); + } + String cns = ""; + if (namespace != null) { + cns = namespace.toString(LocalData.create(constants, localRegNames, fullyQualifiedNames)); + } else { + Namespace ns = constants.getMultiname(multinameIndex).getNamespace(constants); + if ((ns != null) && (ns.name_index != 0)) { + cns = ns.getName(constants); + } + } + return cname.equals("XML") && cns.isEmpty(); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (namespace != null) { + namespace.toString(writer, localData); + writer.append("::"); + } else { + /*Namespace ns = constants.getMultiname(multinameIndex).getNamespace(constants); + if ((ns != null)&&(ns.name_index!=0)) { + ret = hilight(ns.getName(constants) + "::")+ret; + }*/ + } + if (name != null) { + writer.append("["); + name.toString(writer, localData); + writer.append("]"); + } else { + ConstantPool constants = localData.constantsAvm2; + List fullyQualifiedNames = localData.fullyQualifiedNames; + writer.append(constants.getMultiname(multinameIndex).getName(constants, fullyQualifiedNames)); + } + return writer; + } + + public boolean compareSame(FullMultinameAVM2Item other) { + if (multinameIndex != other.multinameIndex) { + return false; + } + GraphTargetItem tiName = name; + if (name != null) { + name = name.getThroughDuplicate(); + } + while (tiName instanceof LocalRegAVM2Item) { + if (((LocalRegAVM2Item) tiName).computedValue != null) { + tiName = ((LocalRegAVM2Item) tiName).computedValue.getThroughNotCompilable().getThroughDuplicate(); + } else { + break; + } + } + + GraphTargetItem tiName2 = other.name; + if (tiName2 != null) { + tiName2 = tiName2.getThroughDuplicate(); + } + while (tiName2 instanceof LocalRegAVM2Item) { + if (((LocalRegAVM2Item) tiName2).computedValue != null) { + tiName2 = ((LocalRegAVM2Item) tiName2).computedValue.getThroughNotCompilable().getThroughDuplicate(); + } else { + break; + } + } + if (tiName != tiName2) { + return false; + } + + GraphTargetItem tiNameSpace = namespace; + if (tiNameSpace != null) { + tiNameSpace = tiNameSpace.getThroughDuplicate(); + } + while (tiNameSpace instanceof LocalRegAVM2Item) { + if (((LocalRegAVM2Item) tiNameSpace).computedValue != null) { + tiNameSpace = ((LocalRegAVM2Item) tiNameSpace).computedValue.getThroughNotCompilable().getThroughDuplicate(); + } + } + + GraphTargetItem tiNameSpace2 = other.namespace; + if (tiNameSpace2 != null) { + tiNameSpace2 = tiNameSpace2.getThroughDuplicate(); + } + while (tiNameSpace2 instanceof LocalRegAVM2Item) { + if (((LocalRegAVM2Item) tiNameSpace2).computedValue != null) { + tiNameSpace2 = ((LocalRegAVM2Item) tiNameSpace2).computedValue.getThroughNotCompilable().getThroughDuplicate(); + } + } + if (tiNameSpace != tiNameSpace2) { + return false; + } + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java index 31790cda6..53b8502e8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java @@ -1,74 +1,73 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class GetDescendantsAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public GraphTargetItem multiname; - public List openedNamespaces; - public String nameStr; - - //constructor for compiler - public GetDescendantsAVM2Item(GraphTargetItem object, String nameStr, List openedNamespaces) { - super(null, PRECEDENCE_PRIMARY); - this.object = object; - this.nameStr = nameStr; - this.openedNamespaces = openedNamespaces; - } - - public GetDescendantsAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem multiname) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.multiname = multiname; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - writer.append(".."); - return multiname.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return ((AVM2SourceGenerator) generator).generate(localData, this); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class GetDescendantsAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public GraphTargetItem multiname; + public List openedNamespaces; + public String nameStr; + + //constructor for compiler + public GetDescendantsAVM2Item(GraphTargetItem object, String nameStr, List openedNamespaces) { + super(null, PRECEDENCE_PRIMARY); + this.object = object; + this.nameStr = nameStr; + this.openedNamespaces = openedNamespaces; + } + + public GetDescendantsAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem multiname) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.multiname = multiname; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + writer.append(".."); + return multiname.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return ((AVM2SourceGenerator) generator).generate(localData, this); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java similarity index 58% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java index bc6775714..d6f0aff4d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class GetLexAVM2Item extends AVM2Item { - - public Multiname propertyName; - - public GetLexAVM2Item(AVM2Instruction instruction, Multiname propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class GetLexAVM2Item extends AVM2Item { + + public Multiname propertyName; + + public GetLexAVM2Item(AVM2Instruction instruction, Multiname propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java index d4fc2db07..a437b0c72 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class GetPropertyAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public GraphTargetItem propertyName; - - public GetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return formatProperty(writer, object, propertyName, localData); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object, - new AVM2Instruction(0, new GetPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName)}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class GetPropertyAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public GraphTargetItem propertyName; + + public GetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return formatProperty(writer, object, propertyName, localData); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object, + new AVM2Instruction(0, new GetPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName)}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java index a42999f00..dd342cea3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java @@ -1,54 +1,53 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class GetSlotAVM2Item extends AVM2Item { - - public Multiname slotName; - public GraphTargetItem scope; - - public GetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName) { - super(instruction, PRECEDENCE_PRIMARY); - this.slotName = slotName; - this.scope = scope; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - if (slotName == null) { - return writer.append("/*UnknownSlot*/"); - } - return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class GetSlotAVM2Item extends AVM2Item { + + public Multiname slotName; + public GraphTargetItem scope; + + public GetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName) { + super(instruction, PRECEDENCE_PRIMARY); + this.slotName = slotName; + this.scope = scope; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + if (slotName == null) { + return writer.append("/*UnknownSlot*/"); + } + return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java similarity index 64% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java index 5459b0b51..074b74334 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class GetSuperAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public FullMultinameAVM2Item propertyName; - - public GetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (!object.toString().equals("this")) { - int length = writer.getLength(); - object.toString(writer, localData); - if (writer.getLength() > length) { - writer.append("."); - } - } - writer.append("super."); - return propertyName.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class GetSuperAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public FullMultinameAVM2Item propertyName; + + public GetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (!object.toString().equals("this")) { + int length = writer.getLength(); + object.toString(writer, localData); + if (writer.getLength() > length) { + writer.append("."); + } + } + writer.append("super."); + return propertyName.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java similarity index 61% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java index aa4345d7a..abac97f12 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class HasNextAVM2Item extends AVM2Item { - - public GraphTargetItem object; - public GraphTargetItem collection; - - public HasNextAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem collection) { - super(instruction, NOPRECEDENCE); - this.object = object; - this.collection = collection; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - collection.toString(writer, localData); - writer.append(" hasNext "); - return object.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class HasNextAVM2Item extends AVM2Item { + + public GraphTargetItem object; + public GraphTargetItem collection; + + public HasNextAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem collection) { + super(instruction, NOPRECEDENCE); + this.object = object; + this.collection = collection; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + collection.toString(writer, localData); + writer.append(" hasNext "); + return object.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java index 22d91cd1b..3364c5e65 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java similarity index 56% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java index 334e83aa9..f77e64d6e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class IncLocalAVM2Item extends AVM2Item { - - public int regIndex; - - public IncLocalAVM2Item(AVM2Instruction instruction, int regIndex) { - super(instruction, PRECEDENCE_POSTFIX); - this.regIndex = regIndex; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append(localRegName(localData.localRegNames, regIndex)); - return writer.append("++"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class IncLocalAVM2Item extends AVM2Item { + + public int regIndex; + + public IncLocalAVM2Item(AVM2Instruction instruction, int regIndex) { + super(instruction, PRECEDENCE_POSTFIX); + this.regIndex = regIndex; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append(localRegName(localData.localRegNames, regIndex)); + return writer.append("++"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java index 403ef8c4d..838ffa380 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.Set; - -public class IncrementAVM2Item extends AVM2Item { - - public IncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); - this.value = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - value.toString(writer, localData); - return writer.append(" + 1"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(value.getResult()) + 1; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Set; + +public class IncrementAVM2Item extends AVM2Item { + + public IncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_ADDITIVE); + this.value = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + value.toString(writer, localData); + return writer.append(" + 1"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(value.getResult()) + 1; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java index c4f2ee3e0..40a21e980 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { - - public GraphTargetItem object; - public FullMultinameAVM2Item propertyName; - //public GraphTargetItem value; - - public InitPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.object = object; - this.propertyName = propertyName; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - formatProperty(writer, object, propertyName, localData); - writer.append(" = "); - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem getObject() { - return new GetPropertyAVM2Item(instruction, object, propertyName); - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { + + public GraphTargetItem object; + public FullMultinameAVM2Item propertyName; + //public GraphTargetItem value; + + public InitPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.object = object; + this.propertyName = propertyName; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + formatProperty(writer, object, propertyName, localData); + writer.append(" = "); + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem getObject() { + return new GetPropertyAVM2Item(instruction, object, propertyName); + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java similarity index 90% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java index 1b4b81bdf..ed5c36721 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java index bfcb8114f..d6a40a6b6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java index b5f4c8c87..a8c71a2db 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java @@ -1,123 +1,122 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal1Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal2Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal3Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocalIns; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.FilterAVM2Item; -import com.jpexs.decompiler.flash.ecma.Undefined; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class LocalRegAVM2Item extends AVM2Item { - - public int regIndex; - public GraphTargetItem computedValue; - private final Object computedResult; - private boolean isCT = false; - - public LocalRegAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem computedValue) { - super(instruction, PRECEDENCE_PRIMARY); - this.regIndex = regIndex; - if (computedValue == null) { - computedResult = null; - } else { - if (computedValue.isCompileTime()) { - computedResult = computedValue.getResult(); - isCT = true; - } else { - computedResult = null; - } - } - this.computedValue = computedValue; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (computedValue instanceof FilterAVM2Item) { - return computedValue.toString(writer, localData); - } - return writer.append(localRegName(localData.localRegNames, regIndex)); - } - - @Override - public GraphTargetItem getThroughRegister() { - if (computedValue == null) { - return this; - } - return computedValue.getThroughRegister(); - } - - @Override - public Object getResult() { - if (computedResult == null) { - return new Undefined(); - } - return computedResult; - - } - - @Override - public boolean isCompileTime(Set dependencies) { - return isCT; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - AVM2Instruction ins; - switch (regIndex) { - case 0: - ins = new AVM2Instruction(0, new GetLocal0Ins(), new int[]{}, new byte[0]); - break; - case 1: - ins = new AVM2Instruction(0, new GetLocal1Ins(), new int[]{}, new byte[0]); - break; - case 2: - ins = new AVM2Instruction(0, new GetLocal2Ins(), new int[]{}, new byte[0]); - break; - case 3: - ins = new AVM2Instruction(0, new GetLocal3Ins(), new int[]{}, new byte[0]); - break; - default: - ins = new AVM2Instruction(0, new GetLocalIns(), new int[]{regIndex}, new byte[0]); - break; - } - return toSourceMerge(localData, generator, ins); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal1Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal2Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal3Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.FilterAVM2Item; +import com.jpexs.decompiler.flash.ecma.Undefined; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class LocalRegAVM2Item extends AVM2Item { + + public int regIndex; + public GraphTargetItem computedValue; + private final Object computedResult; + private boolean isCT = false; + + public LocalRegAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem computedValue) { + super(instruction, PRECEDENCE_PRIMARY); + this.regIndex = regIndex; + if (computedValue == null) { + computedResult = null; + } else { + if (computedValue.isCompileTime()) { + computedResult = computedValue.getResult(); + isCT = true; + } else { + computedResult = null; + } + } + this.computedValue = computedValue; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (computedValue instanceof FilterAVM2Item) { + return computedValue.toString(writer, localData); + } + return writer.append(localRegName(localData.localRegNames, regIndex)); + } + + @Override + public GraphTargetItem getThroughRegister() { + if (computedValue == null) { + return this; + } + return computedValue.getThroughRegister(); + } + + @Override + public Object getResult() { + if (computedResult == null) { + return new Undefined(); + } + return computedResult; + + } + + @Override + public boolean isCompileTime(Set dependencies) { + return isCT; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + AVM2Instruction ins; + switch (regIndex) { + case 0: + ins = new AVM2Instruction(0, new GetLocal0Ins(), new int[]{}, new byte[0]); + break; + case 1: + ins = new AVM2Instruction(0, new GetLocal1Ins(), new int[]{}, new byte[0]); + break; + case 2: + ins = new AVM2Instruction(0, new GetLocal2Ins(), new int[]{}, new byte[0]); + break; + case 3: + ins = new AVM2Instruction(0, new GetLocal3Ins(), new int[]{}, new byte[0]); + break; + default: + ins = new AVM2Instruction(0, new GetLocalIns(), new int[]{regIndex}, new byte[0]); + break; + } + return toSourceMerge(localData, generator, ins); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java similarity index 61% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java index 06a0772be..67b0f292d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class NameSpaceAVM2Item extends AVM2Item { - - public int namespaceIndex; - - public NameSpaceAVM2Item(AVM2Instruction instruction, int namespaceIndex) { - super(instruction, NOPRECEDENCE); - this.namespaceIndex = namespaceIndex; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - if (namespaceIndex == 0) { - return writer.append("*"); - } - ConstantPool constants = localData.constantsAvm2; - return writer.append(constants.getNamespace(namespaceIndex).toString(constants)); //assume not null name - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class NameSpaceAVM2Item extends AVM2Item { + + public int namespaceIndex; + + public NameSpaceAVM2Item(AVM2Instruction instruction, int namespaceIndex) { + super(instruction, NOPRECEDENCE); + this.namespaceIndex = namespaceIndex; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + if (namespaceIndex == 0) { + return writer.append("*"); + } + ConstantPool constants = localData.constantsAvm2; + return writer.append(constants.getNamespace(namespaceIndex).toString(constants)); //assume not null name + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java index d47e7e852..9971e0ee0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.TernarOpItem; - -public class NameValuePair extends AVM2Item { - - public GraphTargetItem name; - //public GraphTargetItem value; - - public NameValuePair(GraphTargetItem name, GraphTargetItem value) { - super(name.src, NOPRECEDENCE); - this.name = name; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - name.toString(writer, localData); - writer.append(":"); - if (value instanceof TernarOpItem) { //Ternar operator contains ":" - writer.append("("); - value.toString(writer, localData); - writer.append(")"); - } else { - value.toString(writer, localData); - } - return writer; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.TernarOpItem; + +public class NameValuePair extends AVM2Item { + + public GraphTargetItem name; + //public GraphTargetItem value; + + public NameValuePair(GraphTargetItem name, GraphTargetItem value) { + super(name.src, NOPRECEDENCE); + this.name = name; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + name.toString(writer, localData); + writer.append(":"); + if (value instanceof TernarOpItem) { //Ternar operator contains ":" + writer.append("("); + value.toString(writer, localData); + writer.append(")"); + } else { + value.toString(writer, localData); + } + return writer; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java index 65d5b23ba..1bd17b6e3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNanIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class NanAVM2Item extends AVM2Item { - - public NanAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("NaN"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, new PushNanIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Number"); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNanIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class NanAVM2Item extends AVM2Item { + + public NanAVM2Item(AVM2Instruction instruction) { + super(instruction, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("NaN"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, new PushNanIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Number"); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java similarity index 56% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java index f3af90b9f..a0c90c717 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.HashMap; - -public class NewActivationAVM2Item extends AVM2Item { - - public HashMap slots = new HashMap<>(); - - public NewActivationAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("newactivation()"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.HashMap; + +public class NewActivationAVM2Item extends AVM2Item { + + public HashMap slots = new HashMap<>(); + + public NewActivationAVM2Item(AVM2Instruction instruction) { + super(instruction, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("newactivation()"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java index 8bb34e500..2086ab762 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java @@ -1,69 +1,68 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewArrayIns; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class NewArrayAVM2Item extends AVM2Item { - - public List values; - - public NewArrayAVM2Item(AVM2Instruction instruction, List values) { - super(instruction, PRECEDENCE_PRIMARY); - this.values = values; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("["); - for (int a = 0; a < values.size(); a++) { - if (a > 0) { - writer.append(","); - } - values.get(a).toString(writer, localData); - } - return writer.append("]"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.ARRAY; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, values, - new AVM2Instruction(0, new NewArrayIns(), new int[]{values.size()}, new byte[0]) - ); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewArrayIns; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class NewArrayAVM2Item extends AVM2Item { + + public List values; + + public NewArrayAVM2Item(AVM2Instruction instruction, List values) { + super(instruction, PRECEDENCE_PRIMARY); + this.values = values; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("["); + for (int a = 0; a < values.size(); a++) { + if (a > 0) { + writer.append(","); + } + values.get(a).toString(writer, localData); + } + return writer.append("]"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.ARRAY; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, values, + new AVM2Instruction(0, new NewArrayIns(), new int[]{values.size()}, new byte[0]) + ); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java similarity index 81% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java index c141b7c93..7a460b225 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java index 6846b1a3e..3476212e4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java index d7df9b5f7..619c6587d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class NextNameAVM2Item extends AVM2Item { - - GraphTargetItem index; - GraphTargetItem obj; - - public NextNameAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { - super(instruction, NOPRECEDENCE); - this.index = index; - this.obj = obj; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("nextName"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - index.toString(writer, localData); - writer.append(","); - obj.toString(writer, localData); - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class NextNameAVM2Item extends AVM2Item { + + GraphTargetItem index; + GraphTargetItem obj; + + public NextNameAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { + super(instruction, NOPRECEDENCE); + this.index = index; + this.obj = obj; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("nextName"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + index.toString(writer, localData); + writer.append(","); + obj.toString(writer, localData); + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java index 0ad55c7af..c19ee8d04 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class NextValueAVM2Item extends AVM2Item { - - GraphTargetItem index; - GraphTargetItem obj; - - public NextValueAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { - super(instruction, NOPRECEDENCE); - this.index = index; - this.obj = obj; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("nextValue"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - index.toString(writer, localData); - writer.append(","); - obj.toString(writer, localData); - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class NextValueAVM2Item extends AVM2Item { + + GraphTargetItem index; + GraphTargetItem obj; + + public NextValueAVM2Item(AVM2Instruction instruction, GraphTargetItem index, GraphTargetItem obj) { + super(instruction, NOPRECEDENCE); + this.index = index; + this.obj = obj; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("nextValue"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + index.toString(writer, localData); + writer.append(","); + obj.toString(writer, localData); + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java index 8a4a1bae2..cc695ba79 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java @@ -1,70 +1,69 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns; -import com.jpexs.decompiler.flash.ecma.Null; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class NullAVM2Item extends AVM2Item { - - public NullAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("null"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public Object getResult() { - return new Null(); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, new PushNullIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("null"); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns; +import com.jpexs.decompiler.flash.ecma.Null; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class NullAVM2Item extends AVM2Item { + + public NullAVM2Item(AVM2Instruction instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("null"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public Object getResult() { + return new Null(); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, new PushNullIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("null"); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java new file mode 100644 index 000000000..11d88f8aa --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; + +public abstract class NumberValueAVM2Item extends AVM2Item { + + public NumberValueAVM2Item(AVM2Instruction instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java index bbad80aec..c328dfcab 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class PostDecrementAVM2Item extends AVM2Item implements AssignmentAVM2Item { - - public GraphTargetItem object; - - public PostDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append("--"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return object.returnType(); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (object instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, true, true); - } - return new ArrayList<>(); //? - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (object instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, true, false); - } - return new ArrayList<>(); //? - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class PostDecrementAVM2Item extends AVM2Item implements AssignmentAVM2Item { + + public GraphTargetItem object; + + public PostDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_POSTFIX); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append("--"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return object.returnType(); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (object instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, true, true); + } + return new ArrayList<>(); //? + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (object instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, true, false); + } + return new ArrayList<>(); //? + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java index 21b483436..e394441b4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java @@ -1,78 +1,77 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class PostIncrementAVM2Item extends AVM2Item implements AssignmentAVM2Item { - - public GraphTargetItem object; - - public PostIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append("++"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return object.returnType(); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (object instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, false, true); - } - return new ArrayList<>(); //? - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (object instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, false, false); - } - return new ArrayList<>(); //? - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class PostIncrementAVM2Item extends AVM2Item implements AssignmentAVM2Item { + + public GraphTargetItem object; + + public PostIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_POSTFIX); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append("++"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return object.returnType(); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (object instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, false, true); + } + return new ArrayList<>(); //? + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (object instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) object).toSourceChange(localData, generator, true, false, false); + } + return new ArrayList<>(); //? + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java index 4e77049d6..bb28c0512 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.ExitItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ReturnValueAVM2Item extends AVM2Item implements ExitItem { - - //public GraphTargetItem value; - public ReturnValueAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, NOPRECEDENCE); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("return "); - return value.toString(writer, localData); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return ((AVM2SourceGenerator) generator).generate(localData, this); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.ExitItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ReturnValueAVM2Item extends AVM2Item implements ExitItem { + + //public GraphTargetItem value; + public ReturnValueAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { + super(instruction, NOPRECEDENCE); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("return "); + return value.toString(writer, localData); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return ((AVM2SourceGenerator) generator).generate(localData, this); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java similarity index 66% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java index 499790382..26de37515 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java @@ -1,57 +1,56 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.ExitItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ReturnVoidAVM2Item extends AVM2Item implements ExitItem { - - public ReturnVoidAVM2Item(AVM2Instruction instruction) { - super(instruction, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("return"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return ((AVM2SourceGenerator) generator).generate(localData, this); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.ExitItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ReturnVoidAVM2Item extends AVM2Item implements ExitItem { + + public ReturnVoidAVM2Item(AVM2Instruction instruction) { + super(instruction, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("return"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return ((AVM2SourceGenerator) generator).generate(localData, this); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java similarity index 53% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java index 7c05003a8..cbd95cfb8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ScriptAVM2Item.java @@ -1,51 +1,50 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class ScriptAVM2Item extends AVM2Item { - - public int scriptIndex; - - public ScriptAVM2Item(int scriptIndex) { - super(null, NOPRECEDENCE); - this.scriptIndex = scriptIndex; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("script" + scriptIndex); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class ScriptAVM2Item extends AVM2Item { + + public int scriptIndex; + + public ScriptAVM2Item(int scriptIndex) { + super(null, NOPRECEDENCE); + this.scriptIndex = scriptIndex; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("script" + scriptIndex); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java index 2eab87179..18743ce43 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetGlobalSlotAVM2Item.java @@ -1,66 +1,65 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class SetGlobalSlotAVM2Item extends AVM2Item { - - public int slotId; - //public GraphTargetItem value; - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - public SetGlobalSlotAVM2Item(AVM2Instruction instruction, int slotId, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.slotId = slotId; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("setglobalslot"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - writer.append(slotId + ","); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class SetGlobalSlotAVM2Item extends AVM2Item { + + public int slotId; + //public GraphTargetItem value; + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + public SetGlobalSlotAVM2Item(AVM2Instruction instruction, int slotId, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.slotId = slotId; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("setglobalslot"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + writer.append(slotId + ","); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java similarity index 84% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java index 0d22407e6..ac36e23f3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java @@ -1,125 +1,124 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal0Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal1Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal2Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal3Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.DupIns; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { - - public int regIndex; - //public GraphTargetItem value; - - public SetLocalAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.regIndex = regIndex; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append(localRegName(localData.localRegNames, regIndex) + " = "); - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem getObject() { - return new LocalRegAVM2Item(instruction, regIndex, null); - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - AVM2Instruction ins; - switch (regIndex) { - case 0: - ins = new AVM2Instruction(0, new SetLocal0Ins(), new int[]{}, new byte[0]); - break; - case 1: - ins = new AVM2Instruction(0, new SetLocal1Ins(), new int[]{}, new byte[0]); - break; - case 2: - ins = new AVM2Instruction(0, new SetLocal2Ins(), new int[]{}, new byte[0]); - break; - case 3: - ins = new AVM2Instruction(0, new SetLocal3Ins(), new int[]{}, new byte[0]); - break; - default: - ins = new AVM2Instruction(0, new SetLocalIns(), new int[]{regIndex}, new byte[0]); - break; - } - return toSourceMerge(localData, generator, value, - new AVM2Instruction(0, new DupIns(), new int[]{}, new byte[0]), ins); - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - AVM2Instruction ins; - switch (regIndex) { - case 0: - ins = new AVM2Instruction(0, new SetLocal0Ins(), new int[]{}, new byte[0]); - break; - case 1: - ins = new AVM2Instruction(0, new SetLocal1Ins(), new int[]{}, new byte[0]); - break; - case 2: - ins = new AVM2Instruction(0, new SetLocal2Ins(), new int[]{}, new byte[0]); - break; - case 3: - ins = new AVM2Instruction(0, new SetLocal3Ins(), new int[]{}, new byte[0]); - break; - default: - ins = new AVM2Instruction(0, new SetLocalIns(), new int[]{regIndex}, new byte[0]); - break; - } - return toSourceMerge(localData, generator, value, ins); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal0Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal1Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal2Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal3Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.DupIns; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { + + public int regIndex; + //public GraphTargetItem value; + + public SetLocalAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.regIndex = regIndex; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append(localRegName(localData.localRegNames, regIndex) + " = "); + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem getObject() { + return new LocalRegAVM2Item(instruction, regIndex, null); + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + AVM2Instruction ins; + switch (regIndex) { + case 0: + ins = new AVM2Instruction(0, new SetLocal0Ins(), new int[]{}, new byte[0]); + break; + case 1: + ins = new AVM2Instruction(0, new SetLocal1Ins(), new int[]{}, new byte[0]); + break; + case 2: + ins = new AVM2Instruction(0, new SetLocal2Ins(), new int[]{}, new byte[0]); + break; + case 3: + ins = new AVM2Instruction(0, new SetLocal3Ins(), new int[]{}, new byte[0]); + break; + default: + ins = new AVM2Instruction(0, new SetLocalIns(), new int[]{regIndex}, new byte[0]); + break; + } + return toSourceMerge(localData, generator, value, + new AVM2Instruction(0, new DupIns(), new int[]{}, new byte[0]), ins); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + AVM2Instruction ins; + switch (regIndex) { + case 0: + ins = new AVM2Instruction(0, new SetLocal0Ins(), new int[]{}, new byte[0]); + break; + case 1: + ins = new AVM2Instruction(0, new SetLocal1Ins(), new int[]{}, new byte[0]); + break; + case 2: + ins = new AVM2Instruction(0, new SetLocal2Ins(), new int[]{}, new byte[0]); + break; + case 3: + ins = new AVM2Instruction(0, new SetLocal3Ins(), new int[]{}, new byte[0]); + break; + default: + ins = new AVM2Instruction(0, new SetLocalIns(), new int[]{regIndex}, new byte[0]); + break; + } + return toSourceMerge(localData, generator, value, ins); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java index 031102dd8..542d1ec07 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java @@ -1,90 +1,89 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { - - public GraphTargetItem object; - public GraphTargetItem propertyName; - public GraphTargetItem value; - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - public SetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.object = object; - this.propertyName = propertyName; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - formatProperty(writer, object, propertyName, localData); - writer.append(" = "); - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem getObject() { - return new GetPropertyAVM2Item(instruction, object, propertyName); - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object, value, - new AVM2Instruction(0, new SetPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName)}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { + + public GraphTargetItem object; + public GraphTargetItem propertyName; + public GraphTargetItem value; + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + public SetPropertyAVM2Item(AVM2Instruction instruction, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.object = object; + this.propertyName = propertyName; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + formatProperty(writer, object, propertyName, localData); + writer.append(" = "); + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem getObject() { + return new GetPropertyAVM2Item(instruction, object, propertyName); + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object, value, + new AVM2Instruction(0, new SetPropertyIns(), new int[]{((AVM2SourceGenerator) generator).propertyName(propertyName)}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java index 841ee4579..a040653db 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java @@ -1,95 +1,94 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { - - public Multiname slotName; - //public GraphTargetItem value; - public GraphTargetItem scope; - - public SetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.slotName = slotName; - this.value = value; - this.scope = scope; - } - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - getName(writer, localData); - writer.append(" = "); - return value.toString(writer, localData); - } - - public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { - /*ret = scope.toString(constants, localRegNames) + "."; - if (!(scope instanceof NewActivationAVM2Item)) { - ret = scope.toString(constants, localRegNames) + "."; - } - if (scope instanceof LocalRegAVM2Item) { - if (((LocalRegAVM2Item) scope).computedValue != null) { - if (((LocalRegAVM2Item) scope).computedValue instanceof NewActivationAVM2Item) { - ret = ""; - } - } - }*/ - if (slotName == null) { - return writer.append("/*UnknownSlot*/"); - } - return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); - } - - @Override - public GraphTargetItem getObject() { - return new GetSlotAVM2Item(instruction, scope, slotName); - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, AssignmentAVM2Item { + + public Multiname slotName; + //public GraphTargetItem value; + public GraphTargetItem scope; + + public SetSlotAVM2Item(AVM2Instruction instruction, GraphTargetItem scope, Multiname slotName, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.slotName = slotName; + this.value = value; + this.scope = scope; + } + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + getName(writer, localData); + writer.append(" = "); + return value.toString(writer, localData); + } + + public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { + /*ret = scope.toString(constants, localRegNames) + "."; + if (!(scope instanceof NewActivationAVM2Item)) { + ret = scope.toString(constants, localRegNames) + "."; + } + if (scope instanceof LocalRegAVM2Item) { + if (((LocalRegAVM2Item) scope).computedValue != null) { + if (((LocalRegAVM2Item) scope).computedValue instanceof NewActivationAVM2Item) { + ret = ""; + } + } + }*/ + if (slotName == null) { + return writer.append("/*UnknownSlot*/"); + } + return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames)); + } + + @Override + public GraphTargetItem getObject() { + return new GetSlotAVM2Item(instruction, scope, slotName); + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java index 43423f1e3..78ed2a177 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java @@ -1,70 +1,69 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class SetSuperAVM2Item extends AVM2Item { - - //public GraphTargetItem value; - public GraphTargetItem object; - public FullMultinameAVM2Item propertyName; - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - public SetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem object, FullMultinameAVM2Item propertyName) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.value = value; - this.object = object; - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (!object.toString().equals("this")) { - object.toString(writer, localData); - writer.append("."); - } - writer.append("super."); - propertyName.toString(writer, localData); - writer.append(" = "); - return value.toString(writer, localData); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class SetSuperAVM2Item extends AVM2Item { + + //public GraphTargetItem value; + public GraphTargetItem object; + public FullMultinameAVM2Item propertyName; + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + public SetSuperAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem object, FullMultinameAVM2Item propertyName) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.value = value; + this.object = object; + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (!object.toString().equals("this")) { + object.toString(writer, localData); + writer.append("."); + } + writer.append("super."); + propertyName.toString(writer, localData); + writer.append(" = "); + return value.toString(writer, localData); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java new file mode 100644 index 000000000..98346b267 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public interface SetTypeAVM2Item { + + public GraphTargetItem getObject(); + + public GraphTargetItem getValue(); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java index 8bac18da7..a3877360d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java @@ -1,74 +1,73 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.helpers.Helper; -import java.util.List; -import java.util.Set; - -public class StringAVM2Item extends AVM2Item { - - public String value; - - public StringAVM2Item(AVM2Instruction instruction, String value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("\"" + Helper.escapeString(value) + "\""); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public Object getResult() { - return value; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, new PushStringIns(), new int[]{((AVM2SourceGenerator) generator).str(value)}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.STRING; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.Helper; +import java.util.List; +import java.util.Set; + +public class StringAVM2Item extends AVM2Item { + + public String value; + + public StringAVM2Item(AVM2Instruction instruction, String value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("\"" + Helper.escapeString(value) + "\""); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public Object getResult() { + return value; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, new PushStringIns(), new int[]{((AVM2SourceGenerator) generator).str(value)}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.STRING; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java similarity index 68% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java index d73ae8e9e..e3b4f644b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java @@ -1,66 +1,65 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ThisAVM2Item extends AVM2Item { - - public Multiname className; - - public ThisAVM2Item(Multiname className) { - super(null, PRECEDENCE_PRIMARY); - this.className = className; - } - - @Override - public String toString() { - return "this"; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("this"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new AVM2Instruction(0, new GetLocal0Ins(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ThisAVM2Item extends AVM2Item { + + public Multiname className; + + public ThisAVM2Item(Multiname className) { + super(null, PRECEDENCE_PRIMARY); + this.className = className; + } + + @Override + public String toString() { + return "this"; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("this"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new AVM2Instruction(0, new GetLocal0Ins(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java index 33cd04066..b86e06cdc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ThrowAVM2Item extends AVM2Item { - - //public GraphTargetItem value; - public ThrowAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, NOPRECEDENCE); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("throw "); - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return ((AVM2SourceGenerator) generator).generate(localData, this); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ThrowAVM2Item extends AVM2Item { + + //public GraphTargetItem value; + public ThrowAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { + super(instruction, NOPRECEDENCE); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("throw "); + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return ((AVM2SourceGenerator) generator).generate(localData, this); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java index f04c35735..b0eb1f129 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java @@ -1,70 +1,69 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUndefinedIns; -import com.jpexs.decompiler.flash.ecma.Undefined; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class UndefinedAVM2Item extends AVM2Item { - - public UndefinedAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("undefined"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public Object getResult() { - return new Undefined(); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Undefined"); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, - new AVM2Instruction(0, new PushUndefinedIns(), new int[]{}, new byte[0]) - ); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUndefinedIns; +import com.jpexs.decompiler.flash.ecma.Undefined; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class UndefinedAVM2Item extends AVM2Item { + + public UndefinedAVM2Item(AVM2Instruction instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("undefined"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public Object getResult() { + return new Undefined(); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Undefined"); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, + new AVM2Instruction(0, new PushUndefinedIns(), new int[]{}, new byte[0]) + ); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java similarity index 54% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java index 0c336dc43..abfa2e539 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class UnparsedAVM2Item extends AVM2Item { - - public String value; - - public UnparsedAVM2Item(AVM2Instruction instruction, String value) { - super(instruction, NOPRECEDENCE); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(value); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class UnparsedAVM2Item extends AVM2Item { + + public String value; + + public UnparsedAVM2Item(AVM2Instruction instruction, String value) { + super(instruction, NOPRECEDENCE); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(value); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java index 70a8e0202..6b072ea33 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java similarity index 59% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java index 173553b5f..db5c61453 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java similarity index 64% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java index 738d1f788..fa800cce1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class WithObjectAVM2Item extends AVM2Item { - - public GraphTargetItem scope; - - public WithObjectAVM2Item(AVM2Instruction instruction, GraphTargetItem scope) { - super(instruction, PRECEDENCE_PRIMARY); - this.scope = scope; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return scope.toSource(localData, generator); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class WithObjectAVM2Item extends AVM2Item { + + public GraphTargetItem scope; + + public WithObjectAVM2Item(AVM2Instruction instruction, GraphTargetItem scope) { + super(instruction, PRECEDENCE_PRIMARY); + this.scope = scope; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return scope.toSource(localData, generator); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java index 600e234d5..80f9d1305 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class XMLAVM2Item extends AVM2Item { - - public List parts; - - public XMLAVM2Item(AVM2Instruction instruction, List parts) { - super(instruction, NOPRECEDENCE); - this.parts = parts; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - for (GraphTargetItem part : parts) { - if (part instanceof StringAVM2Item) { - writer.append(((StringAVM2Item) part).value); - } else { - part.toString(writer, localData); - } - } - return writer; - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("XML"); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class XMLAVM2Item extends AVM2Item { + + public List parts; + + public XMLAVM2Item(AVM2Instruction instruction, List parts) { + super(instruction, NOPRECEDENCE); + this.parts = parts; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + for (GraphTargetItem part : parts) { + if (part instanceof StringAVM2Item) { + writer.append(((StringAVM2Item) part).value); + } else { + part.toString(writer, localData); + } + } + return writer; + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("XML"); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java new file mode 100644 index 000000000..5bb65f69d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.clauses; + +/** + * + * @author JPEXS + */ +public interface AssignmentAVM2Item { +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java index 7fb280b33..c4a38e7d8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java @@ -1,88 +1,87 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.clauses; - -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.CoerceAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.SetSlotAVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class DeclarationAVM2Item extends AVM2Item { - - public GraphTargetItem assignment; - public GraphTargetItem type; - - public DeclarationAVM2Item(GraphTargetItem assignment, GraphTargetItem type) { - super(assignment.src, assignment.getPrecedence()); - this.type = type; - this.assignment = assignment; - } - - public DeclarationAVM2Item(GraphTargetItem assignment) { - this(assignment, null); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (assignment instanceof SetLocalAVM2Item) { - SetLocalAVM2Item lti = (SetLocalAVM2Item) assignment; - GraphTargetItem coerType = TypeItem.UNBOUNDED; - if (lti.value instanceof CoerceAVM2Item) { - coerType = ((CoerceAVM2Item) lti.value).typeObj; - } - if (lti.value instanceof ConvertAVM2Item) { - coerType = ((ConvertAVM2Item) lti.value).type; - } - writer.append("var "); - writer.append(localRegName(localData.localRegNames, lti.regIndex)); - writer.append(":"); - coerType.appendTo(writer, localData); - writer.append(" = "); - return lti.value.toString(writer, localData); - } - if (assignment instanceof SetSlotAVM2Item) { - SetSlotAVM2Item ssti = (SetSlotAVM2Item) assignment; - writer.append("var "); - ssti.getName(writer, localData); - writer.append(":"); - type.appendTo(writer, localData); - writer.append(" = "); - return ssti.value.toString(writer, localData); - } - writer.append("var "); - return assignment.toString(writer, localData); - } - - @Override - public GraphTargetItem returnType() { - return type; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.clauses; + +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.CoerceAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.SetSlotAVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class DeclarationAVM2Item extends AVM2Item { + + public GraphTargetItem assignment; + public GraphTargetItem type; + + public DeclarationAVM2Item(GraphTargetItem assignment, GraphTargetItem type) { + super(assignment.src, assignment.getPrecedence()); + this.type = type; + this.assignment = assignment; + } + + public DeclarationAVM2Item(GraphTargetItem assignment) { + this(assignment, null); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (assignment instanceof SetLocalAVM2Item) { + SetLocalAVM2Item lti = (SetLocalAVM2Item) assignment; + GraphTargetItem coerType = TypeItem.UNBOUNDED; + if (lti.value instanceof CoerceAVM2Item) { + coerType = ((CoerceAVM2Item) lti.value).typeObj; + } + if (lti.value instanceof ConvertAVM2Item) { + coerType = ((ConvertAVM2Item) lti.value).type; + } + writer.append("var "); + writer.append(localRegName(localData.localRegNames, lti.regIndex)); + writer.append(":"); + coerType.appendTo(writer, localData); + writer.append(" = "); + return lti.value.toString(writer, localData); + } + if (assignment instanceof SetSlotAVM2Item) { + SetSlotAVM2Item ssti = (SetSlotAVM2Item) assignment; + writer.append("var "); + ssti.getName(writer, localData); + writer.append(":"); + type.appendTo(writer, localData); + writer.append(" = "); + return ssti.value.toString(writer, localData); + } + writer.append("var "); + return assignment.toString(writer, localData); + } + + @Override + public GraphTargetItem returnType() { + return type; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java similarity index 57% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java index e6ac8b8ba..b1da5a42a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ExceptionAVM2Item.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.clauses; - -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.abc.types.ABCException; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class ExceptionAVM2Item extends AVM2Item { - - public ABCException exception; - - public ExceptionAVM2Item(ABCException exception) { - super(null, NOPRECEDENCE); - this.exception = exception; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append(exception.getVarName(localData.constantsAvm2, localData.fullyQualifiedNames)); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.clauses; + +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.abc.types.ABCException; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class ExceptionAVM2Item extends AVM2Item { + + public ABCException exception; + + public ExceptionAVM2Item(ABCException exception) { + super(null, NOPRECEDENCE); + this.exception = exception; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append(exception.getVarName(localData.constantsAvm2, localData.fullyQualifiedNames)); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java index ce8860f43..685cb0d49 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/FilterAVM2Item.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.clauses; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class FilterAVM2Item extends AVM2Item { - - public GraphTargetItem expression; - public GraphTargetItem collection; - - public FilterAVM2Item(AVM2Instruction instruction, GraphTargetItem collection, GraphTargetItem expression) { - super(instruction, NOPRECEDENCE); - this.expression = expression; - this.collection = collection; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - collection.toString(writer, localData); - writer.append(".("); - expression.toString(writer, localData); - return writer.append(")"); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2012-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.clauses; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class FilterAVM2Item extends AVM2Item { + + public GraphTargetItem expression; + public GraphTargetItem collection; + + public FilterAVM2Item(AVM2Instruction instruction, GraphTargetItem collection, GraphTargetItem expression) { + super(instruction, NOPRECEDENCE); + this.expression = expression; + this.collection = collection; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + collection.toString(writer, localData); + writer.append(".("); + expression.toString(writer, localData); + return writer.append(")"); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java similarity index 86% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java index 5af2202a5..93856822f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java similarity index 86% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java index 4e2b7d335..8303d06e4 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java similarity index 88% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java index 132db2853..b96b61b08 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java index cd7d59f39..c14f222e8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java @@ -1,92 +1,91 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.AddIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIns; -import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.ecma.EcmaType; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class AddAVM2Item extends BinaryOpItem { - - public AddAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (rightSide.getPrecedence() >= precedence) { //string + vs number + - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - - @Override - public Object getResult() { - if (EcmaScript.type(leftSide.getResult()) == EcmaType.STRING || EcmaScript.type(rightSide.getResult()) == EcmaType.STRING) { - return "" + leftSide.getResult() + rightSide.getResult(); - } - return EcmaScript.toNumber(leftSide.getResult()) + EcmaScript.toNumber(rightSide.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (rightSide instanceof IntegerValueAVM2Item) { - IntegerValueAVM2Item iv = (IntegerValueAVM2Item) rightSide; - if (iv.value == 1) { - return toSourceMerge(localData, generator, leftSide, - new AVM2Instruction(0, new IncrementIns(), new int[]{}, new byte[0]) - ); - } - } - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new AddIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.AddIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIns; +import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.ecma.EcmaType; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class AddAVM2Item extends BinaryOpItem { + + public AddAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+"); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (rightSide.getPrecedence() >= precedence) { //string + vs number + + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + + @Override + public Object getResult() { + if (EcmaScript.type(leftSide.getResult()) == EcmaType.STRING || EcmaScript.type(rightSide.getResult()) == EcmaType.STRING) { + return "" + leftSide.getResult() + rightSide.getResult(); + } + return EcmaScript.toNumber(leftSide.getResult()) + EcmaScript.toNumber(rightSide.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (rightSide instanceof IntegerValueAVM2Item) { + IntegerValueAVM2Item iv = (IntegerValueAVM2Item) rightSide; + if (iv.value == 1) { + return toSourceMerge(localData, generator, leftSide, + new AVM2Instruction(0, new IncrementIns(), new int[]{}, new byte[0]) + ); + } + } + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new AddIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java similarity index 62% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java index b1b72ba48..c61e2ac84 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java @@ -1,46 +1,45 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeLateIns; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class AsTypeAVM2Item extends BinaryOpItem { - - public AsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "as"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new AsTypeLateIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return rightSide; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeLateIns; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class AsTypeAVM2Item extends BinaryOpItem { + + public AsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { + super(instruction, PRECEDENCE_RELATIONAL, value, type, "as"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new AsTypeLateIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return rightSide; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java index 9e4d63b24..cd61c9311 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitAndIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitAndAVM2Item extends BinaryOpItem { - - public BitAndAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) & ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new BitAndIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitAndIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitAndAVM2Item extends BinaryOpItem { + + public BitAndAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) & ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new BitAndIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java index e63f720fb..b063a5b47 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitNotAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitNotIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitNotAVM2Item extends UnaryOpItem { - - public BitNotAVM2Item(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "~"); - } - - @Override - public Object getResult() { - return ~((long) (double) EcmaScript.toNumber(value.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, - new AVM2Instruction(0, new BitNotIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitNotIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitNotAVM2Item extends UnaryOpItem { + + public BitNotAVM2Item(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_UNARY, value, "~"); + } + + @Override + public Object getResult() { + return ~((long) (double) EcmaScript.toNumber(value.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, + new AVM2Instruction(0, new BitNotIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java index f0591f85a..27ff7965e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitOrIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitOrAVM2Item extends BinaryOpItem { - - public BitOrAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) | ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new BitOrIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitOrIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitOrAVM2Item extends BinaryOpItem { + + public BitOrAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) | ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new BitOrIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java index 6151bf61b..713d9782f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitXorIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitXorAVM2Item extends BinaryOpItem { - - public BitXorAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) ^ ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new BitXorIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitXorIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitXorAVM2Item extends BinaryOpItem { + + public BitXorAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) ^ ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new BitXorIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java index 3ca18e4ba..c70a83fc9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java index 0f90d15e7..1234523df 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java @@ -1,80 +1,79 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DivideIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class DivideAVM2Item extends BinaryOpItem { - - public DivideAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); - } - - @Override - public Object getResult() { - if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { - return Double.NaN; - } - return (EcmaScript.toNumber(leftSide.getResult())) / (EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new DivideIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DivideIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class DivideAVM2Item extends BinaryOpItem { + + public DivideAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); + } + + @Override + public Object getResult() { + if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { + return Double.NaN; + } + return (EcmaScript.toNumber(leftSide.getResult())) / (EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new DivideIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java index 2ca232bd5..5acfaeec5 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/EqAVM2Item.java @@ -1,72 +1,71 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.EqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfEqIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class EqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public EqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfEqIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfNeIns(); - } - - @Override - public Object getResult() { - return EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); - } - - @Override - public GraphTargetItem invert() { - return new NeqAVM2Item(src, leftSide, rightSide); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new EqualsIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.EqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class EqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public EqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfEqIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfNeIns(); + } + + @Override + public Object getResult() { + return EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); + } + + @Override + public GraphTargetItem invert() { + return new NeqAVM2Item(src, leftSide, rightSide); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new EqualsIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java index 5615da3b5..e847449b0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GeAVM2Item.java @@ -1,79 +1,78 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterEqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGeIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class GeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public GeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfGeIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfNGeIns(); - } - - @Override - public GraphTargetItem invert() { - return new LtAVM2Item(src, leftSide, rightSide); - } - - @Override - public Object getResult() { - Object ret = EcmaScript.compare(leftSide.getResult(), rightSide.getResult()); - if (ret == Boolean.TRUE) { - return Boolean.FALSE; - } - if (ret == Boolean.FALSE) { - return Boolean.TRUE; - } - return ret;//undefined - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new GreaterEqualsIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterEqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class GeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public GeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfGeIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfNGeIns(); + } + + @Override + public GraphTargetItem invert() { + return new LtAVM2Item(src, leftSide, rightSide); + } + + @Override + public Object getResult() { + Object ret = EcmaScript.compare(leftSide.getResult(), rightSide.getResult()); + if (ret == Boolean.TRUE) { + return Boolean.FALSE; + } + if (ret == Boolean.FALSE) { + return Boolean.TRUE; + } + return ret;//undefined + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new GreaterEqualsIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java index 1e721a83e..38b01d24b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/GtAVM2Item.java @@ -1,72 +1,71 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterThanIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGtIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGtIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class GtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public GtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfGtIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfNGtIns(); - } - - @Override - public GraphTargetItem invert() { - return new LeAVM2Item(src, leftSide, rightSide); - } - - @Override - public Object getResult() { - return EcmaScript.compare(rightSide.getResult(), leftSide.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new GreaterThanIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterThanIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGtIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class GtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public GtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, ">"); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfGtIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfNGtIns(); + } + + @Override + public GraphTargetItem invert() { + return new LeAVM2Item(src, leftSide, rightSide); + } + + @Override + public Object getResult() { + return EcmaScript.compare(rightSide.getResult(), leftSide.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new GreaterThanIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java new file mode 100644 index 000000000..f14072b21 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.graph.model.BinaryOp; + +/** + * + * @author JPEXS + */ +public interface IfCondition extends BinaryOp { + + public InstructionDefinition getIfDefinition(); + + public InstructionDefinition getIfNotDefinition(); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java index 85b58f670..e2c333d78 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InAVM2Item.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.InIns; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class InAVM2Item extends BinaryOpItem { - - public InAVM2Item(AVM2Instruction instruction, GraphTargetItem name, GraphTargetItem object) { - super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new InIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.InIns; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class InAVM2Item extends BinaryOpItem { + + public InAVM2Item(AVM2Instruction instruction, GraphTargetItem name, GraphTargetItem object) { + super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new InIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java index 5f683ced1..48eddd915 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/InstanceOfAVM2Item.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.InstanceOfIns; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class InstanceOfAVM2Item extends BinaryOpItem { - - public InstanceOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new InstanceOfIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.InstanceOfIns; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class InstanceOfAVM2Item extends BinaryOpItem { + + public InstanceOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { + super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new InstanceOfIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java index 1b6df655e..f267c01dc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IsTypeAVM2Item.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.IsTypeLateIns; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class IsTypeAVM2Item extends BinaryOpItem { - - public IsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "is"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new IsTypeLateIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.IsTypeLateIns; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class IsTypeAVM2Item extends BinaryOpItem { + + public IsTypeAVM2Item(AVM2Instruction instruction, GraphTargetItem value, GraphTargetItem type) { + super(instruction, PRECEDENCE_RELATIONAL, value, type, "is"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new IsTypeLateIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java index 8caeea3a1..4695b0928 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java @@ -1,54 +1,53 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.LShiftIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class LShiftAVM2Item extends BinaryOpItem { - - public LShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); - } - - @Override - public Object getResult() { - return ((int) (double) EcmaScript.toNumber(leftSide.getResult())) << ((int) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new LShiftIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.LShiftIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class LShiftAVM2Item extends BinaryOpItem { + + public LShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); + } + + @Override + public Object getResult() { + return ((int) (double) EcmaScript.toNumber(leftSide.getResult())) << ((int) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new LShiftIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java index 434db80eb..f2d5fc8b9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LeAVM2Item.java @@ -1,79 +1,78 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessEqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLeIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class LeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public LeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfLeIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfNLeIns(); - } - - @Override - public GraphTargetItem invert() { - return new GtAVM2Item(src, leftSide, rightSide); - } - - @Override - public Object getResult() { - Object ret = EcmaScript.compare(rightSide.getResult(), leftSide.getResult()); - if (ret == Boolean.TRUE) { - return Boolean.FALSE; - } - if (ret == Boolean.FALSE) { - return Boolean.TRUE; - } - return ret;//undefined - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new LessEqualsIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessEqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class LeAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public LeAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfLeIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfNLeIns(); + } + + @Override + public GraphTargetItem invert() { + return new GtAVM2Item(src, leftSide, rightSide); + } + + @Override + public Object getResult() { + Object ret = EcmaScript.compare(rightSide.getResult(), leftSide.getResult()); + if (ret == Boolean.TRUE) { + return Boolean.FALSE; + } + if (ret == Boolean.FALSE) { + return Boolean.TRUE; + } + return ret;//undefined + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new LessEqualsIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java index 7181fb260..c2f0ec4d6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LtAVM2Item.java @@ -1,72 +1,71 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessThanIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLtIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLtIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class LtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public LtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfLtIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfNLtIns(); - } - - @Override - public GraphTargetItem invert() { - return new GeAVM2Item(src, leftSide, rightSide); - } - - @Override - public Object getResult() { - return EcmaScript.compare(leftSide.getResult(), rightSide.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new LessThanIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessThanIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLtIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class LtAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public LtAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_RELATIONAL, leftSide, rightSide, "<"); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfLtIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfNLtIns(); + } + + @Override + public GraphTargetItem invert() { + return new GeAVM2Item(src, leftSide, rightSide); + } + + @Override + public Object getResult() { + return EcmaScript.compare(leftSide.getResult(), rightSide.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new LessThanIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java index efee63016..a63b3fccc 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java @@ -1,80 +1,79 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.ModuloIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class ModuloAVM2Item extends BinaryOpItem { - - public ModuloAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); - } - - @Override - public Object getResult() { - if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { - return Double.NaN; - } - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) % ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new ModuloIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.ModuloIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class ModuloAVM2Item extends BinaryOpItem { + + public ModuloAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); + } + + @Override + public Object getResult() { + if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { + return Double.NaN; + } + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) % ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new ModuloIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java similarity index 75% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java index c050fe8b3..ea230f896 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.MultiplyIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class MultiplyAVM2Item extends BinaryOpItem { - - public MultiplyAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); - } - - @Override - public Object getResult() { - return (EcmaScript.toNumber(leftSide.getResult())) * (EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (rightSide instanceof ModuloAVM2Item) { - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new MultiplyIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.MultiplyIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class MultiplyAVM2Item extends BinaryOpItem { + + public MultiplyAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); + } + + @Override + public Object getResult() { + return (EcmaScript.toNumber(leftSide.getResult())) * (EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (rightSide instanceof ModuloAVM2Item) { + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new MultiplyIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java similarity index 65% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java index f7ec96b8e..5bad42183 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NegAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NegateIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class NegAVM2Item extends UnaryOpItem { - - public NegAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "-"); - } - - @Override - public Object getResult() { - return -EcmaScript.toNumber(value.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, - new AVM2Instruction(0, new NegateIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NegateIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class NegAVM2Item extends UnaryOpItem { + + public NegAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_UNARY, value, "-"); + } + + @Override + public Object getResult() { + return -EcmaScript.toNumber(value.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, + new AVM2Instruction(0, new NegateIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java index 8f0f2b89a..8e0566d8f 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/NeqAVM2Item.java @@ -1,74 +1,73 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NotIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.EqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfEqIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public NeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfNeIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfEqIns(); - } - - @Override - public Object getResult() { - return !EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); - } - - @Override - public GraphTargetItem invert() { - return new EqAVM2Item(src, leftSide, rightSide); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new EqualsIns(), new int[]{}, new byte[0]), - new AVM2Instruction(0, new NotIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.EqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public NeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfNeIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfEqIns(); + } + + @Override + public Object getResult() { + return !EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); + } + + @Override + public GraphTargetItem invert() { + return new EqAVM2Item(src, leftSide, rightSide); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new EqualsIns(), new int[]{}, new byte[0]), + new AVM2Instruction(0, new NotIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java similarity index 70% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java index 6f13ea511..50f90a2e0 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreDecrementAVM2Item.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import java.util.ArrayList; -import java.util.List; - -public class PreDecrementAVM2Item extends UnaryOpItem implements AssignmentAVM2Item { - - public PreDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "--"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (value instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, true, true); - } - return new ArrayList<>(); //? - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (value instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, true, false); - } - return new ArrayList<>(); //? - } - - @Override - public GraphTargetItem returnType() { - return value.returnType(); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import java.util.ArrayList; +import java.util.List; + +public class PreDecrementAVM2Item extends UnaryOpItem implements AssignmentAVM2Item { + + public PreDecrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_UNARY, object, "--"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (value instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, true, true); + } + return new ArrayList<>(); //? + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (value instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, true, false); + } + return new ArrayList<>(); //? + } + + @Override + public GraphTargetItem returnType() { + return value.returnType(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java similarity index 69% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java index e84c25715..5e756d091 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/PreIncrementAVM2Item.java @@ -1,61 +1,60 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import java.util.ArrayList; -import java.util.List; - -public class PreIncrementAVM2Item extends UnaryOpItem { - - public PreIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "++"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (value instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, false, true); - } - return new ArrayList<>(); //? - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (value instanceof AssignableAVM2Item) { - return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, false, false); - } - return new ArrayList<>(); //? - } - - @Override - public GraphTargetItem returnType() { - return value.returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import java.util.ArrayList; +import java.util.List; + +public class PreIncrementAVM2Item extends UnaryOpItem { + + public PreIncrementAVM2Item(AVM2Instruction instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_UNARY, object, "++"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (value instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, false, true); + } + return new ArrayList<>(); //? + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (value instanceof AssignableAVM2Item) { + return ((AssignableAVM2Item) value).toSourceChange(localData, generator, false, false, false); + } + return new ArrayList<>(); //? + } + + @Override + public GraphTargetItem returnType() { + return value.returnType(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java index a5fc92ac8..fbf2c9127 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.RShiftIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class RShiftAVM2Item extends BinaryOpItem { - - public RShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new RShiftIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.RShiftIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class RShiftAVM2Item extends BinaryOpItem { + + public RShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new RShiftIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java index c11593681..2ef3e5efe 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictEqAVM2Item.java @@ -1,75 +1,74 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.StrictEqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictEqIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictNeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class StrictEqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public StrictEqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfStrictEqIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfStrictNeIns(); - } - - @Override - public Object getResult() { - Object x = leftSide.getResult(); - Object y = rightSide.getResult(); - return EcmaScript.type(x) == EcmaScript.type(y) - && EcmaScript.equals(x, y); - } - - @Override - public GraphTargetItem invert() { - return new StrictNeqAVM2Item(src, leftSide, rightSide); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new StrictEqualsIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.StrictEqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictNeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class StrictEqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public StrictEqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfStrictEqIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfStrictNeIns(); + } + + @Override + public Object getResult() { + Object x = leftSide.getResult(); + Object y = rightSide.getResult(); + return EcmaScript.type(x) == EcmaScript.type(y) + && EcmaScript.equals(x, y); + } + + @Override + public GraphTargetItem invert() { + return new StrictNeqAVM2Item(src, leftSide, rightSide); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new StrictEqualsIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java index 4a10c3b3a..f70496f6e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/StrictNeqAVM2Item.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NotIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.StrictEqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictEqIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictNeIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { - - public StrictNeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); - } - - @Override - public InstructionDefinition getIfDefinition() { - return new IfStrictNeIns(); - } - - @Override - public InstructionDefinition getIfNotDefinition() { - return new IfStrictEqIns(); - } - - @Override - public GraphTargetItem invert() { - return new StrictEqAVM2Item(src, leftSide, rightSide); - } - - @Override - public Object getResult() { - Object x = leftSide.getResult(); - Object y = rightSide.getResult(); - return EcmaScript.type(x) != EcmaScript.type(y) - || (!EcmaScript.equals(x, y)); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new StrictEqualsIns(), new int[]{}, new byte[0]), - new AVM2Instruction(0, new NotIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("Boolean"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.StrictEqualsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictNeIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition { + + public StrictNeqAVM2Item(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); + } + + @Override + public InstructionDefinition getIfDefinition() { + return new IfStrictNeIns(); + } + + @Override + public InstructionDefinition getIfNotDefinition() { + return new IfStrictEqIns(); + } + + @Override + public GraphTargetItem invert() { + return new StrictEqAVM2Item(src, leftSide, rightSide); + } + + @Override + public Object getResult() { + Object x = leftSide.getResult(); + Object y = rightSide.getResult(); + return EcmaScript.type(x) != EcmaScript.type(y) + || (!EcmaScript.equals(x, y)); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new StrictEqualsIns(), new int[]{}, new byte[0]), + new AVM2Instruction(0, new NotIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("Boolean"); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java similarity index 79% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java index a45668d22..557dfe084 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java @@ -1,88 +1,87 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.SubtractIns; -import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class SubtractAVM2Item extends BinaryOpItem { - - public SubtractAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(leftSide.getResult()) - EcmaScript.toNumber(rightSide.getResult()); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (rightSide instanceof IntegerValueAVM2Item) { - IntegerValueAVM2Item iv = (IntegerValueAVM2Item) rightSide; - if (iv.value == 1) { - return toSourceMerge(localData, generator, leftSide, - new AVM2Instruction(0, new DecrementIns(), new int[]{}, new byte[0]) - ); - } - } - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new SubtractIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.SubtractIns; +import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class SubtractAVM2Item extends BinaryOpItem { + + public SubtractAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(leftSide.getResult()) - EcmaScript.toNumber(rightSide.getResult()); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (rightSide instanceof IntegerValueAVM2Item) { + IntegerValueAVM2Item iv = (IntegerValueAVM2Item) rightSide; + if (iv.value == 1) { + return toSourceMerge(localData, generator, leftSide, + new AVM2Instruction(0, new DecrementIns(), new int[]{}, new byte[0]) + ); + } + } + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new SubtractIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java index e750242c6..95d59f6c8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java @@ -1,82 +1,81 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.TypeOfIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.ecma.EcmaType; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; -import java.util.Set; - -public class TypeOfAVM2Item extends UnaryOpItem { - - public TypeOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "typeof "); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - Object res = value.getResult(); - EcmaType type = EcmaScript.type(res); - switch (type) { - case UNDEFINED: - return "undefined"; - case NULL: - return "object"; - case BOOLEAN: - return "Boolean"; - case NUMBER: - return "number"; - case STRING: - return "string"; - case OBJECT: - return "object"; - - } - //TODO: function,xml - return "object"; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, - new AVM2Instruction(0, new TypeOfIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.TypeOfIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.ecma.EcmaType; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; +import java.util.Set; + +public class TypeOfAVM2Item extends UnaryOpItem { + + public TypeOfAVM2Item(AVM2Instruction instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_UNARY, value, "typeof "); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + Object res = value.getResult(); + EcmaType type = EcmaScript.type(res); + switch (type) { + case UNDEFINED: + return "undefined"; + case NULL: + return "object"; + case BOOLEAN: + return "Boolean"; + case NUMBER: + return "number"; + case STRING: + return "string"; + case OBJECT: + return "object"; + + } + //TODO: function,xml + return "object"; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, + new AVM2Instruction(0, new TypeOfIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java similarity index 67% rename from src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java index f61e8f47b..3c052fd0d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.URShiftIns; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class URShiftAVM2Item extends BinaryOpItem { - - public URShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >>> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, - new AVM2Instruction(0, new URShiftIns(), new int[]{}, new byte[0]) - ); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.URShiftIns; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class URShiftAVM2Item extends BinaryOpItem { + + public URShiftAVM2Item(AVM2Instruction instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >>> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, + new AVM2Instruction(0, new URShiftIns(), new int[]{}, new byte[0]) + ); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java new file mode 100644 index 000000000..8c0c72a3a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser; + +public class ParseException extends Exception { + + public long line; + public String text; + + public ParseException(String text, long line) { + super("ParseException:" + text + " on line " + line); + this.line = line; + this.text = text; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java similarity index 98% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java index 75b245c38..4e9603be9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java similarity index 97% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java index f1bddc364..6e27c2816 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java @@ -1,3560 +1,3556 @@ -/* The following code was generated by JFlex 1.4.3 on 2013.12.14. 19:20 */ - -/* Flash assembler language lexer specification */ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; - -import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException; -import java.util.Stack; - -/** - * This class is a scanner generated by - * JFlex 1.4.3 on 2013.12.14. 19:20 from the - * specification file - * D:/Dropbox/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/flasm3.flex - */ -public final class Flasm3Lexer { - - /** - * This character denotes the end of file - */ - public static final int YYEOF = -1; - - /** - * initial size of the lookahead buffer - */ - private static final int ZZ_BUFFERSIZE = 16384; - - /** - * lexical states - */ - public static final int STRING = 2; - public static final int YYINITIAL = 0; - public static final int PARAMETERS = 4; - - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the - * beginning of a line l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1, 2, 2 - }; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED - = "\11\12\1\4\1\2\1\0\1\4\1\1\16\12\4\0\1\53\1\0" - + "\1\76\1\0\1\11\2\0\1\111\1\101\1\102\1\0\1\24\1\107" - + "\1\20\1\21\1\0\1\17\3\112\4\25\1\110\1\7\1\16\1\3" - + "\1\103\1\0\1\104\2\0\1\47\1\70\1\31\1\54\1\22\1\62" - + "\1\56\1\74\1\37\1\11\1\72\1\64\1\5\1\43\1\41\1\33" - + "\1\77\1\51\1\45\1\35\1\66\1\105\1\11\1\27\1\60\1\11" - + "\1\6\1\26\1\10\1\0\1\15\1\0\1\50\1\71\1\32\1\55" - + "\1\23\1\63\1\57\1\75\1\40\1\14\1\73\1\65\1\13\1\44" - + "\1\42\1\34\1\100\1\52\1\46\1\36\1\67\1\106\1\14\1\30" - + "\1\61\1\14\4\0\41\12\2\0\4\11\4\0\1\11\2\0\1\12" - + "\7\0\1\11\4\0\1\11\5\0\27\11\1\0\37\11\1\0\u01ca\11" - + "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12" - + "\5\11\1\0\2\11\2\0\4\11\10\0\1\11\1\0\3\11\1\0" - + "\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0\5\12\2\0" - + "\236\11\11\0\46\11\2\0\1\11\7\0\47\11\11\0\55\12\1\0" - + "\1\12\1\0\2\12\1\0\2\12\1\0\1\12\10\0\33\11\5\0" - + "\3\11\15\0\4\12\7\0\1\11\4\0\13\12\5\0\53\11\37\12" - + "\4\0\2\11\1\12\143\11\1\0\1\11\10\12\1\0\6\12\2\11" - + "\2\12\1\0\4\12\2\11\12\12\3\11\2\0\1\11\17\0\1\12" - + "\1\11\1\12\36\11\33\12\2\0\131\11\13\12\1\11\16\0\12\12" - + "\41\11\11\12\2\11\4\0\1\11\5\0\26\11\4\12\1\11\11\12" - + "\1\11\3\12\1\11\5\12\22\0\31\11\3\12\244\0\4\12\66\11" - + "\3\12\1\11\22\12\1\11\7\12\12\11\2\12\2\0\12\12\1\0" - + "\7\11\1\0\7\11\1\0\3\12\1\0\10\11\2\0\2\11\2\0" - + "\26\11\1\0\7\11\1\0\1\11\3\0\4\11\2\0\1\12\1\11" - + "\7\12\2\0\2\12\2\0\3\12\1\11\10\0\1\12\4\0\2\11" - + "\1\0\3\11\2\12\2\0\12\12\4\11\7\0\1\11\5\0\3\12" - + "\1\0\6\11\4\0\2\11\2\0\26\11\1\0\7\11\1\0\2\11" - + "\1\0\2\11\1\0\2\11\2\0\1\12\1\0\5\12\4\0\2\12" - + "\2\0\3\12\3\0\1\12\7\0\4\11\1\0\1\11\7\0\14\12" - + "\3\11\1\12\13\0\3\12\1\0\11\11\1\0\3\11\1\0\26\11" - + "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\10\12" - + "\1\0\3\12\1\0\3\12\2\0\1\11\17\0\2\11\2\12\2\0" - + "\12\12\1\0\1\11\17\0\3\12\1\0\10\11\2\0\2\11\2\0" - + "\26\11\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11" - + "\7\12\2\0\2\12\2\0\3\12\10\0\2\12\4\0\2\11\1\0" - + "\3\11\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0" - + "\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0" - + "\2\11\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0" - + "\3\12\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0" - + "\1\11\7\0\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0" - + "\12\11\1\0\5\11\3\0\1\11\7\12\1\0\3\12\1\0\4\12" - + "\7\0\2\12\1\0\2\11\6\0\2\11\2\12\2\0\12\12\22\0" - + "\2\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0" - + "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0" - + "\2\12\7\0\1\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11" - + "\17\0\2\12\1\0\10\11\1\0\3\11\1\0\51\11\2\0\1\11" - + "\7\12\1\0\3\12\1\0\4\12\1\11\10\0\1\12\10\0\2\11" - + "\2\12\2\0\12\12\12\0\6\11\2\0\2\12\1\0\22\11\3\0" - + "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0" - + "\6\12\1\0\1\12\1\0\10\12\22\0\2\12\15\0\60\11\1\12" - + "\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0\2\11\1\0" - + "\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0" - + "\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1\0" - + "\4\11\1\12\2\11\6\12\1\0\2\12\1\11\2\0\5\11\1\0" - + "\1\11\1\0\6\12\2\0\12\12\2\0\2\11\42\0\1\11\27\0" - + "\2\12\6\0\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0" - + "\2\12\10\11\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12" - + "\1\0\44\12\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0" - + "\6\11\4\12\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12" - + "\15\11\14\12\1\11\17\12\2\0\46\11\12\0\53\11\1\0\1\11" - + "\3\0\u0149\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11" - + "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11" - + "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11" - + "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\125\11\14\0\u026c\11" - + "\2\0\21\11\1\0\32\11\5\0\113\11\3\0\3\11\17\0\15\11" - + "\1\0\4\11\3\12\13\0\22\11\3\12\13\0\22\11\2\12\14\0" - + "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11" - + "\3\0\2\11\1\12\2\0\12\12\41\0\3\12\2\0\12\12\6\0" - + "\130\11\10\0\51\11\1\12\1\11\5\0\106\11\12\0\35\11\3\0" - + "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11" - + "\4\0\21\12\7\11\2\12\6\0\12\12\46\0\27\11\5\12\4\0" - + "\65\11\12\12\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11" - + "\130\0\5\12\57\11\21\12\7\11\4\0\12\12\21\0\11\12\14\0" - + "\3\12\36\11\12\12\3\0\2\11\12\12\6\0\46\11\16\12\14\0" - + "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\122\0\3\12" - + "\1\0\25\12\4\11\1\12\4\11\1\12\15\0\300\11\47\12\25\0" - + "\4\12\u0116\11\2\0\6\11\2\0\46\11\2\0\6\11\2\0\10\11" - + "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\37\11\2\0\65\11" - + "\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11" - + "\2\0\6\11\4\0\15\11\5\0\3\11\1\0\7\11\16\0\5\12" - + "\32\0\5\12\20\0\2\11\23\0\1\11\13\0\5\12\5\0\6\12" - + "\1\0\1\11\15\0\1\11\20\0\15\11\3\0\32\11\26\0\15\12" - + "\4\0\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11" - + "\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11" - + "\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11" - + "\21\0\51\11\u0a77\0\57\11\1\0\57\11\1\0\205\11\6\0\4\11" - + "\3\12\16\0\46\11\12\0\66\11\11\0\1\11\17\0\1\12\27\11" - + "\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11" - + "\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0\1\11" - + "\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11\4\0" - + "\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11\5\0" - + "\51\11\3\0\136\11\21\0\33\11\65\0\20\11\u0200\0\u19b6\11\112\0" - + "\u51cc\11\64\0\u048d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12" - + "\2\11\24\0\57\11\1\12\14\0\2\12\1\0\31\11\10\0\120\11" - + "\2\12\45\0\11\11\2\0\147\11\2\0\4\11\1\0\2\11\16\0" - + "\12\11\120\0\10\11\1\12\3\11\1\12\4\11\1\12\27\11\5\12" - + "\20\0\1\11\7\0\64\11\14\0\2\12\62\11\21\12\13\0\12\12" - + "\6\0\22\12\6\11\3\0\1\11\4\0\12\12\34\11\10\12\2\0" - + "\27\11\15\12\14\0\35\11\3\0\4\12\57\11\16\12\16\0\1\11" - + "\12\12\46\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0" - + "\12\12\6\0\27\11\3\0\1\11\1\12\4\0\60\11\1\12\1\11" - + "\3\12\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11" - + "\43\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\1\0\7\11" - + "\221\0\43\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0" - + "\27\11\4\0\61\11\u2104\0\u012e\11\2\0\76\11\2\0\152\11\46\0" - + "\7\11\14\0\5\11\5\0\1\11\1\12\12\11\1\0\15\11\1\0" - + "\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\154\11\41\0" - + "\u016b\11\22\0\100\11\2\0\66\11\50\0\15\11\3\0\20\12\20\0" - + "\7\12\14\0\2\11\30\0\3\11\31\0\1\11\6\0\5\11\1\0" - + "\207\11\2\0\1\12\4\0\1\11\13\0\12\12\7\0\32\11\4\0" - + "\1\11\1\0\32\11\13\0\131\11\3\0\6\11\2\0\6\11\2\0" - + "\6\11\2\0\3\11\3\0\2\11\3\0\2\11\22\0\3\12\4\0"; - - /** - * Translates characters to character classes - */ - private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int[] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 - = "\3\0\4\1\2\2\1\1\1\2\1\1\1\2\1\1" - + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" - + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" - + "\1\2\1\3\2\4\1\1\1\5\2\6\1\7\1\10" - + "\1\11\1\12\1\13\1\10\1\12\2\1\16\10\1\14" - + "\1\10\1\15\1\16\1\17\1\20\1\10\1\21\1\0" - + "\1\22\2\0\2\2\1\0\1\2\1\0\1\2\1\0" - + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" - + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" - + "\1\2\1\23\2\24\1\25\1\26\1\27\1\30\1\31" - + "\1\32\1\33\1\34\1\0\2\10\1\35\1\0\1\35" - + "\1\0\5\10\1\36\33\10\2\0\2\2\1\0\1\2" - + "\1\0\1\2\1\0\1\2\1\0\1\37\1\2\1\37" - + "\1\0\1\2\1\0\1\2\1\0\1\2\1\0\1\2" - + "\1\0\1\2\1\0\1\2\1\0\1\2\1\24\1\0" - + "\2\10\1\35\1\0\41\10\2\0\2\2\1\0\1\2" - + "\2\40\1\0\1\2\1\0\1\2\1\0\1\2\1\0" - + "\1\2\2\41\1\0\1\2\2\42\1\0\1\2\2\43" - + "\1\0\12\10\1\44\1\45\4\10\1\46\1\47\3\10" - + "\1\50\7\10\1\51\1\10\1\52\5\10\3\0\3\2" - + "\1\0\1\2\2\53\2\54\1\0\1\2\1\0\1\2" - + "\1\0\1\2\1\0\1\2\1\55\4\10\1\56\1\57" - + "\23\10\1\60\1\61\5\10\1\62\1\63\1\64\2\0" - + "\1\64\2\2\1\0\1\2\1\0\1\2\1\0\1\2" - + "\1\0\1\2\1\0\1\2\1\0\1\2\1\10\1\64" - + "\5\10\1\65\10\10\1\66\1\10\1\67\2\10\1\70" - + "\1\71\1\72\5\10\1\73\2\0\2\2\1\0\1\2" - + "\1\0\1\2\1\0\1\2\1\0\1\2\2\74\1\0" - + "\1\2\7\10\1\75\10\10\1\76\1\77\5\10\1\0" - + "\1\100\1\2\1\100\1\0\1\2\1\0\1\2\1\0" - + "\1\2\2\101\1\0\1\2\1\102\1\10\1\103\4\10" - + "\1\104\1\10\1\105\4\10\1\106\1\10\1\107\1\110" - + "\1\111\1\112\3\10\1\0\1\2\1\0\1\2\2\113" - + "\1\0\1\2\1\0\1\2\1\114\10\10\1\115\1\116" - + "\1\10\1\117\1\120\2\10\1\0\1\2\3\0\3\2" - + "\1\0\1\2\2\121\1\122\1\123\13\10\1\0\1\2" - + "\3\0\3\2\1\0\1\2\1\124\5\10\1\125\5\10" - + "\1\0\1\2\3\0\3\2\1\0\1\2\11\10\1\126" - + "\2\127\3\0\2\2\1\0\1\2\11\10\4\0\2\2" - + "\2\130\6\10\1\131\2\10\1\132\2\0\1\2\5\10" - + "\1\133\1\10\1\134\3\0\2\10\1\135\1\136\2\10" - + "\2\0\1\137\1\140\1\141\1\10\1\142\1\143\1\144"; - - private static int[] zzUnpackAction() { - int[] result = new int[616]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - /** - * Translates a state to a row index in the transition table - */ - private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 - = "\0\0\0\113\0\226\0\341\0\u012c\0\u0177\0\u01c2\0\u020d" - + "\0\u0258\0\u02a3\0\u02ee\0\u0339\0\u0384\0\u03cf\0\u041a\0\u0465" - + "\0\u04b0\0\u04fb\0\u0546\0\u0591\0\u05dc\0\u0627\0\u0672\0\u06bd" - + "\0\u0708\0\u0753\0\u079e\0\u07e9\0\u0834\0\u087f\0\u08ca\0\u0915" - + "\0\u0960\0\341\0\u09ab\0\341\0\u09f6\0\341\0\u0a41\0\u0a8c" - + "\0\341\0\u0ad7\0\341\0\u0b22\0\u0b6d\0\u0bb8\0\u0c03\0\u0c4e" - + "\0\u0c99\0\u0ce4\0\u0d2f\0\u0d7a\0\u0dc5\0\u0e10\0\u0e5b\0\u0ea6" - + "\0\u0ef1\0\u0f3c\0\u0f87\0\u0fd2\0\u101d\0\341\0\u1068\0\341" - + "\0\341\0\341\0\341\0\u10b3\0\341\0\u01c2\0\341\0\u10fe" - + "\0\u1149\0\u1194\0\u11df\0\u122a\0\u1275\0\u12c0\0\u130b\0\u1356" - + "\0\u13a1\0\u13ec\0\u1437\0\u1482\0\u14cd\0\u1518\0\u1563\0\u15ae" - + "\0\u15f9\0\u1644\0\u168f\0\u16da\0\u1725\0\u1770\0\u17bb\0\u1806" - + "\0\u1851\0\341\0\u189c\0\u18e7\0\341\0\341\0\341\0\341" - + "\0\341\0\341\0\341\0\341\0\u1932\0\u197d\0\u19c8\0\u1a13" - + "\0\u1a5e\0\u0b6d\0\u0c03\0\u1aa9\0\u1af4\0\u1b3f\0\u1b8a\0\u1bd5" - + "\0\u0b22\0\u1c20\0\u1c6b\0\u1cb6\0\u1d01\0\u1d4c\0\u1d97\0\u1de2" - + "\0\u1e2d\0\u1e78\0\u1ec3\0\u1f0e\0\u1f59\0\u1fa4\0\u1fef\0\u203a" - + "\0\u2085\0\u20d0\0\u211b\0\u2166\0\u21b1\0\u21fc\0\u2247\0\u2292" - + "\0\u22dd\0\u2328\0\u2373\0\u23be\0\u2409\0\u2454\0\u249f\0\u24ea" - + "\0\u2535\0\u2580\0\u25cb\0\u2616\0\u2661\0\u26ac\0\u26f7\0\u01c2" - + "\0\u2742\0\u0258\0\u278d\0\u27d8\0\u2823\0\u286e\0\u28b9\0\u2904" - + "\0\u294f\0\u299a\0\u29e5\0\u2a30\0\u2a7b\0\u2ac6\0\u2b11\0\u2b5c" - + "\0\341\0\u2ba7\0\u2bf2\0\u2c3d\0\u2c88\0\u2c88\0\u2cd3\0\u2d1e" - + "\0\u2d69\0\u2db4\0\u2dff\0\u2e4a\0\u2e95\0\u2ee0\0\u2f2b\0\u2f76" - + "\0\u2fc1\0\u300c\0\u3057\0\u30a2\0\u30ed\0\u3138\0\u3183\0\u31ce" - + "\0\u3219\0\u3264\0\u32af\0\u32fa\0\u3345\0\u3390\0\u33db\0\u3426" - + "\0\u3471\0\u34bc\0\u3507\0\u3552\0\u359d\0\u35e8\0\u3633\0\u367e" - + "\0\u36c9\0\u3714\0\u375f\0\u37aa\0\u37f5\0\u01c2\0\u0258\0\u3840" - + "\0\u388b\0\u38d6\0\u3921\0\u396c\0\u39b7\0\u3a02\0\u3a4d\0\u01c2" - + "\0\u0258\0\u3a98\0\u3ae3\0\u01c2\0\u0258\0\u3b2e\0\u3b79\0\u01c2" - + "\0\u0258\0\u3bc4\0\u3c0f\0\u3c5a\0\u3ca5\0\u3cf0\0\u3d3b\0\u3d86" - + "\0\u3dd1\0\u3e1c\0\u3e67\0\u3eb2\0\u0b22\0\u3efd\0\u3f48\0\u3f93" - + "\0\u3fde\0\u4029\0\u4074\0\u0b22\0\u40bf\0\u410a\0\u4155\0\u41a0" - + "\0\u41eb\0\u4236\0\u4281\0\u42cc\0\u4317\0\u4362\0\u43ad\0\u0b22" - + "\0\u43f8\0\u0b22\0\u4443\0\u448e\0\u44d9\0\u4524\0\u456f\0\u45ba" - + "\0\u4605\0\u4650\0\u469b\0\u46e6\0\u4731\0\u477c\0\u47c7\0\u4812" - + "\0\u485d\0\u01c2\0\u0258\0\u48a8\0\u48f3\0\u493e\0\u4989\0\u49d4" - + "\0\u4a1f\0\u4a6a\0\u4ab5\0\341\0\u4b00\0\u4b4b\0\u4b96\0\u4be1" - + "\0\u0b22\0\u0b22\0\u4c2c\0\u4c77\0\u4cc2\0\u4d0d\0\u4d58\0\u4da3" - + "\0\u4dee\0\u4e39\0\u4e84\0\u4ecf\0\u4f1a\0\u4f65\0\u4fb0\0\u4ffb" - + "\0\u5046\0\u5091\0\u50dc\0\u5127\0\u5172\0\u0b22\0\u0b22\0\u51bd" - + "\0\u5208\0\u5253\0\u529e\0\u52e9\0\u5334\0\u0b22\0\u01c2\0\u537f" - + "\0\u53ca\0\u0258\0\u5415\0\u5460\0\u54ab\0\u54f6\0\u5541\0\u558c" - + "\0\u55d7\0\u5622\0\u566d\0\u56b8\0\u5703\0\u574e\0\u5799\0\u57e4" - + "\0\u582f\0\u0b22\0\u587a\0\u58c5\0\u5910\0\u595b\0\u59a6\0\u0b22" - + "\0\u59f1\0\u5a3c\0\u5a87\0\u5ad2\0\u5b1d\0\u5b68\0\u5bb3\0\u5bfe" - + "\0\u0b22\0\u5c49\0\u0b22\0\u5c94\0\u5cdf\0\u0b22\0\u0b22\0\u0b22" - + "\0\u5d2a\0\u5d75\0\u5dc0\0\u5e0b\0\u5e56\0\u0b22\0\u5ea1\0\u5eec" - + "\0\u5f37\0\u5f82\0\u5fcd\0\u6018\0\u6063\0\u60ae\0\u60f9\0\u6144" - + "\0\u618f\0\u61da\0\u01c2\0\u0258\0\u6225\0\u6270\0\u62bb\0\u6306" - + "\0\u6351\0\u639c\0\u63e7\0\u6432\0\u647d\0\u0b22\0\u64c8\0\u6513" - + "\0\u655e\0\u65a9\0\u65f4\0\u663f\0\u668a\0\u66d5\0\u6720\0\u0b22" - + "\0\u676b\0\u67b6\0\u6801\0\u684c\0\u6897\0\u68e2\0\u01c2\0\u692d" - + "\0\u0258\0\u6978\0\u69c3\0\u6a0e\0\u6a59\0\u6aa4\0\u6aef\0\u01c2" - + "\0\u0258\0\u6b3a\0\u6b85\0\u0b22\0\u6bd0\0\u6c1b\0\u6c66\0\u6cb1" - + "\0\u6cfc\0\u6d47\0\u0b22\0\u6d92\0\u0b22\0\u6ddd\0\u6e28\0\u6e73" - + "\0\u6ebe\0\u0b22\0\u6f09\0\u0b22\0\u6f54\0\u0b22\0\u0b22\0\u6f9f" - + "\0\u6fea\0\u7035\0\u7080\0\u70cb\0\u7116\0\u7161\0\u01c2\0\u0258" - + "\0\u71ac\0\u71f7\0\u7242\0\u728d\0\u72d8\0\u7323\0\u736e\0\u73b9" - + "\0\u7404\0\u744f\0\u749a\0\u74e5\0\u7530\0\u0b22\0\u0b22\0\u757b" - + "\0\u0b22\0\u0b22\0\u75c6\0\u7611\0\u765c\0\u76a7\0\u76f2\0\u773d" - + "\0\u7788\0\u77d3\0\u781e\0\u7869\0\u78b4\0\u78ff\0\u01c2\0\u0258" - + "\0\u0b22\0\u794a\0\u7995\0\u79e0\0\u7a2b\0\u7a76\0\u7ac1\0\u7b0c" - + "\0\u7b57\0\u7ba2\0\u7bed\0\u7c38\0\u7c83\0\u7cce\0\u7d19\0\u7d64" - + "\0\u7daf\0\u7dfa\0\u7e45\0\u7e90\0\u7edb\0\u7f26\0\u7f71\0\u0b22" - + "\0\u7fbc\0\u8007\0\u8052\0\u809d\0\u80e8\0\u0b22\0\u8133\0\u817e" - + "\0\u81c9\0\u8214\0\u825f\0\u82aa\0\u82f5\0\u8340\0\u838b\0\u83d6" - + "\0\u8421\0\u846c\0\u84b7\0\u8502\0\u854d\0\u8598\0\u85e3\0\u862e" - + "\0\u8679\0\u86c4\0\u870f\0\u875a\0\u87a5\0\u87f0\0\u0b22\0\u01c2" - + "\0\u0258\0\u883b\0\u8886\0\u88d1\0\u891c\0\u8967\0\u89b2\0\u89fd" - + "\0\u8a48\0\u8a93\0\u8ade\0\u8b29\0\u8b74\0\u8bbf\0\u8c0a\0\u8c55" - + "\0\u8ca0\0\u8ceb\0\u8d36\0\u8d81\0\u8dcc\0\u8e17\0\u8e62\0\u01c2" - + "\0\u0258\0\u8ead\0\u8ef8\0\u8f43\0\u8f8e\0\u8fd9\0\u9024\0\u0b22" - + "\0\u906f\0\u90ba\0\341\0\u9105\0\u9150\0\u919b\0\u91e6\0\u9231" - + "\0\u927c\0\u92c7\0\u9312\0\u0b22\0\u935d\0\u0b22\0\u93a8\0\u93f3" - + "\0\u943e\0\u9489\0\u94d4\0\u0b22\0\u0b22\0\u951f\0\u956a\0\u95b5" - + "\0\u9600\0\341\0\u0b22\0\u0b22\0\u964b\0\u0b22\0\341\0\u0b22"; - - private static int[] zzUnpackRowMap() { - int[] result = new int[616]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int[] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 - = "\4\4\1\5\1\6\3\4\1\7\1\4\1\10\1\11"+ - "\1\7\4\4\1\12\1\13\3\4\1\7\1\11\1\14"+ - "\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ - "\1\25\1\26\1\27\1\7\1\11\1\7\1\11\1\30"+ - "\1\31\1\5\1\7\1\11\1\7\1\11\1\7\1\11"+ - "\1\32\1\33\1\34\1\35\1\7\1\11\1\36\1\37"+ - "\1\7\1\11\1\7\1\11\1\4\1\7\1\11\4\4"+ - "\1\7\1\11\4\4\1\40\1\41\1\42\23\40\1\43"+ - "\47\40\1\44\14\40\1\4\1\45\1\46\1\47\1\4"+ - "\1\50\1\51\1\52\1\53\1\54\1\4\1\50\2\54"+ - "\1\4\1\55\1\56\1\57\2\60\1\4\1\52\1\4"+ - "\2\54\2\61\2\62\2\63\2\64\2\65\2\66\2\67"+ - "\2\54\2\70\1\4\2\71\2\72\2\54\2\73\2\54"+ - "\2\74\4\54\2\75\1\76\2\77\1\100\1\101\1\102"+ - "\1\103\2\104\1\105\1\52\1\4\1\52\117\0\1\5"+ - "\46\0\1\5\44\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\110\1\0\1\106\1\0\20\106"+ - "\2\111\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\110\1\112"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\111\1\113\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\2\114\22\106\1\0\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\114\1\115\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\12\106\2\116\10\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\116\1\117\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\20\106\2\120\2\106\1\0"+ - "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ - "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\120\1\121\1\106\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\22\106\2\122"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\122\1\123\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\14\106"+ - "\2\124\6\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\124"+ - "\1\125\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\4\106\2\126\16\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\126\1\127\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\20\106\2\130\2\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\130"+ - "\1\131\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\132\1\0\1\106\1\0\24\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\132\1\133\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\24\106\1\0\10\106"+ - "\2\134\10\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\134\1\135"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\12\106"+ - "\2\136\10\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\136\1\137\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\12\106\2\140\10\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\140"+ - "\1\141\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\1\40\2\0"+ - "\23\40\1\0\47\40\1\0\14\40\2\0\1\42\110\0"+ - "\2\142\1\0\14\142\1\143\5\142\1\144\1\145\6\142"+ - "\2\146\4\142\2\147\4\142\2\150\7\142\2\151\4\142"+ - "\2\152\4\142\1\153\12\142\1\154\1\143\2\0\1\46"+ - "\110\0\1\47\2\0\110\47\5\0\1\54\1\155\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\156\1\0\1\54"+ - "\1\0\24\54\1\0\12\54\2\157\6\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\52"+ - "\7\0\1\52\1\0\1\160\2\161\1\0\1\52\62\0"+ - "\1\52\1\0\1\52\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\7\0\1\162\7\0\1\162\1\0"+ - "\1\160\2\161\1\0\1\162\62\0\1\162\1\0\1\162"+ - "\7\0\1\52\7\0\1\162\1\0\1\163\3\0\1\52"+ - "\62\0\1\52\1\0\1\52\7\0\1\160\7\0\1\160"+ - "\5\0\1\160\62\0\1\160\1\0\1\160\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\2\164\22\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\12\54\2\165\10\54\1\0"+ - "\10\54\2\166\10\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\20\54\2\167\2\170\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\12\54\2\171\4\54\2\172\2\173\1\0"+ - "\4\54\2\174\14\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\14\54\2\175\6\54\1\0\2\54\2\176\16\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\177\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\200\1\0\1\54\1\0\20\54\2\201\2\54\1\0"+ - "\12\54\2\202\6\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\203\1\0\1\54\1\0"+ - "\6\54\2\204\14\54\1\0\10\54\2\205\10\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\6\54\2\206\14\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\207\1\0\1\54\1\0\10\54\2\210"+ - "\2\211\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\212\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\10\54\2\213\6\54\2\214\2\215\1\0\12\54"+ - "\2\216\6\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ - "\2\217\2\220\2\54\2\221\6\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\20\54\2\222\2\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\14\54\2\223"+ - "\6\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\20\54\2\224\2\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\6\106\2\225\14\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\2\226\22\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\225\1\227\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\226"+ - "\1\230\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\2\106\2\231\20\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\231\1\232\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ - "\1\0\2\233\20\106\1\0\2\106\4\0\2\106\1\0"+ - "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ - "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\233"+ - "\1\234\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\22\106\2\235\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\235\1\236\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\20\106\2\237\2\106\1\0\4\106\2\240\14\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\237"+ - "\1\241\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\240\1\242\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\10\106\2\243\12\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\243\1\244\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\6\106"+ - "\2\245\14\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\245\1\246\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\247\1\0\1\106"+ - "\1\0\2\106\1\247\2\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\247"+ - "\1\0\1\11\1\0\2\106\1\250\2\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\6\106\2\251\14\106\1\0"+ - "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ - "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\251\1\252"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\20\106\2\253"+ - "\2\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ - "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ - "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\253\1\254\1\106\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\2\106\2\255\20\106\1\0\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\255\1\256"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\24\106\1\0\2\257\20\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\257\1\260\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\17\0\1\144"+ - "\5\0\1\144\64\0\1\144\17\0\1\261\5\0\1\261"+ - "\64\0\1\261\7\0\1\262\7\0\1\262\5\0\1\262"+ - "\62\0\1\262\1\0\1\262\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\6\54\2\263\14\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\10\54\2\264\10\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\7\0\1\160\7\0\1\160\2\0\2\161\1\0\1\160"+ - "\62\0\1\160\1\0\1\160\7\0\1\265\7\0\1\265"+ - "\1\266\3\0\1\266\1\265\62\0\1\265\1\0\1\265"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\4\54\2\267\16\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ - "\2\270\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\20\54\2\271\2\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\2\54\2\272\20\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\10\54\2\273\2\274"+ - "\10\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\22\54\2\275\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\12\54\2\276\6\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\4\54\2\277\16\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\6\54\2\300\14\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ - "\2\301\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\302\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\303\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\304\1\0\1\54"+ - "\1\0\2\54\1\304\2\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\10\54\2\305\10\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\6\54\2\306\14\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\307\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\12\54\2\310\10\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\311"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\2\54\2\312\20\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\16\54\2\313\4\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ - "\1\0\12\54\2\314\6\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\6\54\2\315\14\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\14\54\2\316\6\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\10\54"+ - "\2\317\10\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ - "\2\320\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\14\54\2\321\6\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\6\54\2\322\12\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\14\54\2\323\6\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ - "\1\0\2\324\20\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\16\54\2\325\4\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\20\54\2\326\2\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\10\54\2\327"+ - "\10\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\24\106\1\0"+ - "\20\106\2\330\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\16\106"+ - "\2\331\4\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\330\1\332\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\331\1\333\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\334\1\0\1\106"+ - "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\334\1\335"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\336\1\0\1\106"+ - "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\336\1\337"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\20\106\2\340\2\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\340\1\341\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\10\106\2\342\12\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\342"+ - "\1\343\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\6\106\2\344\14\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\344"+ - "\1\345\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\10\106"+ - "\2\346\12\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\346\1\347\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\350\1\0\1\106"+ - "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\350\1\351"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\24\106\1\0\12\106\2\352\6\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\352\1\353\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\0\2\106\2\354\16\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\354\1\355"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\20\106\2\356\2\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\356\1\357\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ - "\1\0\4\106\2\360\14\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\360\1\361\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\7\0\1\262\1\362\6\0"+ - "\1\262\5\0\1\262\62\0\1\262\1\0\1\262\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\20\54\2\363\2\54\1\0"+ - "\20\54\2\364\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ - "\2\365\14\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\7\0\1\265\7\0\1\265"+ - "\5\0\1\265\62\0\1\265\1\0\1\265\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\10\54\2\366\10\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\16\54\2\367\4\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\16\54"+ - "\2\370\4\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\16\54\2\371\2\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\372\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\6\54\2\373\14\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\54"+ - "\2\374\16\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\375\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\376\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\377\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ - "\2\u0100\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\22\54\2\u0101\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\24\54\1\0\2\u0102\20\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u0103"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\10\54\2\u0104\10\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\4\54\1\u0105\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u0106"+ - "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\6\54\2\u0107\14\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u0108\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\14\54\2\u0109\6\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u010a"+ - "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\4\54\2\u010b\16\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\24\54\1\0\14\54\2\u010c\4\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\6\54\2\u010d\14\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u010e"+ - "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\16\54\2\u010f\4\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\u0110\1\0"+ - "\1\54\1\0\2\54\1\u0110\2\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\2\54\2\u0111\20\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\u0112\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u0113"+ - "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\u0114\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\4\54\1\u0115\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\u0116\1\0\1\54"+ - "\1\0\2\54\1\u0116\2\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\12\54\2\u0117\6\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\12\106\2\u0118\10\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\2\106"+ - "\2\u0119\2\106\2\u011a\14\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0118"+ - "\1\u011b\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\u0119"+ - "\1\u011c\1\106\1\11\1\u011a\1\u011d\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\4\106\2\u011e\16\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\u011e\1\u011f\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\u0120\1\0\1\106\1\0\2\106\1\u0120\2\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\u0120\1\0\1\11\1\0\2\106"+ - "\1\u0121\2\11\1\107\1\11\2\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\6\106\2\u0122\14\106\1\0\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u0122\1\u0123\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\16\106\2\u0124\4\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\u0124\1\u0125\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\12\106\2\u0126\10\106\1\0"+ - "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ - "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u0126\1\u0127\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\22\106\2\u0128"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0128\1\u0129\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ - "\1\0\10\106\2\u012a\10\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\u012a\1\u012b\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\76\0\1\u012c\21\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\2\u012d\20\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\12\54\2\u012e\10\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u012f"+ - "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\10\54\2\u0130\12\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u0131\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\16\54\2\u0132\4\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u0133"+ - "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\20\54\2\u0134\2\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0135\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0136\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\14\54\2\u0137\6\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\2\54\2\u0138"+ - "\16\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\22\54\2\u0139"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\22\54"+ - "\2\u013a\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\4\54\1\u013b\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\16\54\2\u013c\4\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\2\u013d\20\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u013e\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\10\54\2\u013f\12\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u0140"+ - "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\20\54\2\u0141\2\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\u0142\1\0"+ - "\1\54\1\0\2\54\1\u0142\2\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\10\54\2\u0143\12\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\10\54\2\u0144\10\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\u0145\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\10\54\2\u0146\10\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0147\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u0148\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u0149\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\6\54\2\u014a"+ - "\12\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\4\54\2\u014b"+ - "\4\54\2\u014c\10\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u014d\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u014e\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\24\106\1\0\2\u014f\20\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\12\106\2\u0150\10\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\20\106\2\u0151\2\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\u014f\1\u0152"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0150\1\u0153\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0151\1\u0154\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\6\106"+ - "\2\u0155\14\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0155\1\u0156\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\14\106\2\u0157\6\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0157\1\u0158\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\2\106\2\u0159\20\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\u0159\1\u015a\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\14\106\2\u015b\6\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\u015b\1\u015c\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\14\106"+ - "\2\u015d\6\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u015d"+ - "\1\u015e\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\2\106\2\u015f\20\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\u015f"+ - "\1\u0160\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u0161\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u0162"+ - "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\14\54\2\u0163"+ - "\6\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\2\54\2\u0164\20\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\24\54\1\0\2\54\2\u0165\16\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\6\54\2\u0166\14\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0167"+ - "\20\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\6\54\2\u0168\14\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\20\54\2\u0169\2\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u016a\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u016b\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\10\54\2\u016c\12\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u016d"+ - "\2\u016e\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\4\54\2\u016f\16\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\2\u0170\22\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\22\54\2\u0171\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\2\54\2\u0172\20\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\2\u0173\20\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\u0174\1\0\1\54\1\0\2\54"+ - "\1\u0174\2\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\20\54\2\u0175\2\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\2\u0176\20\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u0177\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\22\54\2\u0178\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\10\54\2\u0179\12\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ - "\1\0\2\54\2\u017a\16\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\10\54\2\u017b\12\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u017c\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\4\54\2\u017d\16\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\u017e\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\4\106\2\u017f\16\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\2\106\2\u0180\20\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\u017f\1\u0181\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\u0180\1\u0182\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\10\106\2\u0183\12\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0183\1\u0184\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\20\106"+ - "\2\u0185\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0185\1\u0186\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\12\106\2\u0187\10\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0187"+ - "\1\u0188\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\20\106\2\u0189\2\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0189"+ - "\1\u018a\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\16\106\2\u018b\4\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u018b"+ - "\1\u018c\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\12\106"+ - "\2\u018d\10\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\u018d\1\u018e\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\6\54\2\u018f\14\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u0190\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\10\54\2\u0191\12\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u0192\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u0193\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ - "\2\u0194\14\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\u0195\1\0\1\54"+ - "\1\0\2\54\1\u0195\2\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\22\54\2\u0196\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\4\54\1\u0197\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u0198"+ - "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0199"+ - "\16\54\2\u019a\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\u019b\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\20\54\2\u019c\2\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\14\54\2\u019d\6\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\4\54\2\u019e\16\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u019f\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ - "\1\0\10\54\2\u01a0\10\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\12\54\2\u01a1\10\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u01a2"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\14\54\2\u01a3\6\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\22\54\2\u01a4\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u01a5"+ - "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\u01a6\1\0\1\106\1\0"+ - "\24\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ - "\1\106\1\0\1\106\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\24\106\1\0\16\106\2\u01a7\2\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\u01a6"+ - "\1\u01a8\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u01a7"+ - "\1\u01a9\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\12\106\2\u01aa\10\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\u01aa\1\u01ab\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\u01ac\1\0\1\106\1\0\2\106\1\u01ac\2\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\24\106\1\0"+ - "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ - "\1\106\5\0\1\u01ac\1\0\1\11\1\0\2\106\1\u01ad"+ - "\2\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\4\106"+ - "\2\u01ae\16\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\u01ae"+ - "\1\u01af\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\24\106\1\0\10\106\2\u01b0\10\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u01b0\1\u01b1\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\0\12\106\2\u01b2\6\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\u01b2\1\u01b3"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\20\54\2\u01b4\2\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\u01b5\1\0\1\54\1\0\2\54"+ - "\1\u01b5\2\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\6\54\2\u01b6\14\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\10\54\2\u01b7\2\54\2\u01b8\6\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ - "\2\u01b9\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\u01ba\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\u01bb\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\22\54\2\u01bc\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u01bd\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u01be\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\2\54\2\u01bf"+ - "\16\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\16\54\2\u01c0"+ - "\4\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\2\54\2\u01c1\20\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\16\54\2\u01c2\4\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\22\54\2\u01c3\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\20\54\2\u01c4\2\54"+ - "\1\0\10\54\2\u01c5\10\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\14\54\2\u01c6\6\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\22\54\2\u01c7\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u01c8\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\20\54\2\u01c9\2\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u01ca"+ - "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\24\106\1\0\2\u01cb\20\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\u01cb\1\u01cc\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\14\106\2\u01cd\6\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u01cd\1\u01ce\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u01cf"+ - "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\u01cf\1\u01d0\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u01d1"+ - "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\u01d1\1\u01d2\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\14\106\2\u01d3\6\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u01d3\1\u01d4\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\u01d5\1\0\1\54\1\0\24\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\14\54\2\u01d6\6\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ - "\2\u01d7\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\20\54\2\u01d8\2\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u01d9\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u01da"+ - "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\u01db\1\0\1\54\1\0\24\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u01dc"+ - "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\12\54\2\u01dd\6\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u01de\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\u01df\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\12\54\2\u01e0\10\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u01e1"+ - "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\2\u01e2\20\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\u01e3\1\0\1\54"+ - "\1\0\2\54\1\u01e3\2\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\12\54\2\u01e4\10\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\u01e5\1\0\1\106\1\0\24\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\u01e5\1\u01e6\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\u01e7\1\0\1\106\1\0\6\106\2\u01e8\6\106"+ - "\2\u01e9\4\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\u01e7\1\u01ea"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u01e8\1\u01eb\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u01e9\1\u01ec\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\24\106\1\0\2\u01ed\20\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\u01ed\1\u01ee\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\6\106\2\u01ef\14\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\u01ef\1\u01f0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\20\54\2\u01f1\2\54\1\0"+ - "\10\54\2\u01f2\10\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\20\54\2\u01f3\2\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u01f4\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\u01f5\1\0\1\54\1\0\2\54\1\u01f5\2\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\u01f6\1\0\1\54\1\0\2\54\1\u01f6"+ - "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\14\54\2\u01f7\6\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\16\54\2\u01f8\4\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\u01f9\1\0\1\54\1\0\1\54\5\0"+ - "\1\u01fa\1\0\1\54\1\0\2\54\1\u01fa\2\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u01fb"+ - "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\4\54\1\u01fc\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\14\54\2\u01fd\6\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\4\106\2\u01fe\16\106\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\u01fe\1\u01ff\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\14\106\2\u0200\6\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\20\106"+ - "\2\u0201\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\6\106\2\u0202\14\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0200\1\u0203\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\u0201\1\u0204\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0202\1\u0205\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u0206"+ - "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\u0206\1\u0207\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u0208\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\u0209\1\0\1\54\1\0\2\54\1\u0209\2\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u020a\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u020b\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u020c\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\u020d\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\6\54\2\u020e\14\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u020f\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\u0210\1\0\1\54\1\0\24\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\u0211\1\0\1\54\1\0\24\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\14\54\2\u0212\6\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\u0213\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\6\106\2\u0214\14\106\1\0\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0214\1\u0215\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\0\2\u0216\20\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\22\106\2\u0217\1\0\22\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\20\106\2\u0218\2\106"+ - "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ - "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\u0216\1\u0219"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\u0217\1\u021a\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ - "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0218\1\u021b\1\106\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ - "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ - "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\4\106"+ - "\2\u021c\16\106\1\0\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ - "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\u021c"+ - "\1\u021d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ - "\1\0\1\11\1\0\1\11\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\u021e\1\0\1\54"+ - "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\22\54\2\u021f\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\16\54\2\u0220\4\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\16\54\2\u0221\4\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\u0222\1\0\1\54\1\0\2\54\1\u0222"+ - "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\6\54\2\u0223\14\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\14\54\2\u0224\6\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\2\54\2\u0225\20\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u0226"+ - "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\10\54\2\u0227\10\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\24\106\1\0\20\106\2\u0228\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u0228\1\u0229\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\u022a\22\106\1\0\2\106"+ - "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ - "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ - "\1\0\1\106\1\0\24\106\1\0\2\106\2\u022b\16\106"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ - "\2\0\2\106\1\0\1\106\1\0\22\106\2\u022c\1\0"+ - "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ - "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\u022a\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\u022b"+ - "\1\u022d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ - "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u022c\1\u022e\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ - "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ - "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ - "\1\106\2\0\2\106\1\0\1\106\1\0\6\106\2\u022f"+ - "\14\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ - "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ - "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\u022f\1\u0230\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ - "\1\11\1\0\1\11\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\16\54\2\u0231\4\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\14\54\2\u0232\6\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\4\54\2\u0233\16\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\4\54\2\u0234"+ - "\16\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\u0235\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\10\54\2\u0236\12\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\6\54\2\u0237\14\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\6\54\2\u0238\14\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\u0239\1\0\1\54\1\0\2\54\1\u0239"+ - "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\7\0\1\u023a\7\0\1\u023b\5\0"+ - "\1\u023a\62\0\1\u023a\1\0\1\u023a\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\u023c\1\0"+ - "\1\106\1\0\24\106\1\0\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\6\106\2\u023d\14\106\1\0\22\106\1\0"+ - "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\u023c\1\u023e\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ - "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\u023d\1\u023f\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ - "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ - "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ - "\2\106\1\0\1\106\1\0\24\106\1\0\20\106\2\u0240"+ - "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ - "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ - "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\u0240\1\u0241\1\0\1\106"+ - "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\4\54\2\u0242\16\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\u0243\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\20\54\2\u0244\2\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\20\54\2\u0245\2\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\16\54\2\u0246\4\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ - "\2\u0247\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\16\54\2\u0248\4\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u0249"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u024a"+ - "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\u023a"+ - "\6\0\1\u024b\1\u023a\5\0\1\u023a\62\0\1\u023a\1\0"+ - "\1\u023a\16\0\1\u024b\101\0\1\106\1\0\1\106\1\0"+ - "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ - "\6\106\2\u024c\14\106\1\0\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ - "\1\106\1\0\24\106\1\u024d\22\106\1\0\2\106\4\0"+ - "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\u024c\1\u024e\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ - "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\u024d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ - "\1\11\1\0\1\11\1\0\1\11\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\20\54\2\u024f\2\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\24\54\1\0\10\54\2\u0250"+ - "\10\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0251"+ - "\20\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ - "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ - "\2\54\2\u0252\20\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\4\54\2\u0253\16\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\14\54\2\u0254\6\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ - "\2\u0255\20\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\16\54"+ - "\2\u0256\4\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ - "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ - "\1\0\24\106\1\u0257\22\106\1\0\2\106\4\0\2\106"+ - "\1\0\1\106\1\0\1\106\7\0\1\u0258\7\0\1\u0259"+ - "\5\0\1\u0258\62\0\1\u0258\1\0\1\u0258\5\0\1\106"+ - "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ - "\1\11\1\u0257\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ - "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ - "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ - "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ - "\1\0\1\54\1\0\2\54\2\u025a\20\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ - "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\54\1\0\1\54\1\0\14\54\2\u025b\6\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u025c\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\u025d\1\0\1\54\1\0\24\54"+ - "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ - "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ - "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ - "\2\u025e\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ - "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ - "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ - "\1\0\14\54\2\u025f\6\54\1\0\22\54\1\0\2\54"+ - "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\u0260"+ - "\7\0\1\u0261\5\0\1\u0260\62\0\1\u0260\1\0\1\u0260"+ - "\7\0\1\u0258\6\0\1\u0262\1\u0258\5\0\1\u0258\62\0"+ - "\1\u0258\1\0\1\u0258\16\0\1\u0262\101\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0263\1\0"+ - "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ - "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ - "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ - "\1\54\1\0\16\54\2\u0264\4\54\1\0\22\54\1\0"+ - "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ - "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ - "\2\54\1\0\1\54\1\0\2\54\2\u0265\20\54\1\0"+ - "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ - "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ - "\1\54\2\0\2\54\1\0\1\54\1\0\16\54\2\u0266"+ - "\4\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ - "\1\54\1\0\1\54\7\0\1\u0260\6\0\1\u0267\1\u0260"+ - "\5\0\1\u0260\62\0\1\u0260\1\0\1\u0260\16\0\1\u0267"+ - "\101\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ - "\2\0\2\u0268\1\0\1\54\1\0\24\54\1\0\22\54"+ - "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"; - - private static int[] zzUnpackTrans() { - int[] result = new int[38550]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 - = "\3\0\1\11\35\1\1\11\1\1\1\11\1\1\1\11" - + "\2\1\1\11\1\1\1\11\22\1\1\11\1\1\4\11" - + "\1\1\1\11\1\0\1\11\2\0\2\1\1\0\1\1" - + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" - + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" - + "\1\0\1\1\1\0\1\1\1\11\2\1\10\11\1\0" - + "\3\1\1\0\1\1\1\0\41\1\2\0\2\1\1\0" - + "\1\1\1\0\1\1\1\0\1\1\1\0\3\1\1\0" - + "\1\1\1\0\1\1\1\0\1\1\1\0\1\1\1\0" - + "\1\1\1\0\1\1\1\0\1\1\1\11\1\0\3\1" - + "\1\0\41\1\2\0\2\1\1\0\3\1\1\0\1\1" - + "\1\0\1\1\1\0\1\1\1\0\3\1\1\0\3\1" - + "\1\0\3\1\1\0\45\1\3\0\3\1\1\0\5\1" - + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" - + "\1\11\43\1\2\0\3\1\1\0\1\1\1\0\1\1" - + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\37\1" - + "\2\0\2\1\1\0\1\1\1\0\1\1\1\0\1\1" - + "\1\0\3\1\1\0\30\1\1\0\3\1\1\0\1\1" - + "\1\0\1\1\1\0\3\1\1\0\30\1\1\0\1\1" - + "\1\0\3\1\1\0\1\1\1\0\21\1\1\0\1\1" - + "\3\0\3\1\1\0\20\1\1\0\1\1\3\0\3\1" - + "\1\0\15\1\1\0\1\1\3\0\3\1\1\0\15\1" - + "\3\0\2\1\1\0\12\1\4\0\15\1\1\11\2\0" - + "\11\1\3\0\6\1\2\0\1\11\4\1\1\11\1\1"; - - private static int[] zzUnpackAttribute() { - int[] result = new int[616]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - /** - * the input device - */ - private java.io.Reader zzReader; - - /** - * the current state of the DFA - */ - private int zzState; - - /** - * the current lexical state - */ - private int zzLexicalState = YYINITIAL; - - /** - * this buffer contains the current text to be matched and is the source of - * the yytext() string - */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - - /** - * the textposition at the last accepting state - */ - private int zzMarkedPos; - - /** - * the current text position in the buffer - */ - private int zzCurrentPos; - - /** - * startRead marks the beginning of the yytext() string in the buffer - */ - private int zzStartRead; - - /** - * endRead marks the last character in the buffer, that has been read from - * input - */ - private int zzEndRead; - - /** - * number of newlines encountered up to the start of the matched text - */ - private int yyline; - - /** - * the number of characters up to the start of the matched text - */ - private int yychar; - - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; - - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; - - /** - * zzAtEOF == true <=> the scanner is at the EOF - */ - private boolean zzAtEOF; - - /** - * denotes if the user-EOF-code has already been executed - */ - private boolean zzEOFDone; - - /* user code: */ - StringBuffer string = new StringBuffer(); - boolean isMultiname = false; - long multinameId = 0; - - /** - * Create an empty lexer, yyrset will be called later to reset and assign - * the reader - */ - public Flasm3Lexer() { - - } - - public int yychar() { - return yychar; - } - - public int yyline() { - return yyline + 1; - } - - private final Stack pushedBack = new Stack<>(); - - public void pushback(ParsedSymbol symb) { - pushedBack.push(symb); - last = null; - } - ParsedSymbol last; - - public ParsedSymbol lex() throws java.io.IOException, ParseException { - ParsedSymbol ret = null; - if (!pushedBack.isEmpty()) { - ret = last = pushedBack.pop(); - } else { - ret = last = yylex(); - } - return ret; - } - - /** - * Creates a new scanner There is also a java.io.InputStream version of this - * constructor. - * - * @param in the java.io.Reader to read input from. - */ - public Flasm3Lexer(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. There is also java.io.Reader version of this - * constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public Flasm3Lexer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char[] zzUnpackCMap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - - int j = 0; /* index in unpacked array */ - - while (i < 2260) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do { - map[j++] = value; - } while (--count > 0); - } - return map; - } - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead - zzStartRead); - - /* translate stored positions */ - zzEndRead -= zzStartRead; - zzCurrentPos -= zzStartRead; - zzMarkedPos -= zzStartRead; - zzStartRead = 0; - } - - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos * 2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length - zzEndRead); - - if (numRead > 0) { - zzEndRead += numRead; - return false; - } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { - int c = zzReader.read(); - if (c == -1) { - return true; - } else { - zzBuffer[zzEndRead++] = (char) c; - return false; - } - } - - // numRead < 0 - return true; - } - - /** - * Closes the input stream. - * - * @throws java.io.IOException - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) { - zzReader.close(); - } - } - - /** - * Resets the scanner to read from a new input stream. Does not close the - * old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). Lexical - * state is set to ZZ_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - } - - /** - * Returns the current lexical state. - * - * @return - */ - public final int yystate() { - return zzLexicalState; - } - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - /** - * Returns the text matched by the current regular expression. - * - * @return - */ - public final String yytext() { - return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); - } - - /** - * Returns the character at position pos from the matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. A value from 0 to - * yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead + pos]; - } - - /** - * Returns the length of the matched text region. - * - * @return - */ - public final int yylength() { - return zzMarkedPos - zzStartRead; - } - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of yypushback(int) and - * a match-all fallback rule) this method will only be called with things - * that "Can't Possibly Happen". If this method is called, something is - * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done in error - * fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. This number must - * not be greater than yylength()! - */ - public void yypushback(int number) { - if (number > yylength()) { - zzScanError(ZZ_PUSHBACK_2BIG); - } - - zzMarkedPos -= number; - } - - /** - * Resumes scanning until the next regular expression is matched, the end of - * input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - * @throws com.jpexs.decompiler.flash.abc.avm2.parser.ParseException - */ - public ParsedSymbol yylex() throws java.io.IOException, ParseException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char[] zzBufferL = zzBuffer; - char[] zzCMapL = ZZ_CMAP; - - int[] zzTransL = ZZ_TRANS; - int[] zzRowMapL = ZZ_ROWMAP; - int[] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar += zzMarkedPosL - zzStartRead; - - boolean zzR = false; - for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; - zzCurrentPosL++) { - switch (zzBufferL[zzCurrentPosL]) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) { - zzR = false; - } else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn++; - } - } - - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } else if (zzAtEOF) { - zzPeek = false; - } else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) { - zzPeek = false; - } else { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } - } - if (zzPeek) { - yyline--; - } - } - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; - - zzForAction: - { - while (true) { - - if (zzCurrentPosL < zzEndReadL) { - zzInput = zzBufferL[zzCurrentPosL++]; - } else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; - if (zzNext == -1) { - break zzForAction; - } - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ((zzAttributes & 1) == 1) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ((zzAttributes & 8) == 8) { - break zzForAction; - } - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 45: { - isMultiname = true; - String s = yytext(); - multinameId = Long.parseLong(s.substring(2, s.length() - 2)); - yybegin(STRING); - string.setLength(0); - } - case 101: - break; - case 37: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE, yytext()); - } - case 102: - break; - case 57: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DOUBLE, yytext()); - } - case 103: - break; - case 32: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CODE, yytext()); - } - case 104: - break; - case 52: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METHOD, yytext()); - } - case 105: - break; - case 47: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CLASS, yytext()); - } - case 106: - break; - case 79: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMELA, yytext()); - } - case 107: - break; - case 74: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UINTEGER, yytext()); - } - case 108: - break; - case 59: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAMEA, yytext()); - } - case 109: - break; - case 8: { - return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); - } - case 110: - break; - case 58: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_GETTER, yytext()); - } - case 111: - break; - case 53: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TARGET, yytext()); - } - case 112: - break; - case 69: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OVERRIDE, yytext()); - } - case 113: - break; - case 93: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGENAMESPACE, yytext()); - } - case 114: - break; - case 61: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTEGER, yytext()); - } - case 115: - break; - case 22: { - string.append('\t'); - } - case 116: - break; - case 95: { - String s = yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_START, Integer.parseInt(s.substring(15, s.length() - 1))); - } - case 117: - break; - case 54: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SETTER, yytext()); - } - case 118: - break; - case 15: { - return new ParsedSymbol(ParsedSymbol.TYPE_LOWERTHAN, yytext()); - } - case 119: - break; - case 19: { - throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); - } - case 120: - break; - case 42: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UTF8, yytext()); - } - case 121: - break; - case 96: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICITNAMESPACE, yytext()); - } - case 122: - break; - case 90: { - String s = yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_END, Integer.parseInt(s.substring(13, s.length() - 1))); - } - case 123: - break; - case 35: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_BODY, yytext()); - } - case 124: - break; - case 34: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FLAG, yytext()); - } - case 125: - break; - case 84: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMELA, yytext()); - } - case 126: - break; - case 78: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAMESPACE, yytext()); - } - case 127: - break; - case 94: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PRIVATENAMESPACE, yytext()); - } - case 128: - break; - case 9: { - return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_OPEN, yytext()); - } - case 129: - break; - case 92: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_PARAM_NAMES, yytext()); - } - case 130: - break; - case 23: { - string.append('\n'); - } - case 131: - break; - case 64: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSTACK, yytext()); - } - case 132: - break; - case 36: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRUE, yytext()); - } - case 133: - break; - case 5: { - yybegin(PARAMETERS); - // length also includes the trailing quote - if (isMultiname) { - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); - } else { - return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); - } - } - case 134: - break; - case 44: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRAIT, yytext()); - } - case 135: - break; - case 98: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_STATICPROTECTEDNS, yytext()); - } - case 136: - break; - case 82: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEA, yytext()); - } - case 137: - break; - case 80: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UNDEFINED, yytext()); - } - case 138: - break; - case 67: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICIT, yytext()); - } - case 139: - break; - case 4: { - throw new ParseException("Unterminated string at end of line", yyline + 1); - } - case 140: - break; - case 10: { - return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); - } - case 141: - break; - case 31: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRY, yytext()); - } - case 142: - break; - case 60: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RETURNS, yytext()); - } - case 143: - break; - case 89: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ARGUMENTS, yytext()); - } - case 144: - break; - case 43: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAM, yytext()); - } - case 145: - break; - case 99: { - String s = yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_TARGET, Integer.parseInt(s.substring(16, s.length() - 1))); - } - case 146: - break; - case 56: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DISPID, yytext()); - } - case 147: - break; - case 66: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA, yytext()); - } - case 148: - break; - case 18: { - String s = yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); - } - case 149: - break; - case 76: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAME, yytext()); - } - case 150: - break; - case 72: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEL, yytext()); - } - case 151: - break; - case 86: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_OPTIONAL, yytext()); - } - case 152: - break; - case 29: { - return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); - } - case 153: - break; - case 30: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TO, yytext()); - } - case 154: - break; - case 46: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CONST, yytext()); - } - case 155: - break; - case 24: { - string.append('\r'); - } - case 156: - break; - case 48: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FINAL, yytext()); - } - case 157: - break; - case 63: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DECIMAL, yytext()); - } - case 158: - break; - case 26: { - string.append('\b'); - } - case 159: - break; - case 87: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSCOPEDEPTH, yytext()); - } - case 160: - break; - case 49: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FALSE, yytext()); - } - case 161: - break; - case 73: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FUNCTION, yytext()); - } - case 162: - break; - case 27: { - string.append('\"'); - } - case 163: - break; - case 70: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SET_DXNS, yytext()); - } - case 164: - break; - case 39: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NULL, yytext()); - } - case 165: - break; - case 88: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INITSCOPEDEPTH, yytext()); - } - case 166: - break; - case 41: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FROM, yytext()); - } - case 167: - break; - case 14: { - return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_CLOSE, yytext()); - } - case 168: - break; - case 2: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); - } - case 169: - break; - case 28: { - string.append('\''); - } - case 170: - break; - case 11: { - return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_CLOSE, yytext()); - } - case 171: - break; - case 21: { - string.append('\\'); - } - case 172: - break; - case 6: { - yybegin(YYINITIAL); - } - case 173: - break; - case 17: { - return new ParsedSymbol(ParsedSymbol.TYPE_COMMA, yytext()); - } - case 174: - break; - case 97: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGEINTERNALNS, yytext()); - } - case 175: - break; - case 16: { - return new ParsedSymbol(ParsedSymbol.TYPE_GREATERTHAN, yytext()); - } - case 176: - break; - case 77: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_REST, yytext()); - } - case 177: - break; - case 12: { - isMultiname = false; - yybegin(STRING); - string.setLength(0); - } - case 178: - break; - case 68: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPENAME, yytext()); - } - case 179: - break; - case 40: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOT, yytext()); - } - case 180: - break; - case 100: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNAMESPACE, yytext()); - } - case 181: - break; - case 75: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAMNAME, yytext()); - } - case 182: - break; - case 25: { - string.append('\f'); - } - case 183: - break; - case 13: { - return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_OPEN, yytext()); - } - case 184: - break; - case 33: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); - } - case 185: - break; - case 91: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ACTIVATION, yytext()); - } - case 186: - break; - case 51: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VALUE, yytext()); - } - case 187: - break; - case 55: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOTID, yytext()); - } - case 188: - break; - case 85: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IGNORE_REST, yytext()); - } - case 189: - break; - case 50: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAME, yytext()); - } - case 190: - break; - case 3: { - string.append(yytext()); - } - case 191: - break; - case 7: { - return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT, yytext().substring(1)); - } - case 192: - break; - case 81: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_LOCALCOUNT, yytext()); - } - case 193: - break; - case 71: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEA, yytext()); - } - case 194: - break; - case 65: { - yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OPTIONAL, yytext()); - } - case 195: - break; - case 20: { - char val = (char) Integer.parseInt(yytext().substring(1), 8); - string.append(val); - } - case 196: - break; - case 38: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); - } - case 197: - break; - case 83: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEL, yytext()); - } - case 198: - break; - case 62: { - return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAME, yytext()); - } - case 199: - break; - case 1: { - } - case 200: - break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ParsedSymbol(ParsedSymbol.TYPE_EOF); - } - } else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; + +import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException; +import java.util.Stack; + +/** + * This class is a scanner generated by + * JFlex 1.4.3 on 2013.12.14. 19:20 from the + * specification file + * D:/Dropbox/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/flasm3.flex + */ +public final class Flasm3Lexer { + + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** + * lexical states + */ + public static final int STRING = 2; + public static final int YYINITIAL = 0; + public static final int PARAMETERS = 4; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2 + }; + + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\12\1\4\1\2\1\0\1\4\1\1\16\12\4\0\1\53\1\0" + + "\1\76\1\0\1\11\2\0\1\111\1\101\1\102\1\0\1\24\1\107" + + "\1\20\1\21\1\0\1\17\3\112\4\25\1\110\1\7\1\16\1\3" + + "\1\103\1\0\1\104\2\0\1\47\1\70\1\31\1\54\1\22\1\62" + + "\1\56\1\74\1\37\1\11\1\72\1\64\1\5\1\43\1\41\1\33" + + "\1\77\1\51\1\45\1\35\1\66\1\105\1\11\1\27\1\60\1\11" + + "\1\6\1\26\1\10\1\0\1\15\1\0\1\50\1\71\1\32\1\55" + + "\1\23\1\63\1\57\1\75\1\40\1\14\1\73\1\65\1\13\1\44" + + "\1\42\1\34\1\100\1\52\1\46\1\36\1\67\1\106\1\14\1\30" + + "\1\61\1\14\4\0\41\12\2\0\4\11\4\0\1\11\2\0\1\12" + + "\7\0\1\11\4\0\1\11\5\0\27\11\1\0\37\11\1\0\u01ca\11" + + "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12" + + "\5\11\1\0\2\11\2\0\4\11\10\0\1\11\1\0\3\11\1\0" + + "\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0\5\12\2\0" + + "\236\11\11\0\46\11\2\0\1\11\7\0\47\11\11\0\55\12\1\0" + + "\1\12\1\0\2\12\1\0\2\12\1\0\1\12\10\0\33\11\5\0" + + "\3\11\15\0\4\12\7\0\1\11\4\0\13\12\5\0\53\11\37\12" + + "\4\0\2\11\1\12\143\11\1\0\1\11\10\12\1\0\6\12\2\11" + + "\2\12\1\0\4\12\2\11\12\12\3\11\2\0\1\11\17\0\1\12" + + "\1\11\1\12\36\11\33\12\2\0\131\11\13\12\1\11\16\0\12\12" + + "\41\11\11\12\2\11\4\0\1\11\5\0\26\11\4\12\1\11\11\12" + + "\1\11\3\12\1\11\5\12\22\0\31\11\3\12\244\0\4\12\66\11" + + "\3\12\1\11\22\12\1\11\7\12\12\11\2\12\2\0\12\12\1\0" + + "\7\11\1\0\7\11\1\0\3\12\1\0\10\11\2\0\2\11\2\0" + + "\26\11\1\0\7\11\1\0\1\11\3\0\4\11\2\0\1\12\1\11" + + "\7\12\2\0\2\12\2\0\3\12\1\11\10\0\1\12\4\0\2\11" + + "\1\0\3\11\2\12\2\0\12\12\4\11\7\0\1\11\5\0\3\12" + + "\1\0\6\11\4\0\2\11\2\0\26\11\1\0\7\11\1\0\2\11" + + "\1\0\2\11\1\0\2\11\2\0\1\12\1\0\5\12\4\0\2\12" + + "\2\0\3\12\3\0\1\12\7\0\4\11\1\0\1\11\7\0\14\12" + + "\3\11\1\12\13\0\3\12\1\0\11\11\1\0\3\11\1\0\26\11" + + "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\10\12" + + "\1\0\3\12\1\0\3\12\2\0\1\11\17\0\2\11\2\12\2\0" + + "\12\12\1\0\1\11\17\0\3\12\1\0\10\11\2\0\2\11\2\0" + + "\26\11\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11" + + "\7\12\2\0\2\12\2\0\3\12\10\0\2\12\4\0\2\11\1\0" + + "\3\11\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0" + + "\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0" + + "\2\11\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0" + + "\3\12\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0" + + "\1\11\7\0\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0" + + "\12\11\1\0\5\11\3\0\1\11\7\12\1\0\3\12\1\0\4\12" + + "\7\0\2\12\1\0\2\11\6\0\2\11\2\12\2\0\12\12\22\0" + + "\2\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0" + + "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0" + + "\2\12\7\0\1\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11" + + "\17\0\2\12\1\0\10\11\1\0\3\11\1\0\51\11\2\0\1\11" + + "\7\12\1\0\3\12\1\0\4\12\1\11\10\0\1\12\10\0\2\11" + + "\2\12\2\0\12\12\12\0\6\11\2\0\2\12\1\0\22\11\3\0" + + "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0" + + "\6\12\1\0\1\12\1\0\10\12\22\0\2\12\15\0\60\11\1\12" + + "\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0\2\11\1\0" + + "\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0" + + "\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1\0" + + "\4\11\1\12\2\11\6\12\1\0\2\12\1\11\2\0\5\11\1\0" + + "\1\11\1\0\6\12\2\0\12\12\2\0\2\11\42\0\1\11\27\0" + + "\2\12\6\0\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0" + + "\2\12\10\11\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12" + + "\1\0\44\12\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0" + + "\6\11\4\12\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12" + + "\15\11\14\12\1\11\17\12\2\0\46\11\12\0\53\11\1\0\1\11" + + "\3\0\u0149\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11" + + "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11" + + "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11" + + "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\125\11\14\0\u026c\11" + + "\2\0\21\11\1\0\32\11\5\0\113\11\3\0\3\11\17\0\15\11" + + "\1\0\4\11\3\12\13\0\22\11\3\12\13\0\22\11\2\12\14\0" + + "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11" + + "\3\0\2\11\1\12\2\0\12\12\41\0\3\12\2\0\12\12\6\0" + + "\130\11\10\0\51\11\1\12\1\11\5\0\106\11\12\0\35\11\3\0" + + "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11" + + "\4\0\21\12\7\11\2\12\6\0\12\12\46\0\27\11\5\12\4\0" + + "\65\11\12\12\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11" + + "\130\0\5\12\57\11\21\12\7\11\4\0\12\12\21\0\11\12\14\0" + + "\3\12\36\11\12\12\3\0\2\11\12\12\6\0\46\11\16\12\14\0" + + "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\122\0\3\12" + + "\1\0\25\12\4\11\1\12\4\11\1\12\15\0\300\11\47\12\25\0" + + "\4\12\u0116\11\2\0\6\11\2\0\46\11\2\0\6\11\2\0\10\11" + + "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\37\11\2\0\65\11" + + "\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11" + + "\2\0\6\11\4\0\15\11\5\0\3\11\1\0\7\11\16\0\5\12" + + "\32\0\5\12\20\0\2\11\23\0\1\11\13\0\5\12\5\0\6\12" + + "\1\0\1\11\15\0\1\11\20\0\15\11\3\0\32\11\26\0\15\12" + + "\4\0\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11" + + "\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11" + + "\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11" + + "\21\0\51\11\u0a77\0\57\11\1\0\57\11\1\0\205\11\6\0\4\11" + + "\3\12\16\0\46\11\12\0\66\11\11\0\1\11\17\0\1\12\27\11" + + "\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11" + + "\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0\1\11" + + "\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11\4\0" + + "\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11\5\0" + + "\51\11\3\0\136\11\21\0\33\11\65\0\20\11\u0200\0\u19b6\11\112\0" + + "\u51cc\11\64\0\u048d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12" + + "\2\11\24\0\57\11\1\12\14\0\2\12\1\0\31\11\10\0\120\11" + + "\2\12\45\0\11\11\2\0\147\11\2\0\4\11\1\0\2\11\16\0" + + "\12\11\120\0\10\11\1\12\3\11\1\12\4\11\1\12\27\11\5\12" + + "\20\0\1\11\7\0\64\11\14\0\2\12\62\11\21\12\13\0\12\12" + + "\6\0\22\12\6\11\3\0\1\11\4\0\12\12\34\11\10\12\2\0" + + "\27\11\15\12\14\0\35\11\3\0\4\12\57\11\16\12\16\0\1\11" + + "\12\12\46\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0" + + "\12\12\6\0\27\11\3\0\1\11\1\12\4\0\60\11\1\12\1\11" + + "\3\12\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11" + + "\43\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\1\0\7\11" + + "\221\0\43\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0" + + "\27\11\4\0\61\11\u2104\0\u012e\11\2\0\76\11\2\0\152\11\46\0" + + "\7\11\14\0\5\11\5\0\1\11\1\12\12\11\1\0\15\11\1\0" + + "\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\154\11\41\0" + + "\u016b\11\22\0\100\11\2\0\66\11\50\0\15\11\3\0\20\12\20\0" + + "\7\12\14\0\2\11\30\0\3\11\31\0\1\11\6\0\5\11\1\0" + + "\207\11\2\0\1\12\4\0\1\11\13\0\12\12\7\0\32\11\4\0" + + "\1\11\1\0\32\11\13\0\131\11\3\0\6\11\2\0\6\11\2\0" + + "\6\11\2\0\3\11\3\0\2\11\3\0\2\11\22\0\3\12\4\0"; + + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\4\1\2\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\3\2\4\1\1\1\5\2\6\1\7\1\10" + + "\1\11\1\12\1\13\1\10\1\12\2\1\16\10\1\14" + + "\1\10\1\15\1\16\1\17\1\20\1\10\1\21\1\0" + + "\1\22\2\0\2\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\23\2\24\1\25\1\26\1\27\1\30\1\31" + + "\1\32\1\33\1\34\1\0\2\10\1\35\1\0\1\35" + + "\1\0\5\10\1\36\33\10\2\0\2\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\37\1\2\1\37" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\24\1\0" + + "\2\10\1\35\1\0\41\10\2\0\2\2\1\0\1\2" + + "\2\40\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\2\41\1\0\1\2\2\42\1\0\1\2\2\43" + + "\1\0\12\10\1\44\1\45\4\10\1\46\1\47\3\10" + + "\1\50\7\10\1\51\1\10\1\52\5\10\3\0\3\2" + + "\1\0\1\2\2\53\2\54\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\55\4\10\1\56\1\57" + + "\23\10\1\60\1\61\5\10\1\62\1\63\1\64\2\0" + + "\1\64\2\2\1\0\1\2\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\10\1\64" + + "\5\10\1\65\10\10\1\66\1\10\1\67\2\10\1\70" + + "\1\71\1\72\5\10\1\73\2\0\2\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\2\74\1\0" + + "\1\2\7\10\1\75\10\10\1\76\1\77\5\10\1\0" + + "\1\100\1\2\1\100\1\0\1\2\1\0\1\2\1\0" + + "\1\2\2\101\1\0\1\2\1\102\1\10\1\103\4\10" + + "\1\104\1\10\1\105\4\10\1\106\1\10\1\107\1\110" + + "\1\111\1\112\3\10\1\0\1\2\1\0\1\2\2\113" + + "\1\0\1\2\1\0\1\2\1\114\10\10\1\115\1\116" + + "\1\10\1\117\1\120\2\10\1\0\1\2\3\0\3\2" + + "\1\0\1\2\2\121\1\122\1\123\13\10\1\0\1\2" + + "\3\0\3\2\1\0\1\2\1\124\5\10\1\125\5\10" + + "\1\0\1\2\3\0\3\2\1\0\1\2\11\10\1\126" + + "\2\127\3\0\2\2\1\0\1\2\11\10\4\0\2\2" + + "\2\130\6\10\1\131\2\10\1\132\2\0\1\2\5\10" + + "\1\133\1\10\1\134\3\0\2\10\1\135\1\136\2\10" + + "\2\0\1\137\1\140\1\141\1\10\1\142\1\143\1\144"; + + private static int[] zzUnpackAction() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\113\0\226\0\341\0\u012c\0\u0177\0\u01c2\0\u020d" + + "\0\u0258\0\u02a3\0\u02ee\0\u0339\0\u0384\0\u03cf\0\u041a\0\u0465" + + "\0\u04b0\0\u04fb\0\u0546\0\u0591\0\u05dc\0\u0627\0\u0672\0\u06bd" + + "\0\u0708\0\u0753\0\u079e\0\u07e9\0\u0834\0\u087f\0\u08ca\0\u0915" + + "\0\u0960\0\341\0\u09ab\0\341\0\u09f6\0\341\0\u0a41\0\u0a8c" + + "\0\341\0\u0ad7\0\341\0\u0b22\0\u0b6d\0\u0bb8\0\u0c03\0\u0c4e" + + "\0\u0c99\0\u0ce4\0\u0d2f\0\u0d7a\0\u0dc5\0\u0e10\0\u0e5b\0\u0ea6" + + "\0\u0ef1\0\u0f3c\0\u0f87\0\u0fd2\0\u101d\0\341\0\u1068\0\341" + + "\0\341\0\341\0\341\0\u10b3\0\341\0\u01c2\0\341\0\u10fe" + + "\0\u1149\0\u1194\0\u11df\0\u122a\0\u1275\0\u12c0\0\u130b\0\u1356" + + "\0\u13a1\0\u13ec\0\u1437\0\u1482\0\u14cd\0\u1518\0\u1563\0\u15ae" + + "\0\u15f9\0\u1644\0\u168f\0\u16da\0\u1725\0\u1770\0\u17bb\0\u1806" + + "\0\u1851\0\341\0\u189c\0\u18e7\0\341\0\341\0\341\0\341" + + "\0\341\0\341\0\341\0\341\0\u1932\0\u197d\0\u19c8\0\u1a13" + + "\0\u1a5e\0\u0b6d\0\u0c03\0\u1aa9\0\u1af4\0\u1b3f\0\u1b8a\0\u1bd5" + + "\0\u0b22\0\u1c20\0\u1c6b\0\u1cb6\0\u1d01\0\u1d4c\0\u1d97\0\u1de2" + + "\0\u1e2d\0\u1e78\0\u1ec3\0\u1f0e\0\u1f59\0\u1fa4\0\u1fef\0\u203a" + + "\0\u2085\0\u20d0\0\u211b\0\u2166\0\u21b1\0\u21fc\0\u2247\0\u2292" + + "\0\u22dd\0\u2328\0\u2373\0\u23be\0\u2409\0\u2454\0\u249f\0\u24ea" + + "\0\u2535\0\u2580\0\u25cb\0\u2616\0\u2661\0\u26ac\0\u26f7\0\u01c2" + + "\0\u2742\0\u0258\0\u278d\0\u27d8\0\u2823\0\u286e\0\u28b9\0\u2904" + + "\0\u294f\0\u299a\0\u29e5\0\u2a30\0\u2a7b\0\u2ac6\0\u2b11\0\u2b5c" + + "\0\341\0\u2ba7\0\u2bf2\0\u2c3d\0\u2c88\0\u2c88\0\u2cd3\0\u2d1e" + + "\0\u2d69\0\u2db4\0\u2dff\0\u2e4a\0\u2e95\0\u2ee0\0\u2f2b\0\u2f76" + + "\0\u2fc1\0\u300c\0\u3057\0\u30a2\0\u30ed\0\u3138\0\u3183\0\u31ce" + + "\0\u3219\0\u3264\0\u32af\0\u32fa\0\u3345\0\u3390\0\u33db\0\u3426" + + "\0\u3471\0\u34bc\0\u3507\0\u3552\0\u359d\0\u35e8\0\u3633\0\u367e" + + "\0\u36c9\0\u3714\0\u375f\0\u37aa\0\u37f5\0\u01c2\0\u0258\0\u3840" + + "\0\u388b\0\u38d6\0\u3921\0\u396c\0\u39b7\0\u3a02\0\u3a4d\0\u01c2" + + "\0\u0258\0\u3a98\0\u3ae3\0\u01c2\0\u0258\0\u3b2e\0\u3b79\0\u01c2" + + "\0\u0258\0\u3bc4\0\u3c0f\0\u3c5a\0\u3ca5\0\u3cf0\0\u3d3b\0\u3d86" + + "\0\u3dd1\0\u3e1c\0\u3e67\0\u3eb2\0\u0b22\0\u3efd\0\u3f48\0\u3f93" + + "\0\u3fde\0\u4029\0\u4074\0\u0b22\0\u40bf\0\u410a\0\u4155\0\u41a0" + + "\0\u41eb\0\u4236\0\u4281\0\u42cc\0\u4317\0\u4362\0\u43ad\0\u0b22" + + "\0\u43f8\0\u0b22\0\u4443\0\u448e\0\u44d9\0\u4524\0\u456f\0\u45ba" + + "\0\u4605\0\u4650\0\u469b\0\u46e6\0\u4731\0\u477c\0\u47c7\0\u4812" + + "\0\u485d\0\u01c2\0\u0258\0\u48a8\0\u48f3\0\u493e\0\u4989\0\u49d4" + + "\0\u4a1f\0\u4a6a\0\u4ab5\0\341\0\u4b00\0\u4b4b\0\u4b96\0\u4be1" + + "\0\u0b22\0\u0b22\0\u4c2c\0\u4c77\0\u4cc2\0\u4d0d\0\u4d58\0\u4da3" + + "\0\u4dee\0\u4e39\0\u4e84\0\u4ecf\0\u4f1a\0\u4f65\0\u4fb0\0\u4ffb" + + "\0\u5046\0\u5091\0\u50dc\0\u5127\0\u5172\0\u0b22\0\u0b22\0\u51bd" + + "\0\u5208\0\u5253\0\u529e\0\u52e9\0\u5334\0\u0b22\0\u01c2\0\u537f" + + "\0\u53ca\0\u0258\0\u5415\0\u5460\0\u54ab\0\u54f6\0\u5541\0\u558c" + + "\0\u55d7\0\u5622\0\u566d\0\u56b8\0\u5703\0\u574e\0\u5799\0\u57e4" + + "\0\u582f\0\u0b22\0\u587a\0\u58c5\0\u5910\0\u595b\0\u59a6\0\u0b22" + + "\0\u59f1\0\u5a3c\0\u5a87\0\u5ad2\0\u5b1d\0\u5b68\0\u5bb3\0\u5bfe" + + "\0\u0b22\0\u5c49\0\u0b22\0\u5c94\0\u5cdf\0\u0b22\0\u0b22\0\u0b22" + + "\0\u5d2a\0\u5d75\0\u5dc0\0\u5e0b\0\u5e56\0\u0b22\0\u5ea1\0\u5eec" + + "\0\u5f37\0\u5f82\0\u5fcd\0\u6018\0\u6063\0\u60ae\0\u60f9\0\u6144" + + "\0\u618f\0\u61da\0\u01c2\0\u0258\0\u6225\0\u6270\0\u62bb\0\u6306" + + "\0\u6351\0\u639c\0\u63e7\0\u6432\0\u647d\0\u0b22\0\u64c8\0\u6513" + + "\0\u655e\0\u65a9\0\u65f4\0\u663f\0\u668a\0\u66d5\0\u6720\0\u0b22" + + "\0\u676b\0\u67b6\0\u6801\0\u684c\0\u6897\0\u68e2\0\u01c2\0\u692d" + + "\0\u0258\0\u6978\0\u69c3\0\u6a0e\0\u6a59\0\u6aa4\0\u6aef\0\u01c2" + + "\0\u0258\0\u6b3a\0\u6b85\0\u0b22\0\u6bd0\0\u6c1b\0\u6c66\0\u6cb1" + + "\0\u6cfc\0\u6d47\0\u0b22\0\u6d92\0\u0b22\0\u6ddd\0\u6e28\0\u6e73" + + "\0\u6ebe\0\u0b22\0\u6f09\0\u0b22\0\u6f54\0\u0b22\0\u0b22\0\u6f9f" + + "\0\u6fea\0\u7035\0\u7080\0\u70cb\0\u7116\0\u7161\0\u01c2\0\u0258" + + "\0\u71ac\0\u71f7\0\u7242\0\u728d\0\u72d8\0\u7323\0\u736e\0\u73b9" + + "\0\u7404\0\u744f\0\u749a\0\u74e5\0\u7530\0\u0b22\0\u0b22\0\u757b" + + "\0\u0b22\0\u0b22\0\u75c6\0\u7611\0\u765c\0\u76a7\0\u76f2\0\u773d" + + "\0\u7788\0\u77d3\0\u781e\0\u7869\0\u78b4\0\u78ff\0\u01c2\0\u0258" + + "\0\u0b22\0\u794a\0\u7995\0\u79e0\0\u7a2b\0\u7a76\0\u7ac1\0\u7b0c" + + "\0\u7b57\0\u7ba2\0\u7bed\0\u7c38\0\u7c83\0\u7cce\0\u7d19\0\u7d64" + + "\0\u7daf\0\u7dfa\0\u7e45\0\u7e90\0\u7edb\0\u7f26\0\u7f71\0\u0b22" + + "\0\u7fbc\0\u8007\0\u8052\0\u809d\0\u80e8\0\u0b22\0\u8133\0\u817e" + + "\0\u81c9\0\u8214\0\u825f\0\u82aa\0\u82f5\0\u8340\0\u838b\0\u83d6" + + "\0\u8421\0\u846c\0\u84b7\0\u8502\0\u854d\0\u8598\0\u85e3\0\u862e" + + "\0\u8679\0\u86c4\0\u870f\0\u875a\0\u87a5\0\u87f0\0\u0b22\0\u01c2" + + "\0\u0258\0\u883b\0\u8886\0\u88d1\0\u891c\0\u8967\0\u89b2\0\u89fd" + + "\0\u8a48\0\u8a93\0\u8ade\0\u8b29\0\u8b74\0\u8bbf\0\u8c0a\0\u8c55" + + "\0\u8ca0\0\u8ceb\0\u8d36\0\u8d81\0\u8dcc\0\u8e17\0\u8e62\0\u01c2" + + "\0\u0258\0\u8ead\0\u8ef8\0\u8f43\0\u8f8e\0\u8fd9\0\u9024\0\u0b22" + + "\0\u906f\0\u90ba\0\341\0\u9105\0\u9150\0\u919b\0\u91e6\0\u9231" + + "\0\u927c\0\u92c7\0\u9312\0\u0b22\0\u935d\0\u0b22\0\u93a8\0\u93f3" + + "\0\u943e\0\u9489\0\u94d4\0\u0b22\0\u0b22\0\u951f\0\u956a\0\u95b5" + + "\0\u9600\0\341\0\u0b22\0\u0b22\0\u964b\0\u0b22\0\341\0\u0b22"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 + = "\4\4\1\5\1\6\3\4\1\7\1\4\1\10\1\11"+ + "\1\7\4\4\1\12\1\13\3\4\1\7\1\11\1\14"+ + "\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ + "\1\25\1\26\1\27\1\7\1\11\1\7\1\11\1\30"+ + "\1\31\1\5\1\7\1\11\1\7\1\11\1\7\1\11"+ + "\1\32\1\33\1\34\1\35\1\7\1\11\1\36\1\37"+ + "\1\7\1\11\1\7\1\11\1\4\1\7\1\11\4\4"+ + "\1\7\1\11\4\4\1\40\1\41\1\42\23\40\1\43"+ + "\47\40\1\44\14\40\1\4\1\45\1\46\1\47\1\4"+ + "\1\50\1\51\1\52\1\53\1\54\1\4\1\50\2\54"+ + "\1\4\1\55\1\56\1\57\2\60\1\4\1\52\1\4"+ + "\2\54\2\61\2\62\2\63\2\64\2\65\2\66\2\67"+ + "\2\54\2\70\1\4\2\71\2\72\2\54\2\73\2\54"+ + "\2\74\4\54\2\75\1\76\2\77\1\100\1\101\1\102"+ + "\1\103\2\104\1\105\1\52\1\4\1\52\117\0\1\5"+ + "\46\0\1\5\44\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\110\1\0\1\106\1\0\20\106"+ + "\2\111\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\110\1\112"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\111\1\113\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\2\114\22\106\1\0\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\114\1\115\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\12\106\2\116\10\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\116\1\117\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\20\106\2\120\2\106\1\0"+ + "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ + "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\120\1\121\1\106\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\22\106\2\122"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\122\1\123\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\14\106"+ + "\2\124\6\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\124"+ + "\1\125\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\4\106\2\126\16\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\126\1\127\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\20\106\2\130\2\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\130"+ + "\1\131\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\132\1\0\1\106\1\0\24\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\132\1\133\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\24\106\1\0\10\106"+ + "\2\134\10\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\134\1\135"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\12\106"+ + "\2\136\10\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\136\1\137\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\12\106\2\140\10\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\140"+ + "\1\141\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\1\40\2\0"+ + "\23\40\1\0\47\40\1\0\14\40\2\0\1\42\110\0"+ + "\2\142\1\0\14\142\1\143\5\142\1\144\1\145\6\142"+ + "\2\146\4\142\2\147\4\142\2\150\7\142\2\151\4\142"+ + "\2\152\4\142\1\153\12\142\1\154\1\143\2\0\1\46"+ + "\110\0\1\47\2\0\110\47\5\0\1\54\1\155\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\156\1\0\1\54"+ + "\1\0\24\54\1\0\12\54\2\157\6\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\52"+ + "\7\0\1\52\1\0\1\160\2\161\1\0\1\52\62\0"+ + "\1\52\1\0\1\52\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\7\0\1\162\7\0\1\162\1\0"+ + "\1\160\2\161\1\0\1\162\62\0\1\162\1\0\1\162"+ + "\7\0\1\52\7\0\1\162\1\0\1\163\3\0\1\52"+ + "\62\0\1\52\1\0\1\52\7\0\1\160\7\0\1\160"+ + "\5\0\1\160\62\0\1\160\1\0\1\160\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\2\164\22\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\12\54\2\165\10\54\1\0"+ + "\10\54\2\166\10\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\20\54\2\167\2\170\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\12\54\2\171\4\54\2\172\2\173\1\0"+ + "\4\54\2\174\14\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\14\54\2\175\6\54\1\0\2\54\2\176\16\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\177\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\200\1\0\1\54\1\0\20\54\2\201\2\54\1\0"+ + "\12\54\2\202\6\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\203\1\0\1\54\1\0"+ + "\6\54\2\204\14\54\1\0\10\54\2\205\10\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\6\54\2\206\14\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\207\1\0\1\54\1\0\10\54\2\210"+ + "\2\211\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\212\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\10\54\2\213\6\54\2\214\2\215\1\0\12\54"+ + "\2\216\6\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ + "\2\217\2\220\2\54\2\221\6\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\20\54\2\222\2\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\14\54\2\223"+ + "\6\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\20\54\2\224\2\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\6\106\2\225\14\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\2\226\22\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\225\1\227\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\226"+ + "\1\230\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\2\106\2\231\20\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\231\1\232\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ + "\1\0\2\233\20\106\1\0\2\106\4\0\2\106\1\0"+ + "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ + "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\233"+ + "\1\234\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\22\106\2\235\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\235\1\236\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\20\106\2\237\2\106\1\0\4\106\2\240\14\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\237"+ + "\1\241\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\240\1\242\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\10\106\2\243\12\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\243\1\244\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\6\106"+ + "\2\245\14\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\245\1\246\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\247\1\0\1\106"+ + "\1\0\2\106\1\247\2\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\247"+ + "\1\0\1\11\1\0\2\106\1\250\2\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\6\106\2\251\14\106\1\0"+ + "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ + "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\251\1\252"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\20\106\2\253"+ + "\2\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ + "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ + "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\253\1\254\1\106\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\2\106\2\255\20\106\1\0\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\255\1\256"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\24\106\1\0\2\257\20\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\257\1\260\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\17\0\1\144"+ + "\5\0\1\144\64\0\1\144\17\0\1\261\5\0\1\261"+ + "\64\0\1\261\7\0\1\262\7\0\1\262\5\0\1\262"+ + "\62\0\1\262\1\0\1\262\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\6\54\2\263\14\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\10\54\2\264\10\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\7\0\1\160\7\0\1\160\2\0\2\161\1\0\1\160"+ + "\62\0\1\160\1\0\1\160\7\0\1\265\7\0\1\265"+ + "\1\266\3\0\1\266\1\265\62\0\1\265\1\0\1\265"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\4\54\2\267\16\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ + "\2\270\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\20\54\2\271\2\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\2\54\2\272\20\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\10\54\2\273\2\274"+ + "\10\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\22\54\2\275\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\12\54\2\276\6\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\4\54\2\277\16\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\6\54\2\300\14\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ + "\2\301\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\302\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\303\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\304\1\0\1\54"+ + "\1\0\2\54\1\304\2\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\10\54\2\305\10\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\6\54\2\306\14\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\307\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\12\54\2\310\10\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\311"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\2\54\2\312\20\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\16\54\2\313\4\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ + "\1\0\12\54\2\314\6\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\6\54\2\315\14\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\14\54\2\316\6\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\10\54"+ + "\2\317\10\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ + "\2\320\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\14\54\2\321\6\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\6\54\2\322\12\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\14\54\2\323\6\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ + "\1\0\2\324\20\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\16\54\2\325\4\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\20\54\2\326\2\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\10\54\2\327"+ + "\10\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\24\106\1\0"+ + "\20\106\2\330\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\16\106"+ + "\2\331\4\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\330\1\332\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\331\1\333\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\334\1\0\1\106"+ + "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\334\1\335"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\336\1\0\1\106"+ + "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\336\1\337"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\20\106\2\340\2\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\340\1\341\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\10\106\2\342\12\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\342"+ + "\1\343\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\6\106\2\344\14\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\344"+ + "\1\345\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\10\106"+ + "\2\346\12\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\346\1\347\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\350\1\0\1\106"+ + "\1\0\24\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\350\1\351"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\24\106\1\0\12\106\2\352\6\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\352\1\353\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\0\2\106\2\354\16\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\354\1\355"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\20\106\2\356\2\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\356\1\357\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ + "\1\0\4\106\2\360\14\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\360\1\361\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\7\0\1\262\1\362\6\0"+ + "\1\262\5\0\1\262\62\0\1\262\1\0\1\262\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\20\54\2\363\2\54\1\0"+ + "\20\54\2\364\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ + "\2\365\14\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\7\0\1\265\7\0\1\265"+ + "\5\0\1\265\62\0\1\265\1\0\1\265\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\10\54\2\366\10\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\16\54\2\367\4\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\16\54"+ + "\2\370\4\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\16\54\2\371\2\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\372\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\6\54\2\373\14\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\54"+ + "\2\374\16\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\375\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\376\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\377\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ + "\2\u0100\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\22\54\2\u0101\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\24\54\1\0\2\u0102\20\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u0103"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\10\54\2\u0104\10\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\4\54\1\u0105\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u0106"+ + "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\6\54\2\u0107\14\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u0108\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\14\54\2\u0109\6\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u010a"+ + "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\4\54\2\u010b\16\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\24\54\1\0\14\54\2\u010c\4\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\6\54\2\u010d\14\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u010e"+ + "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\16\54\2\u010f\4\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\u0110\1\0"+ + "\1\54\1\0\2\54\1\u0110\2\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\2\54\2\u0111\20\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\u0112\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u0113"+ + "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\u0114\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\4\54\1\u0115\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\u0116\1\0\1\54"+ + "\1\0\2\54\1\u0116\2\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\12\54\2\u0117\6\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\12\106\2\u0118\10\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\2\106"+ + "\2\u0119\2\106\2\u011a\14\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0118"+ + "\1\u011b\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\u0119"+ + "\1\u011c\1\106\1\11\1\u011a\1\u011d\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\4\106\2\u011e\16\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\u011e\1\u011f\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\u0120\1\0\1\106\1\0\2\106\1\u0120\2\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\u0120\1\0\1\11\1\0\2\106"+ + "\1\u0121\2\11\1\107\1\11\2\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\11\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\6\106\2\u0122\14\106\1\0\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u0122\1\u0123\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\16\106\2\u0124\4\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\u0124\1\u0125\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\12\106\2\u0126\10\106\1\0"+ + "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ + "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u0126\1\u0127\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\22\106\2\u0128"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0128\1\u0129\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\24\106"+ + "\1\0\10\106\2\u012a\10\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\u012a\1\u012b\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\76\0\1\u012c\21\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\2\u012d\20\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\12\54\2\u012e\10\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u012f"+ + "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\10\54\2\u0130\12\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u0131\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\16\54\2\u0132\4\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u0133"+ + "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\20\54\2\u0134\2\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0135\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0136\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\14\54\2\u0137\6\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\2\54\2\u0138"+ + "\16\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\22\54\2\u0139"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\22\54"+ + "\2\u013a\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\4\54\1\u013b\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\16\54\2\u013c\4\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\2\u013d\20\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u013e\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\10\54\2\u013f\12\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u0140"+ + "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\20\54\2\u0141\2\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\u0142\1\0"+ + "\1\54\1\0\2\54\1\u0142\2\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\10\54\2\u0143\12\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\10\54\2\u0144\10\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\u0145\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\10\54\2\u0146\10\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0147\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u0148\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u0149\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\6\54\2\u014a"+ + "\12\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\4\54\2\u014b"+ + "\4\54\2\u014c\10\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u014d\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u014e\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\24\106\1\0\2\u014f\20\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\12\106\2\u0150\10\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\20\106\2\u0151\2\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\u014f\1\u0152"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0150\1\u0153\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0151\1\u0154\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\6\106"+ + "\2\u0155\14\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0155\1\u0156\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\14\106\2\u0157\6\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0157\1\u0158\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\2\106\2\u0159\20\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\u0159\1\u015a\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\14\106\2\u015b\6\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\u015b\1\u015c\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\14\106"+ + "\2\u015d\6\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u015d"+ + "\1\u015e\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\2\106\2\u015f\20\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\u015f"+ + "\1\u0160\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u0161\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u0162"+ + "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\14\54\2\u0163"+ + "\6\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\2\54\2\u0164\20\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\24\54\1\0\2\54\2\u0165\16\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\6\54\2\u0166\14\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0167"+ + "\20\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\6\54\2\u0168\14\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\20\54\2\u0169\2\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u016a\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u016b\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\10\54\2\u016c\12\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u016d"+ + "\2\u016e\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\4\54\2\u016f\16\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\2\u0170\22\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\22\54\2\u0171\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\2\54\2\u0172\20\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\2\u0173\20\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\u0174\1\0\1\54\1\0\2\54"+ + "\1\u0174\2\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\20\54\2\u0175\2\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\2\u0176\20\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u0177\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\22\54\2\u0178\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\10\54\2\u0179\12\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ + "\1\0\2\54\2\u017a\16\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\10\54\2\u017b\12\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u017c\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\4\54\2\u017d\16\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\u017e\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\4\106\2\u017f\16\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\2\106\2\u0180\20\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\u017f\1\u0181\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\u0180\1\u0182\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\10\106\2\u0183\12\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0183\1\u0184\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\20\106"+ + "\2\u0185\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0185\1\u0186\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\12\106\2\u0187\10\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0187"+ + "\1\u0188\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\20\106\2\u0189\2\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u0189"+ + "\1\u018a\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\16\106\2\u018b\4\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u018b"+ + "\1\u018c\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\12\106"+ + "\2\u018d\10\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\u018d\1\u018e\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\6\54\2\u018f\14\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u0190\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\10\54\2\u0191\12\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u0192\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u0193\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\6\54"+ + "\2\u0194\14\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\u0195\1\0\1\54"+ + "\1\0\2\54\1\u0195\2\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\22\54\2\u0196\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\4\54\1\u0197\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u0198"+ + "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0199"+ + "\16\54\2\u019a\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\u019b\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\20\54\2\u019c\2\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\14\54\2\u019d\6\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\4\54\2\u019e\16\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u019f\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ + "\1\0\10\54\2\u01a0\10\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\12\54\2\u01a1\10\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u01a2"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\14\54\2\u01a3\6\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\22\54\2\u01a4\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u01a5"+ + "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\u01a6\1\0\1\106\1\0"+ + "\24\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ + "\1\106\1\0\1\106\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\24\106\1\0\16\106\2\u01a7\2\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\u01a6"+ + "\1\u01a8\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\u01a7"+ + "\1\u01a9\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\12\106\2\u01aa\10\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\u01aa\1\u01ab\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\u01ac\1\0\1\106\1\0\2\106\1\u01ac\2\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\24\106\1\0"+ + "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ + "\1\106\5\0\1\u01ac\1\0\1\11\1\0\2\106\1\u01ad"+ + "\2\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\4\106"+ + "\2\u01ae\16\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\u01ae"+ + "\1\u01af\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\24\106\1\0\10\106\2\u01b0\10\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u01b0\1\u01b1\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\0\12\106\2\u01b2\6\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\u01b2\1\u01b3"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\20\54\2\u01b4\2\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\u01b5\1\0\1\54\1\0\2\54"+ + "\1\u01b5\2\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\6\54\2\u01b6\14\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\10\54\2\u01b7\2\54\2\u01b8\6\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ + "\2\u01b9\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\u01ba\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\u01bb\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\22\54\2\u01bc\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u01bd\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u01be\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\2\54\2\u01bf"+ + "\16\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\16\54\2\u01c0"+ + "\4\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\2\54\2\u01c1\20\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\16\54\2\u01c2\4\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\22\54\2\u01c3\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\20\54\2\u01c4\2\54"+ + "\1\0\10\54\2\u01c5\10\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\14\54\2\u01c6\6\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\22\54\2\u01c7\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u01c8\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\20\54\2\u01c9\2\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u01ca"+ + "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\24\106\1\0\2\u01cb\20\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\u01cb\1\u01cc\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\14\106\2\u01cd\6\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u01cd\1\u01ce\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u01cf"+ + "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\u01cf\1\u01d0\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u01d1"+ + "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\u01d1\1\u01d2\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\14\106\2\u01d3\6\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u01d3\1\u01d4\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\u01d5\1\0\1\54\1\0\24\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\14\54\2\u01d6\6\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\14\54"+ + "\2\u01d7\6\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\20\54\2\u01d8\2\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u01d9\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\24\54\1\0\2\u01da"+ + "\20\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\u01db\1\0\1\54\1\0\24\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\10\54\2\u01dc"+ + "\12\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\12\54\2\u01dd\6\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u01de\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\u01df\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\12\54\2\u01e0\10\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u01e1"+ + "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\2\u01e2\20\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\u01e3\1\0\1\54"+ + "\1\0\2\54\1\u01e3\2\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\12\54\2\u01e4\10\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\u01e5\1\0\1\106\1\0\24\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\u01e5\1\u01e6\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\u01e7\1\0\1\106\1\0\6\106\2\u01e8\6\106"+ + "\2\u01e9\4\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\u01e7\1\u01ea"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u01e8\1\u01eb\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u01e9\1\u01ec\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\24\106\1\0\2\u01ed\20\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\u01ed\1\u01ee\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\6\106\2\u01ef\14\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\u01ef\1\u01f0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\20\54\2\u01f1\2\54\1\0"+ + "\10\54\2\u01f2\10\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\20\54\2\u01f3\2\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u01f4\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\u01f5\1\0\1\54\1\0\2\54\1\u01f5\2\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\u01f6\1\0\1\54\1\0\2\54\1\u01f6"+ + "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\14\54\2\u01f7\6\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\16\54\2\u01f8\4\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\u01f9\1\0\1\54\1\0\1\54\5\0"+ + "\1\u01fa\1\0\1\54\1\0\2\54\1\u01fa\2\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\6\54\2\u01fb"+ + "\14\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\4\54\1\u01fc\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\14\54\2\u01fd\6\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\4\106\2\u01fe\16\106\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\u01fe\1\u01ff\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\14\106\2\u0200\6\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\20\106"+ + "\2\u0201\2\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\6\106\2\u0202\14\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0200\1\u0203\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\u0201\1\u0204\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0202\1\u0205\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\u0206"+ + "\1\0\1\106\1\0\24\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\u0206\1\u0207\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u0208\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\u0209\1\0\1\54\1\0\2\54\1\u0209\2\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u020a\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u020b\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u020c\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\u020d\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\6\54\2\u020e\14\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u020f\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\u0210\1\0\1\54\1\0\24\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\u0211\1\0\1\54\1\0\24\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\14\54\2\u0212\6\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\u0213\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\6\106\2\u0214\14\106\1\0\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0214\1\u0215\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\0\2\u0216\20\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\22\106\2\u0217\1\0\22\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\20\106\2\u0218\2\106"+ + "\1\0\22\106\1\0\2\106\4\0\2\106\1\0\1\106"+ + "\1\0\1\106\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\u0216\1\u0219"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\u0217\1\u021a\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\11\1\0\2\106"+ + "\3\11\1\107\1\11\2\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0218\1\u021b\1\106\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\4\0\1\106\1\11\1\0\1\11"+ + "\1\0\1\11\5\0\1\106\1\0\1\106\1\0\5\106"+ + "\1\107\1\106\2\0\2\106\1\0\1\106\1\0\4\106"+ + "\2\u021c\16\106\1\0\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\5\0\1\106\1\0\1\11"+ + "\1\0\2\106\3\11\1\107\1\11\2\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\106\1\11\1\106\1\11\1\u021c"+ + "\1\u021d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\4\0\1\106\1\11"+ + "\1\0\1\11\1\0\1\11\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\u021e\1\0\1\54"+ + "\1\0\24\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\22\54\2\u021f\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\16\54\2\u0220\4\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\16\54\2\u0221\4\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\u0222\1\0\1\54\1\0\2\54\1\u0222"+ + "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\6\54\2\u0223\14\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\14\54\2\u0224\6\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\2\54\2\u0225\20\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\20\54\2\u0226"+ + "\2\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\10\54\2\u0227\10\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\24\106\1\0\20\106\2\u0228\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u0228\1\u0229\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\u022a\22\106\1\0\2\106"+ + "\4\0\2\106\1\0\1\106\1\0\1\106\5\0\1\106"+ + "\1\0\1\106\1\0\5\106\1\107\1\106\2\0\2\106"+ + "\1\0\1\106\1\0\24\106\1\0\2\106\2\u022b\16\106"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\106\1\0\5\106\1\107\1\106"+ + "\2\0\2\106\1\0\1\106\1\0\22\106\2\u022c\1\0"+ + "\22\106\1\0\2\106\4\0\2\106\1\0\1\106\1\0"+ + "\1\106\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\u022a\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\1\u022b"+ + "\1\u022d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\11\1\0\2\106\3\11"+ + "\1\107\1\11\2\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u022c\1\u022e\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\0"+ + "\1\106\1\11\4\0\1\106\1\11\1\0\1\11\1\0"+ + "\1\11\5\0\1\106\1\0\1\106\1\0\5\106\1\107"+ + "\1\106\2\0\2\106\1\0\1\106\1\0\6\106\2\u022f"+ + "\14\106\1\0\22\106\1\0\2\106\4\0\2\106\1\0"+ + "\1\106\1\0\1\106\5\0\1\106\1\0\1\11\1\0"+ + "\2\106\3\11\1\107\1\11\2\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\u022f\1\u0230\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\0\1\106\1\11\4\0\1\106\1\11\1\0"+ + "\1\11\1\0\1\11\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\16\54\2\u0231\4\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\14\54\2\u0232\6\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\4\54\2\u0233\16\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\4\54\2\u0234"+ + "\16\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\u0235\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\10\54\2\u0236\12\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\6\54\2\u0237\14\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\6\54\2\u0238\14\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\u0239\1\0\1\54\1\0\2\54\1\u0239"+ + "\2\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\24\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\7\0\1\u023a\7\0\1\u023b\5\0"+ + "\1\u023a\62\0\1\u023a\1\0\1\u023a\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\u023c\1\0"+ + "\1\106\1\0\24\106\1\0\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\6\106\2\u023d\14\106\1\0\22\106\1\0"+ + "\2\106\4\0\2\106\1\0\1\106\1\0\1\106\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\u023c\1\u023e\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\106\1\0\1\11\1\0\2\106\3\11\1\107\1\11"+ + "\2\0\1\106\1\11\1\0\1\11\1\0\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\u023d\1\u023f\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\0\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\0\1\106\1\11"+ + "\4\0\1\106\1\11\1\0\1\11\1\0\1\11\5\0"+ + "\1\106\1\0\1\106\1\0\5\106\1\107\1\106\2\0"+ + "\2\106\1\0\1\106\1\0\24\106\1\0\20\106\2\u0240"+ + "\1\0\2\106\4\0\2\106\1\0\1\106\1\0\1\106"+ + "\5\0\1\106\1\0\1\11\1\0\2\106\3\11\1\107"+ + "\1\11\2\0\1\106\1\11\1\0\1\11\1\0\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\u0240\1\u0241\1\0\1\106"+ + "\1\11\4\0\1\106\1\11\1\0\1\11\1\0\1\11"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\4\54\2\u0242\16\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\u0243\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\20\54\2\u0244\2\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\20\54\2\u0245\2\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\16\54\2\u0246\4\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\12\54"+ + "\2\u0247\10\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\16\54\2\u0248\4\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u0249"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\u024a"+ + "\1\0\1\54\1\0\24\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\u023a"+ + "\6\0\1\u024b\1\u023a\5\0\1\u023a\62\0\1\u023a\1\0"+ + "\1\u023a\16\0\1\u024b\101\0\1\106\1\0\1\106\1\0"+ + "\5\106\1\107\1\106\2\0\2\106\1\0\1\106\1\0"+ + "\6\106\2\u024c\14\106\1\0\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\106\1\0\5\106\1\107\1\106\2\0\2\106\1\0"+ + "\1\106\1\0\24\106\1\u024d\22\106\1\0\2\106\4\0"+ + "\2\106\1\0\1\106\1\0\1\106\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\u024c\1\u024e\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\0\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\106\1\0"+ + "\1\11\1\0\2\106\3\11\1\107\1\11\2\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\u024d\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\0\1\106\1\11\4\0\1\106"+ + "\1\11\1\0\1\11\1\0\1\11\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\20\54\2\u024f\2\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\24\54\1\0\10\54\2\u0250"+ + "\10\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\2\54\2\u0251"+ + "\20\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\5\0\1\54\1\0\1\54\1\0"+ + "\5\54\1\0\1\54\2\0\2\54\1\0\1\54\1\0"+ + "\2\54\2\u0252\20\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\4\54\2\u0253\16\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\14\54\2\u0254\6\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\24\54\1\0"+ + "\2\u0255\20\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\16\54"+ + "\2\u0256\4\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\106\1\0\1\106"+ + "\1\0\5\106\1\107\1\106\2\0\2\106\1\0\1\106"+ + "\1\0\24\106\1\u0257\22\106\1\0\2\106\4\0\2\106"+ + "\1\0\1\106\1\0\1\106\7\0\1\u0258\7\0\1\u0259"+ + "\5\0\1\u0258\62\0\1\u0258\1\0\1\u0258\5\0\1\106"+ + "\1\0\1\11\1\0\2\106\3\11\1\107\1\11\2\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\106\1\11\1\106\1\11\1\106\1\11\1\106"+ + "\1\11\1\u0257\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\106\1\11\1\106\1\11"+ + "\1\106\1\11\1\106\1\11\1\0\1\106\1\11\4\0"+ + "\1\106\1\11\1\0\1\11\1\0\1\11\5\0\1\54"+ + "\1\0\1\54\1\0\5\54\1\0\1\54\2\0\2\54"+ + "\1\0\1\54\1\0\2\54\2\u025a\20\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"+ + "\5\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\54\1\0\1\54\1\0\14\54\2\u025b\6\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u025c\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\u025d\1\0\1\54\1\0\24\54"+ + "\1\0\22\54\1\0\2\54\4\0\2\54\1\0\1\54"+ + "\1\0\1\54\5\0\1\54\1\0\1\54\1\0\5\54"+ + "\1\0\1\54\2\0\2\54\1\0\1\54\1\0\20\54"+ + "\2\u025e\2\54\1\0\22\54\1\0\2\54\4\0\2\54"+ + "\1\0\1\54\1\0\1\54\5\0\1\54\1\0\1\54"+ + "\1\0\5\54\1\0\1\54\2\0\2\54\1\0\1\54"+ + "\1\0\14\54\2\u025f\6\54\1\0\22\54\1\0\2\54"+ + "\4\0\2\54\1\0\1\54\1\0\1\54\7\0\1\u0260"+ + "\7\0\1\u0261\5\0\1\u0260\62\0\1\u0260\1\0\1\u0260"+ + "\7\0\1\u0258\6\0\1\u0262\1\u0258\5\0\1\u0258\62\0"+ + "\1\u0258\1\0\1\u0258\16\0\1\u0262\101\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\u0263\1\0"+ + "\1\54\1\0\24\54\1\0\22\54\1\0\2\54\4\0"+ + "\2\54\1\0\1\54\1\0\1\54\5\0\1\54\1\0"+ + "\1\54\1\0\5\54\1\0\1\54\2\0\2\54\1\0"+ + "\1\54\1\0\16\54\2\u0264\4\54\1\0\22\54\1\0"+ + "\2\54\4\0\2\54\1\0\1\54\1\0\1\54\5\0"+ + "\1\54\1\0\1\54\1\0\5\54\1\0\1\54\2\0"+ + "\2\54\1\0\1\54\1\0\2\54\2\u0265\20\54\1\0"+ + "\22\54\1\0\2\54\4\0\2\54\1\0\1\54\1\0"+ + "\1\54\5\0\1\54\1\0\1\54\1\0\5\54\1\0"+ + "\1\54\2\0\2\54\1\0\1\54\1\0\16\54\2\u0266"+ + "\4\54\1\0\22\54\1\0\2\54\4\0\2\54\1\0"+ + "\1\54\1\0\1\54\7\0\1\u0260\6\0\1\u0267\1\u0260"+ + "\5\0\1\u0260\62\0\1\u0260\1\0\1\u0260\16\0\1\u0267"+ + "\101\0\1\54\1\0\1\54\1\0\5\54\1\0\1\54"+ + "\2\0\2\u0268\1\0\1\54\1\0\24\54\1\0\22\54"+ + "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"; + + private static int[] zzUnpackTrans() { + int[] result = new int[38550]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\1\11\35\1\1\11\1\1\1\11\1\1\1\11" + + "\2\1\1\11\1\1\1\11\22\1\1\11\1\1\4\11" + + "\1\1\1\11\1\0\1\11\2\0\2\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\11\2\1\10\11\1\0" + + "\3\1\1\0\1\1\1\0\41\1\2\0\2\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\0\3\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\0\1\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\11\1\0\3\1" + + "\1\0\41\1\2\0\2\1\1\0\3\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\3\1\1\0\3\1" + + "\1\0\3\1\1\0\45\1\3\0\3\1\1\0\5\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\11\43\1\2\0\3\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\37\1" + + "\2\0\2\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\3\1\1\0\30\1\1\0\3\1\1\0\1\1" + + "\1\0\1\1\1\0\3\1\1\0\30\1\1\0\1\1" + + "\1\0\3\1\1\0\1\1\1\0\21\1\1\0\1\1" + + "\3\0\3\1\1\0\20\1\1\0\1\1\3\0\3\1" + + "\1\0\15\1\1\0\1\1\3\0\3\1\1\0\15\1" + + "\3\0\2\1\1\0\12\1\4\0\15\1\1\11\2\0" + + "\11\1\3\0\6\1\2\0\1\11\4\1\1\11\1\1"; + + private static int[] zzUnpackAttribute() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + /** + * the input device + */ + private java.io.Reader zzReader; + + /** + * the current state of the DFA + */ + private int zzState; + + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + StringBuffer string = new StringBuffer(); + boolean isMultiname = false; + long multinameId = 0; + + /** + * Create an empty lexer, yyrset will be called later to reset and assign + * the reader + */ + public Flasm3Lexer() { + + } + + public int yychar() { + return yychar; + } + + public int yyline() { + return yyline + 1; + } + + private final Stack pushedBack = new Stack<>(); + + public void pushback(ParsedSymbol symb) { + pushedBack.push(symb); + last = null; + } + ParsedSymbol last; + + public ParsedSymbol lex() throws java.io.IOException, ParseException { + ParsedSymbol ret = null; + if (!pushedBack.isEmpty()) { + ret = last = pushedBack.pop(); + } else { + ret = last = yylex(); + } + return ret; + } + + /** + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. + * + * @param in the java.io.Reader to read input from. + */ + public Flasm3Lexer(java.io.Reader in) { + this.zzReader = in; + } + + /** + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public Flasm3Lexer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ + + int j = 0; /* index in unpacked array */ + + while (i < 2260) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); + } + return map; + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + + /* first: make room (if you can) */ + if (zzStartRead > 0) { + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); + + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[zzCurrentPos * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + } + + /* finally: fill the buffer with new input */ + int numRead = zzReader.read(zzBuffer, zzEndRead, + zzBuffer.length - zzEndRead); + + if (numRead > 0) { + zzEndRead += numRead; + return false; + } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 + return true; + } + + /** + * Closes the input stream. + * + * @throws java.io.IOException + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + + zzEndRead = zzStartRead; /* invalidate buffer */ + + if (zzReader != null) { + zzReader.close(); + } + } + + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + } + + /** + * Returns the current lexical state. + * + * @return + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + /** + * Returns the text matched by the current regular expression. + * + * @return + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } + + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } + + /** + * Returns the length of the matched text region. + * + * @return + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } + + zzMarkedPos -= number; + } + + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.abc.avm2.parser.ParseException + */ + public ParsedSymbol yylex() throws java.io.IOException, ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + yychar += zzMarkedPosL - zzStartRead; + + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL[zzCurrentPosL]) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = zzBufferL[zzCurrentPosL++]; + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = zzBufferL[zzCurrentPosL++]; + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 45: { + isMultiname = true; + String s = yytext(); + multinameId = Long.parseLong(s.substring(2, s.length() - 2)); + yybegin(STRING); + string.setLength(0); + } + case 101: + break; + case 37: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE, yytext()); + } + case 102: + break; + case 57: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DOUBLE, yytext()); + } + case 103: + break; + case 32: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CODE, yytext()); + } + case 104: + break; + case 52: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METHOD, yytext()); + } + case 105: + break; + case 47: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CLASS, yytext()); + } + case 106: + break; + case 79: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMELA, yytext()); + } + case 107: + break; + case 74: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UINTEGER, yytext()); + } + case 108: + break; + case 59: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAMEA, yytext()); + } + case 109: + break; + case 8: { + return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); + } + case 110: + break; + case 58: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_GETTER, yytext()); + } + case 111: + break; + case 53: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TARGET, yytext()); + } + case 112: + break; + case 69: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OVERRIDE, yytext()); + } + case 113: + break; + case 93: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGENAMESPACE, yytext()); + } + case 114: + break; + case 61: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTEGER, yytext()); + } + case 115: + break; + case 22: { + string.append('\t'); + } + case 116: + break; + case 95: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_START, Integer.parseInt(s.substring(15, s.length() - 1))); + } + case 117: + break; + case 54: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SETTER, yytext()); + } + case 118: + break; + case 15: { + return new ParsedSymbol(ParsedSymbol.TYPE_LOWERTHAN, yytext()); + } + case 119: + break; + case 19: { + throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 120: + break; + case 42: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UTF8, yytext()); + } + case 121: + break; + case 96: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICITNAMESPACE, yytext()); + } + case 122: + break; + case 90: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_END, Integer.parseInt(s.substring(13, s.length() - 1))); + } + case 123: + break; + case 35: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_BODY, yytext()); + } + case 124: + break; + case 34: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FLAG, yytext()); + } + case 125: + break; + case 84: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMELA, yytext()); + } + case 126: + break; + case 78: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAMESPACE, yytext()); + } + case 127: + break; + case 94: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PRIVATENAMESPACE, yytext()); + } + case 128: + break; + case 9: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_OPEN, yytext()); + } + case 129: + break; + case 92: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_PARAM_NAMES, yytext()); + } + case 130: + break; + case 23: { + string.append('\n'); + } + case 131: + break; + case 64: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSTACK, yytext()); + } + case 132: + break; + case 36: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRUE, yytext()); + } + case 133: + break; + case 5: { + yybegin(PARAMETERS); + // length also includes the trailing quote + if (isMultiname) { + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + } else { + return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); + } + } + case 134: + break; + case 44: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRAIT, yytext()); + } + case 135: + break; + case 98: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_STATICPROTECTEDNS, yytext()); + } + case 136: + break; + case 82: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEA, yytext()); + } + case 137: + break; + case 80: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UNDEFINED, yytext()); + } + case 138: + break; + case 67: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICIT, yytext()); + } + case 139: + break; + case 4: { + throw new ParseException("Unterminated string at end of line", yyline + 1); + } + case 140: + break; + case 10: { + return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); + } + case 141: + break; + case 31: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRY, yytext()); + } + case 142: + break; + case 60: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RETURNS, yytext()); + } + case 143: + break; + case 89: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ARGUMENTS, yytext()); + } + case 144: + break; + case 43: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAM, yytext()); + } + case 145: + break; + case 99: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_TARGET, Integer.parseInt(s.substring(16, s.length() - 1))); + } + case 146: + break; + case 56: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DISPID, yytext()); + } + case 147: + break; + case 66: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA, yytext()); + } + case 148: + break; + case 18: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); + } + case 149: + break; + case 76: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAME, yytext()); + } + case 150: + break; + case 72: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEL, yytext()); + } + case 151: + break; + case 86: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_OPTIONAL, yytext()); + } + case 152: + break; + case 29: { + return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); + } + case 153: + break; + case 30: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TO, yytext()); + } + case 154: + break; + case 46: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CONST, yytext()); + } + case 155: + break; + case 24: { + string.append('\r'); + } + case 156: + break; + case 48: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FINAL, yytext()); + } + case 157: + break; + case 63: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DECIMAL, yytext()); + } + case 158: + break; + case 26: { + string.append('\b'); + } + case 159: + break; + case 87: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSCOPEDEPTH, yytext()); + } + case 160: + break; + case 49: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FALSE, yytext()); + } + case 161: + break; + case 73: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FUNCTION, yytext()); + } + case 162: + break; + case 27: { + string.append('\"'); + } + case 163: + break; + case 70: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SET_DXNS, yytext()); + } + case 164: + break; + case 39: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NULL, yytext()); + } + case 165: + break; + case 88: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INITSCOPEDEPTH, yytext()); + } + case 166: + break; + case 41: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FROM, yytext()); + } + case 167: + break; + case 14: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_CLOSE, yytext()); + } + case 168: + break; + case 2: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); + } + case 169: + break; + case 28: { + string.append('\''); + } + case 170: + break; + case 11: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_CLOSE, yytext()); + } + case 171: + break; + case 21: { + string.append('\\'); + } + case 172: + break; + case 6: { + yybegin(YYINITIAL); + } + case 173: + break; + case 17: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMA, yytext()); + } + case 174: + break; + case 97: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGEINTERNALNS, yytext()); + } + case 175: + break; + case 16: { + return new ParsedSymbol(ParsedSymbol.TYPE_GREATERTHAN, yytext()); + } + case 176: + break; + case 77: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_REST, yytext()); + } + case 177: + break; + case 12: { + isMultiname = false; + yybegin(STRING); + string.setLength(0); + } + case 178: + break; + case 68: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPENAME, yytext()); + } + case 179: + break; + case 40: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOT, yytext()); + } + case 180: + break; + case 100: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNAMESPACE, yytext()); + } + case 181: + break; + case 75: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAMNAME, yytext()); + } + case 182: + break; + case 25: { + string.append('\f'); + } + case 183: + break; + case 13: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_OPEN, yytext()); + } + case 184: + break; + case 33: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 185: + break; + case 91: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ACTIVATION, yytext()); + } + case 186: + break; + case 51: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VALUE, yytext()); + } + case 187: + break; + case 55: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOTID, yytext()); + } + case 188: + break; + case 85: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IGNORE_REST, yytext()); + } + case 189: + break; + case 50: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAME, yytext()); + } + case 190: + break; + case 3: { + string.append(yytext()); + } + case 191: + break; + case 7: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT, yytext().substring(1)); + } + case 192: + break; + case 81: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_LOCALCOUNT, yytext()); + } + case 193: + break; + case 71: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEA, yytext()); + } + case 194: + break; + case 65: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OPTIONAL, yytext()); + } + case 195: + break; + case 20: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 196: + break; + case 38: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 197: + break; + case 83: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEL, yytext()); + } + case 198: + break; + case 62: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAME, yytext()); + } + case 199: + break; + case 1: { + } + case 200: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(ParsedSymbol.TYPE_EOF); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java new file mode 100644 index 000000000..1b050512c --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; + +public interface MissingSymbolHandler { + + public boolean missingString(String value); + + public boolean missingInt(long value); + + public boolean missingUInt(long value); + + public boolean missingDouble(double value); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java similarity index 86% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java index ca75c53eb..239af3f37 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ParsedSymbol.java @@ -1,117 +1,116 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; - -public class ParsedSymbol { - - public int type; - public Object value; - public static final int TYPE_STRING = 1; - public static final int TYPE_MULTINAME = 2; - public static final int TYPE_INSTRUCTION_NAME = 3; - public static final int TYPE_INTEGER = 4; - public static final int TYPE_FLOAT = 5; - public static final int TYPE_IDENTIFIER = 6; - public static final int TYPE_EOF = 7; - public static final int TYPE_LABEL = 8; - public static final int TYPE_COMMENT = 9; - public static final int TYPE_EXCEPTION_START = 10; - public static final int TYPE_EXCEPTION_END = 11; - public static final int TYPE_EXCEPTION_TARGET = 12; - public static final int TYPE_KEYWORD_QNAME = 13; - public static final int TYPE_KEYWORD_QNAMEA = 14; - public static final int TYPE_KEYWORD_RTQNAME = 15; - public static final int TYPE_KEYWORD_RTQNAMEA = 16; - public static final int TYPE_KEYWORD_RTQNAMEL = 17; - public static final int TYPE_KEYWORD_RTQNAMELA = 18; - public static final int TYPE_KEYWORD_MULTINAME = 19; - public static final int TYPE_KEYWORD_MULTINAMEA = 20; - public static final int TYPE_KEYWORD_MULTINAMEL = 21; - public static final int TYPE_KEYWORD_MULTINAMELA = 22; - public static final int TYPE_KEYWORD_TYPENAME = 23; - public static final int TYPE_PARENT_OPEN = 24; - public static final int TYPE_PARENT_CLOSE = 25; - public static final int TYPE_COMMA = 26; - public static final int TYPE_KEYWORD_NULL = 27; - public static final int TYPE_BRACKET_OPEN = 28; - public static final int TYPE_BRACKET_CLOSE = 29; - public static final int TYPE_LOWERTHAN = 30; - public static final int TYPE_GREATERTHAN = 31; - public static final int TYPE_KEYWORD_NAMESPACE = 32; - public static final int TYPE_KEYWORD_PRIVATENAMESPACE = 33; - public static final int TYPE_KEYWORD_PACKAGENAMESPACE = 34; - public static final int TYPE_KEYWORD_PACKAGEINTERNALNS = 35; - public static final int TYPE_KEYWORD_PROTECTEDNAMESPACE = 36; - public static final int TYPE_KEYWORD_EXPLICITNAMESPACE = 37; - public static final int TYPE_KEYWORD_STATICPROTECTEDNS = 38; - public static final int TYPE_KEYWORD_TRY = 39; - public static final int TYPE_KEYWORD_FROM = 40; - public static final int TYPE_KEYWORD_TO = 41; - public static final int TYPE_KEYWORD_TARGET = 42; - public static final int TYPE_KEYWORD_TYPE = 43; - public static final int TYPE_KEYWORD_NAME = 44; - public static final int TYPE_KEYWORD_FLAG = 45; - public static final int TYPE_KEYWORD_EXPLICIT = 46; - public static final int TYPE_KEYWORD_HAS_OPTIONAL = 47; - public static final int TYPE_KEYWORD_HAS_PARAM_NAMES = 48; - public static final int TYPE_KEYWORD_IGNORE_REST = 49; - public static final int TYPE_KEYWORD_NEED_ACTIVATION = 50; - public static final int TYPE_KEYWORD_NEED_ARGUMENTS = 51; - public static final int TYPE_KEYWORD_NEED_REST = 52; - public static final int TYPE_KEYWORD_SET_DXNS = 53; - public static final int TYPE_KEYWORD_PARAM = 54; - public static final int TYPE_KEYWORD_PARAMNAME = 55; - public static final int TYPE_KEYWORD_OPTIONAL = 56; - public static final int TYPE_KEYWORD_RETURNS = 57; - public static final int TYPE_KEYWORD_BODY = 58; - public static final int TYPE_KEYWORD_MAXSTACK = 59; - public static final int TYPE_KEYWORD_LOCALCOUNT = 60; - public static final int TYPE_KEYWORD_INITSCOPEDEPTH = 61; - public static final int TYPE_KEYWORD_MAXSCOPEDEPTH = 62; - public static final int TYPE_KEYWORD_CODE = 63; - public static final int TYPE_KEYWORD_INTEGER = 64; - public static final int TYPE_KEYWORD_UINTEGER = 65; - public static final int TYPE_KEYWORD_DOUBLE = 66; - public static final int TYPE_KEYWORD_DECIMAL = 67; - public static final int TYPE_KEYWORD_UTF8 = 68; - public static final int TYPE_KEYWORD_TRUE = 69; - public static final int TYPE_KEYWORD_FALSE = 70; - public static final int TYPE_KEYWORD_UNDEFINED = 71; - public static final int TYPE_KEYWORD_TRAIT = 72; - public static final int TYPE_KEYWORD_SLOT = 73; - public static final int TYPE_KEYWORD_CONST = 74; - public static final int TYPE_KEYWORD_METHOD = 75; - public static final int TYPE_KEYWORD_GETTER = 76; - public static final int TYPE_KEYWORD_SETTER = 77; - public static final int TYPE_KEYWORD_CLASS = 78; - public static final int TYPE_KEYWORD_FUNCTION = 79; - public static final int TYPE_KEYWORD_DISPID = 80; - public static final int TYPE_KEYWORD_SLOTID = 81; - public static final int TYPE_KEYWORD_VALUE = 82; - public static final int TYPE_KEYWORD_FINAL = 83; - public static final int TYPE_KEYWORD_METADATA = 84; - public static final int TYPE_KEYWORD_OVERRIDE = 85; - - public ParsedSymbol(int type, Object value) { - this.type = type; - this.value = value; - } - - public ParsedSymbol(int type) { - this.type = type; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; + +public class ParsedSymbol { + + public int type; + public Object value; + public static final int TYPE_STRING = 1; + public static final int TYPE_MULTINAME = 2; + public static final int TYPE_INSTRUCTION_NAME = 3; + public static final int TYPE_INTEGER = 4; + public static final int TYPE_FLOAT = 5; + public static final int TYPE_IDENTIFIER = 6; + public static final int TYPE_EOF = 7; + public static final int TYPE_LABEL = 8; + public static final int TYPE_COMMENT = 9; + public static final int TYPE_EXCEPTION_START = 10; + public static final int TYPE_EXCEPTION_END = 11; + public static final int TYPE_EXCEPTION_TARGET = 12; + public static final int TYPE_KEYWORD_QNAME = 13; + public static final int TYPE_KEYWORD_QNAMEA = 14; + public static final int TYPE_KEYWORD_RTQNAME = 15; + public static final int TYPE_KEYWORD_RTQNAMEA = 16; + public static final int TYPE_KEYWORD_RTQNAMEL = 17; + public static final int TYPE_KEYWORD_RTQNAMELA = 18; + public static final int TYPE_KEYWORD_MULTINAME = 19; + public static final int TYPE_KEYWORD_MULTINAMEA = 20; + public static final int TYPE_KEYWORD_MULTINAMEL = 21; + public static final int TYPE_KEYWORD_MULTINAMELA = 22; + public static final int TYPE_KEYWORD_TYPENAME = 23; + public static final int TYPE_PARENT_OPEN = 24; + public static final int TYPE_PARENT_CLOSE = 25; + public static final int TYPE_COMMA = 26; + public static final int TYPE_KEYWORD_NULL = 27; + public static final int TYPE_BRACKET_OPEN = 28; + public static final int TYPE_BRACKET_CLOSE = 29; + public static final int TYPE_LOWERTHAN = 30; + public static final int TYPE_GREATERTHAN = 31; + public static final int TYPE_KEYWORD_NAMESPACE = 32; + public static final int TYPE_KEYWORD_PRIVATENAMESPACE = 33; + public static final int TYPE_KEYWORD_PACKAGENAMESPACE = 34; + public static final int TYPE_KEYWORD_PACKAGEINTERNALNS = 35; + public static final int TYPE_KEYWORD_PROTECTEDNAMESPACE = 36; + public static final int TYPE_KEYWORD_EXPLICITNAMESPACE = 37; + public static final int TYPE_KEYWORD_STATICPROTECTEDNS = 38; + public static final int TYPE_KEYWORD_TRY = 39; + public static final int TYPE_KEYWORD_FROM = 40; + public static final int TYPE_KEYWORD_TO = 41; + public static final int TYPE_KEYWORD_TARGET = 42; + public static final int TYPE_KEYWORD_TYPE = 43; + public static final int TYPE_KEYWORD_NAME = 44; + public static final int TYPE_KEYWORD_FLAG = 45; + public static final int TYPE_KEYWORD_EXPLICIT = 46; + public static final int TYPE_KEYWORD_HAS_OPTIONAL = 47; + public static final int TYPE_KEYWORD_HAS_PARAM_NAMES = 48; + public static final int TYPE_KEYWORD_IGNORE_REST = 49; + public static final int TYPE_KEYWORD_NEED_ACTIVATION = 50; + public static final int TYPE_KEYWORD_NEED_ARGUMENTS = 51; + public static final int TYPE_KEYWORD_NEED_REST = 52; + public static final int TYPE_KEYWORD_SET_DXNS = 53; + public static final int TYPE_KEYWORD_PARAM = 54; + public static final int TYPE_KEYWORD_PARAMNAME = 55; + public static final int TYPE_KEYWORD_OPTIONAL = 56; + public static final int TYPE_KEYWORD_RETURNS = 57; + public static final int TYPE_KEYWORD_BODY = 58; + public static final int TYPE_KEYWORD_MAXSTACK = 59; + public static final int TYPE_KEYWORD_LOCALCOUNT = 60; + public static final int TYPE_KEYWORD_INITSCOPEDEPTH = 61; + public static final int TYPE_KEYWORD_MAXSCOPEDEPTH = 62; + public static final int TYPE_KEYWORD_CODE = 63; + public static final int TYPE_KEYWORD_INTEGER = 64; + public static final int TYPE_KEYWORD_UINTEGER = 65; + public static final int TYPE_KEYWORD_DOUBLE = 66; + public static final int TYPE_KEYWORD_DECIMAL = 67; + public static final int TYPE_KEYWORD_UTF8 = 68; + public static final int TYPE_KEYWORD_TRUE = 69; + public static final int TYPE_KEYWORD_FALSE = 70; + public static final int TYPE_KEYWORD_UNDEFINED = 71; + public static final int TYPE_KEYWORD_TRAIT = 72; + public static final int TYPE_KEYWORD_SLOT = 73; + public static final int TYPE_KEYWORD_CONST = 74; + public static final int TYPE_KEYWORD_METHOD = 75; + public static final int TYPE_KEYWORD_GETTER = 76; + public static final int TYPE_KEYWORD_SETTER = 77; + public static final int TYPE_KEYWORD_CLASS = 78; + public static final int TYPE_KEYWORD_FUNCTION = 79; + public static final int TYPE_KEYWORD_DISPID = 80; + public static final int TYPE_KEYWORD_SLOTID = 81; + public static final int TYPE_KEYWORD_VALUE = 82; + public static final int TYPE_KEYWORD_FINAL = 83; + public static final int TYPE_KEYWORD_METADATA = 84; + public static final int TYPE_KEYWORD_OVERRIDE = 85; + + public ParsedSymbol(int type, Object value) { + this.type = type; + this.value = value; + } + + public ParsedSymbol(int type) { + this.type = type; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java similarity index 99% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index d93577fdc..e1e506fe8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java similarity index 99% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java index 0540f3e1b..ad4805d5d 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java @@ -1,21 +1,18 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT */ - /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException; import java.util.Stack; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java similarity index 99% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java index cf495c625..2b151406b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SWC; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java similarity index 92% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java index 9b66d7ab8..727c64aab 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AssignableAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java new file mode 100644 index 000000000..e59e7fab9 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; + +/** + * + * @author JPEXS + */ +public class BreakJumpIns extends JumpIns { + + private final long loopId; + + public BreakJumpIns(long loopId) { + this.loopId = loopId; + } + + public long getLoopId() { + return loopId; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java similarity index 93% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java index afa9b77a2..f24a321fe 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java similarity index 81% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java index 10d04ecbc..8aefb79a2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ClassAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java index 10d31eb7a..64b532858 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java similarity index 87% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java index 4baa614c5..f9717ca3e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java new file mode 100644 index 000000000..4b7b97799 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; + +/** + * + * @author JPEXS + */ +public class ContinueJumpIns extends JumpIns { + + private final long loopId; + + public ContinueJumpIns(long loopId) { + this.loopId = loopId; + } + + public long getLoopId() { + return loopId; + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java similarity index 59% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java index 6a64913cd..a5002e3ce 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ExceptionMarkAVM2Instruction.java @@ -1,43 +1,42 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -/** - * - * @author JPEXS - */ -public class ExceptionMarkAVM2Instruction extends AVM2Instruction { - - public int markType; - public int exceptionId; - - public ExceptionMarkAVM2Instruction(int exceptionId, int markType) { - super(0, null, new int[0], new byte[0]); - this.markType = markType; - this.exceptionId = exceptionId; - this.definition = new InstructionDefinition(0, "--mark", new int[0]); - } - - @Override - public byte[] getBytes() { - return new byte[0]; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; +import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; + +/** + * + * @author JPEXS + */ +public class ExceptionMarkAVM2Instruction extends AVM2Instruction { + + public int markType; + public int exceptionId; + + public ExceptionMarkAVM2Instruction(int exceptionId, int markType) { + super(0, null, new int[0], new byte[0]); + this.markType = markType; + this.exceptionId = exceptionId; + this.definition = new InstructionDefinition(0, "--mark", new int[0]); + } + + @Override + public byte[] getBytes() { + return new byte[0]; + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java similarity index 50% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java index 06954388b..b3350e106 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FinallyJumpIns.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java similarity index 83% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java index 0599f8877..a0c07b8c3 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/FunctionAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java index 4799b17cd..a38dad14b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/GetterAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.graph.GraphTargetItem; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java similarity index 92% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java index 8116b6b35..6438b08ae 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/IndexAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java similarity index 71% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java index feb1eb92c..d792cc6c8 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/InterfaceAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java new file mode 100644 index 000000000..9f94d2531 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class LexBufferer implements LexListener { + + private final List items = new ArrayList<>(); + + @Override + public void onLex(ParsedSymbol s) { + items.add(s); + } + + @Override + public void onPushBack(ParsedSymbol s) { + if (items.get(items.size() - 1) == s) { + items.remove(items.size() - 1); + } + } + + public void pushAllBack(ActionScriptLexer lexer) { + for (int i = items.size() - 1; i >= 0; i--) { + lexer.pushback(items.get(i)); + } + items.clear(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java new file mode 100644 index 000000000..2bdf8ca03 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +/** + * + * @author JPEXS + */ +public interface LexListener { + + public void onLex(ParsedSymbol s); + + public void onPushBack(ParsedSymbol s); +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java index d9429cbc8..187219e98 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/MethodAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java similarity index 95% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java index 7e0828868..67ae9ed35 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java similarity index 96% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java index e6a33eccc..99751f32e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespacedAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java similarity index 72% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java index 5a9f7b1e3..8c6756da7 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PackageAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java similarity index 59% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java index 1ea45dbfb..fe41ee820 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ParsedSymbol.java @@ -1,61 +1,60 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -/** - * - * @author JPEXS - */ -public class ParsedSymbol { - - public SymbolGroup group; - public Object value; - public SymbolType type; - - public ParsedSymbol(SymbolGroup group, SymbolType type) { - this.group = group; - this.type = type; - this.value = null; - } - - public ParsedSymbol(SymbolGroup group, SymbolType type, Object value) { - this.group = group; - this.type = type; - this.value = value; - } - - @Override - public String toString() { - return group.toString() + " " + type.toString() + " " + (value != null ? value.toString() : ""); - } - - public boolean isType(Object... types) { - for (Object t : types) { - if (t instanceof SymbolGroup) { - if (group == t) { - return true; - } - } - if (t instanceof SymbolType) { - if (type == t) { - return true; - } - } - } - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +/** + * + * @author JPEXS + */ +public class ParsedSymbol { + + public SymbolGroup group; + public Object value; + public SymbolType type; + + public ParsedSymbol(SymbolGroup group, SymbolType type) { + this.group = group; + this.type = type; + this.value = null; + } + + public ParsedSymbol(SymbolGroup group, SymbolType type, Object value) { + this.group = group; + this.type = type; + this.value = value; + } + + @Override + public String toString() { + return group.toString() + " " + type.toString() + " " + (value != null ? value.toString() : ""); + } + + public boolean isType(Object... types) { + for (Object t : types) { + if (t instanceof SymbolGroup) { + if (group == t) { + return true; + } + } + if (t instanceof SymbolType) { + if (type == t) { + return true; + } + } + } + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java similarity index 98% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index eec9d57db..ec92311e1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java new file mode 100644 index 000000000..49e15168d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +/** + * + * @author JPEXS + * @param + */ +public class Reference { + + private T val; + + public Reference(T val) { + this.val = val; + } + + public T getVal() { + return val; + } + + public void setVal(T val) { + this.val = val; + } + + @Override + public String toString() { + return val.toString(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java similarity index 63% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java index 519d54d7a..510661afb 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SetterAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.graph.GraphTargetItem; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java similarity index 74% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java index 2cab6b01e..c2eee6e95 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SlotAVM2Item.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java new file mode 100644 index 000000000..f5f3ca3b0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +/** + * + * @author JPEXS + */ +public enum SymbolGroup { + + OPERATOR, + KEYWORD, + STRING, + COMMENT, + XML, + IDENTIFIER, + INTEGER, + DOUBLE, + TYPENAME, + EOF, + //GLOBALFUNC, + GLOBALCONST +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java similarity index 77% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java index df2cb4386..f92f37340 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java @@ -1,206 +1,205 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -/** - * - * @author JPEXS - */ -public enum SymbolType { - //Keywords - - BREAK, - CASE, - CONTINUE, - DEFAULT, - DO, - WHILE, - ELSE, - FOR, - EACH, - IN, - IF, - RETURN, - SUPER, - SWITCH, - THROW, - TRY, - CATCH, - FINALLY, - WITH, - DYNAMIC, - INTERNAL, - OVERRIDE, - PRIVATE, - PROTECTED, - PUBLIC, - STATIC, - CLASS, - CONST, - EXTENDS, - FUNCTION, - GET, - IMPLEMENTS, - INTERFACE, - NAMESPACE, - PACKAGE, - SET, - VAR, - IMPORT, - USE, - FALSE, - NULL, - THIS, - TRUE, - //Operators - PARENT_OPEN, - PARENT_CLOSE, - CURLY_OPEN, - CURLY_CLOSE, - BRACKET_OPEN, - BRACKET_CLOSE, - SEMICOLON, - COMMA, - REST, - DOT, - ASSIGN, - GREATER_THAN, - LOWER_THAN, - NOT, - NEGATE, - TERNAR, - COLON, - EQUALS, - STRICT_EQUALS, - LOWER_EQUAL, - GREATER_EQUAL, - NOT_EQUAL, - STRICT_NOT_EQUAL, - AND, - OR, - INCREMENT, - DECREMENT, - PLUS, - MINUS, - MULTIPLY, - DIVIDE, - BITAND, - BITOR, - XOR, - MODULO, - SHIFT_LEFT, - SHIFT_RIGHT, - USHIFT_RIGHT, - ASSIGN_PLUS, - ASSIGN_MINUS, - ASSIGN_MULTIPLY, - ASSIGN_DIVIDE, - ASSIGN_BITAND, - ASSIGN_BITOR, - ASSIGN_XOR, - ASSIGN_MODULO, - ASSIGN_SHIFT_LEFT, - ASSIGN_SHIFT_RIGHT, - ASSIGN_USHIFT_RIGHT, - AS, - DELETE, - INSTANCEOF, - IS, - NAMESPACE_OP, - NEW, - TYPEOF, - VOID, - ATTRIBUTE, - //Other - STRING, - COMMENT, - //XML, - IDENTIFIER, - INTEGER, - DOUBLE, - TYPENAME, - EOF, - //TRACE, - //GETURL, - //GOTOANDSTOP, - //NEXTFRAME, - //PLAY, - //PREVFRAME, - //TELLTARGET, - //STOP, - //STOPALLSOUNDS, - //TOGGLEHIGHQUALITY, - //ORD, - //CHR, - //DUPLICATEMOVIECLIP, - //STOPDRAG, - //GETTIMER, - //LOADVARIABLES, - //LOADMOVIE, - //GOTOANDPLAY, - //MBORD, - //MBCHR, - //MBLENGTH, - //MBSUBSTRING, - //RANDOM, - //REMOVEMOVIECLIP, - //STARTDRAG, - //SUBSTR, - //LENGTH, //string.length - INT, - //TARGETPATH, - NUMBER_OP, - STRING_OP, - //IFFRAMELOADED, - INFINITY, - //EVAL, - UNDEFINED, - //NEWLINE, - NAN, - //GETVERSION, - //CALL, - //LOADMOVIENUM, - //LOADVARIABLESNUM, - //PRINT, - //PRINTNUM, - //PRINTASBITMAP, - //PRINTASBITMAPNUM, - //UNLOADMOVIE, - //UNLOADMOVIENUM, - FINAL, - XML_STARTTAG_BEGIN, // - XML_FINISHVARTAG_BEGIN, // - XML_STARTFINISHTAG_END, // /> - XML_COMMENT, // - XML_CDATA, // - XML_INSTR_BEGIN, // - XML_VAR_BEGIN, // { - XML_ATTRIBUTENAME, // aaa= - XML_ATTRIBUTEVALUE, // "vvv" - XML_TEXT, - XML_ATTRNAMEVAR_BEGIN, // {...}= - XML_ATTRVALVAR_BEGIN, // aaa={ - XML_INSTRATTRNAMEVAR_BEGIN, // {...}= - XML_INSTRATTRVALVAR_BEGIN, // aaa={ - XML_INSTRVARTAG_BEGIN, // + XML_FINISHVARTAG_BEGIN, // + XML_STARTFINISHTAG_END, // /> + XML_COMMENT, // + XML_CDATA, // + XML_INSTR_BEGIN, // + XML_VAR_BEGIN, // { + XML_ATTRIBUTENAME, // aaa= + XML_ATTRIBUTEVALUE, // "vvv" + XML_TEXT, + XML_ATTRNAMEVAR_BEGIN, // {...}= + XML_ATTRVALVAR_BEGIN, // aaa={ + XML_INSTRATTRNAMEVAR_BEGIN, // {...}= + XML_INSTRATTRVALVAR_BEGIN, // aaa={ + XML_INSTRVARTAG_BEGIN, // . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java similarity index 78% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java index 8c73ddf8f..1a49c8074 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLAVM2Item.java @@ -1,71 +1,70 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetLexIns; -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.abc.types.Namespace; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class XMLAVM2Item extends AVM2Item { - - public XMLAVM2Item(GraphTargetItem value) { - super(null, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return value.appendTo(writer, localData); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("XML"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - AVM2SourceGenerator g = (AVM2SourceGenerator) generator; - return toSourceMerge(localData, generator, - ins(new GetLexIns(), g.abc.constants.getMultinameId(new Multiname(Multiname.QNAME, g.abc.constants.getStringId("XML", true), g.abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PACKAGE, g.abc.constants.getStringId("", true)), 0, true), 0, 0, new ArrayList()), true)), - value, - ins(new ConstructIns(), 1) - ); - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetLexIns; +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class XMLAVM2Item extends AVM2Item { + + public XMLAVM2Item(GraphTargetItem value) { + super(null, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return value.appendTo(writer, localData); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("XML"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + AVM2SourceGenerator g = (AVM2SourceGenerator) generator; + return toSourceMerge(localData, generator, + ins(new GetLexIns(), g.abc.constants.getMultinameId(new Multiname(Multiname.QNAME, g.abc.constants.getStringId("XML", true), g.abc.constants.getNamespaceId(new Namespace(Namespace.KIND_PACKAGE, g.abc.constants.getStringId("", true)), 0, true), 0, 0, new ArrayList()), true)), + value, + ins(new ConstructIns(), 1) + ); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java similarity index 73% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java index 97d26b720..9c4643442 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/XMLFilterAVM2Item.java @@ -1,66 +1,65 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class XMLFilterAVM2Item extends AVM2Item { - - public List openedNamespaces; - public GraphTargetItem object; - - public XMLFilterAVM2Item(GraphTargetItem object, GraphTargetItem value, List openedNamespaces) { - super(null, NOPRECEDENCE); - this.value = value; - this.openedNamespaces = openedNamespaces; - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return null; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return new TypeItem("String"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return ((AVM2SourceGenerator) generator).generate(localData, this); - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.avm2.parser.script; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class XMLFilterAVM2Item extends AVM2Item { + + public List openedNamespaces; + public GraphTargetItem object; + + public XMLFilterAVM2Item(GraphTargetItem object, GraphTargetItem value, List openedNamespaces) { + super(null, NOPRECEDENCE); + this.value = value; + this.openedNamespaces = openedNamespaces; + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return null; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return new TypeItem("String"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return ((AVM2SourceGenerator) generator).generate(localData, this); + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/actionscript.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/actionscript.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/actionscript.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/actionscript.flex diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt similarity index 88% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt index ca542c0b0..40deffdfd 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/diff.txt @@ -1,6 +1,6 @@ -List of differences between FFDec and official compiler --------------------------------------------------------- -- Maximal stack count in method body can be lower in FFDec as official compiler in some cases calculates it wrong (e.g. increments and set/get property). -- In names of type Multiname(L/LA), namespaceset can have namespaces in different order, this is because official compiler generates - this based on constructor position inside class +List of differences between FFDec and official compiler +-------------------------------------------------------- +- Maximal stack count in method body can be lower in FFDec as official compiler in some cases calculates it wrong (e.g. increments and set/get property). +- In names of type Multiname(L/LA), namespaceset can have namespaces in different order, this is because official compiler generates + this based on constructor position inside class - XML literal has different rules for string addition \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt similarity index 96% rename from src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt index c4b72bb49..c1ac0c709 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/todo.txt @@ -1,3 +1,3 @@ -TODO List for AS3 parser/compiler: ------------------------------- -- ??? +TODO List for AS3 parser/compiler: +------------------------------ +- ??? diff --git a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java similarity index 95% rename from src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java index a14e17588..76582e11c 100644 --- a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java @@ -1,1092 +1,1091 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; - -/** - * This class is a scanner generated by JFlex - * 1.4.3 on 11.7.11 15:46 from the specification file - * D:/Dokumenty/Programovani/JavaSE/ASDec/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex - */ -public final class MethodInfoLexer { - - /** - * This character denotes the end of file - */ - public static final int YYEOF = -1; - /** - * initial size of the lookahead buffer - */ - private static final int ZZ_BUFFERSIZE = 16384; - /** - * lexical states - */ - public static final int STRING = 2; - public static final int YYINITIAL = 0; - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the - * beginning of a line l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1 - }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED - = "\11\5\1\3\1\2\1\0\1\3\1\1\16\5\4\0\1\3\1\0" - + "\1\42\1\0\1\4\2\0\1\56\2\0\1\45\1\37\1\44\1\7" - + "\1\35\1\0\1\6\3\57\4\40\2\10\1\43\2\0\1\46\3\0" - + "\4\4\1\36\6\4\1\31\1\4\1\25\1\4\1\17\12\4\1\12" - + "\1\41\1\13\1\0\1\4\1\0\1\32\1\27\1\50\1\51\1\24" - + "\1\55\1\53\1\4\1\21\1\4\1\52\1\33\1\11\1\14\1\20" - + "\1\47\1\4\1\30\1\15\1\22\1\26\1\23\1\4\1\54\2\4" - + "\1\16\1\0\1\34\1\0\41\5\2\0\4\4\4\0\1\4\2\0" - + "\1\5\7\0\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0" - + "\u013f\4\31\0\162\4\4\0\14\4\16\0\5\4\11\0\1\4\21\0" - + "\130\5\5\0\23\5\12\0\1\4\13\0\1\4\1\0\3\4\1\0" - + "\1\4\1\0\24\4\1\0\54\4\1\0\46\4\1\0\5\4\4\0" - + "\202\4\1\0\4\5\3\0\105\4\1\0\46\4\2\0\2\4\6\0" - + "\20\4\41\0\46\4\2\0\1\4\7\0\47\4\11\0\21\5\1\0" - + "\27\5\1\0\3\5\1\0\1\5\1\0\2\5\1\0\1\5\13\0" - + "\33\4\5\0\3\4\15\0\4\5\14\0\6\5\13\0\32\4\5\0" - + "\13\4\16\5\7\0\12\5\4\0\2\4\1\5\143\4\1\0\1\4" - + "\10\5\1\0\6\5\2\4\2\5\1\0\4\5\2\4\12\5\3\4" - + "\2\0\1\4\17\0\1\5\1\4\1\5\36\4\33\5\2\0\3\4" - + "\60\0\46\4\13\5\1\4\u014f\0\3\5\66\4\2\0\1\5\1\4" - + "\20\5\2\0\1\4\4\5\3\0\12\4\2\5\2\0\12\5\21\0" - + "\3\5\1\0\10\4\2\0\2\4\2\0\26\4\1\0\7\4\1\0" - + "\1\4\3\0\4\4\2\0\1\5\1\4\7\5\2\0\2\5\2\0" - + "\3\5\11\0\1\5\4\0\2\4\1\0\3\4\2\5\2\0\12\5" - + "\4\4\15\0\3\5\1\0\6\4\4\0\2\4\2\0\26\4\1\0" - + "\7\4\1\0\2\4\1\0\2\4\1\0\2\4\2\0\1\5\1\0" - + "\5\5\4\0\2\5\2\0\3\5\13\0\4\4\1\0\1\4\7\0" - + "\14\5\3\4\14\0\3\5\1\0\11\4\1\0\3\4\1\0\26\4" - + "\1\0\7\4\1\0\2\4\1\0\5\4\2\0\1\5\1\4\10\5" - + "\1\0\3\5\1\0\3\5\2\0\1\4\17\0\2\4\2\5\2\0" - + "\12\5\1\0\1\4\17\0\3\5\1\0\10\4\2\0\2\4\2\0" - + "\26\4\1\0\7\4\1\0\2\4\1\0\5\4\2\0\1\5\1\4" - + "\6\5\3\0\2\5\2\0\3\5\10\0\2\5\4\0\2\4\1\0" - + "\3\4\4\0\12\5\1\0\1\4\20\0\1\5\1\4\1\0\6\4" - + "\3\0\3\4\1\0\4\4\3\0\2\4\1\0\1\4\1\0\2\4" - + "\3\0\2\4\3\0\3\4\3\0\10\4\1\0\3\4\4\0\5\5" - + "\3\0\3\5\1\0\4\5\11\0\1\5\17\0\11\5\11\0\1\4" - + "\7\0\3\5\1\0\10\4\1\0\3\4\1\0\27\4\1\0\12\4" - + "\1\0\5\4\4\0\7\5\1\0\3\5\1\0\4\5\7\0\2\5" - + "\11\0\2\4\4\0\12\5\22\0\2\5\1\0\10\4\1\0\3\4" - + "\1\0\27\4\1\0\12\4\1\0\5\4\2\0\1\5\1\4\7\5" - + "\1\0\3\5\1\0\4\5\7\0\2\5\7\0\1\4\1\0\2\4" - + "\4\0\12\5\22\0\2\5\1\0\10\4\1\0\3\4\1\0\27\4" - + "\1\0\20\4\4\0\6\5\2\0\3\5\1\0\4\5\11\0\1\5" - + "\10\0\2\4\4\0\12\5\22\0\2\5\1\0\22\4\3\0\30\4" - + "\1\0\11\4\1\0\1\4\2\0\7\4\3\0\1\5\4\0\6\5" - + "\1\0\1\5\1\0\10\5\22\0\2\5\15\0\60\4\1\5\2\4" - + "\7\5\4\0\10\4\10\5\1\0\12\5\47\0\2\4\1\0\1\4" - + "\2\0\2\4\1\0\1\4\2\0\1\4\6\0\4\4\1\0\7\4" - + "\1\0\3\4\1\0\1\4\1\0\1\4\2\0\2\4\1\0\4\4" - + "\1\5\2\4\6\5\1\0\2\5\1\4\2\0\5\4\1\0\1\4" - + "\1\0\6\5\2\0\12\5\2\0\2\4\42\0\1\4\27\0\2\5" - + "\6\0\12\5\13\0\1\5\1\0\1\5\1\0\1\5\4\0\2\5" - + "\10\4\1\0\42\4\6\0\24\5\1\0\2\5\4\4\4\0\10\5" - + "\1\0\44\5\11\0\1\5\71\0\42\4\1\0\5\4\1\0\2\4" - + "\1\0\7\5\3\0\4\5\6\0\12\5\6\0\6\4\4\5\106\0" - + "\46\4\12\0\51\4\7\0\132\4\5\0\104\4\5\0\122\4\6\0" - + "\7\4\1\0\77\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0" - + "\1\4\1\0\4\4\2\0\47\4\1\0\1\4\1\0\4\4\2\0" - + "\37\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0\1\4\1\0" - + "\4\4\2\0\7\4\1\0\7\4\1\0\27\4\1\0\37\4\1\0" - + "\1\4\1\0\4\4\2\0\7\4\1\0\47\4\1\0\23\4\16\0" - + "\11\5\56\0\125\4\14\0\u026c\4\2\0\10\4\12\0\32\4\5\0" - + "\113\4\3\0\3\4\17\0\15\4\1\0\4\4\3\5\13\0\22\4" - + "\3\5\13\0\22\4\2\5\14\0\15\4\1\0\3\4\1\0\2\5" - + "\14\0\64\4\40\5\3\0\1\4\3\0\2\4\1\5\2\0\12\5" - + "\41\0\3\5\2\0\12\5\6\0\130\4\10\0\51\4\1\5\126\0" - + "\35\4\3\0\14\5\4\0\14\5\12\0\12\5\36\4\2\0\5\4" - + "\u038b\0\154\4\224\0\234\4\4\0\132\4\6\0\26\4\2\0\6\4" - + "\2\0\46\4\2\0\6\4\2\0\10\4\1\0\1\4\1\0\1\4" - + "\1\0\1\4\1\0\37\4\2\0\65\4\1\0\7\4\1\0\1\4" - + "\3\0\3\4\1\0\7\4\3\0\4\4\2\0\6\4\4\0\15\4" - + "\5\0\3\4\1\0\7\4\17\0\4\5\32\0\5\5\20\0\2\4" - + "\23\0\1\4\13\0\4\5\6\0\6\5\1\0\1\4\15\0\1\4" - + "\40\0\22\4\36\0\15\5\4\0\1\5\3\0\6\5\27\0\1\4" - + "\4\0\1\4\2\0\12\4\1\0\1\4\3\0\5\4\6\0\1\4" - + "\1\0\1\4\1\0\1\4\1\0\4\4\1\0\3\4\1\0\7\4" - + "\3\0\3\4\5\0\5\4\26\0\44\4\u0e81\0\3\4\31\0\11\4" - + "\6\5\1\0\5\4\2\0\5\4\4\0\126\4\2\0\2\5\2\0" - + "\3\4\1\0\137\4\5\0\50\4\4\0\136\4\21\0\30\4\70\0" - + "\20\4\u0200\0\u19b6\4\112\0\u51a6\4\132\0\u048d\4\u0773\0\u2ba4\4\u215c\0" - + "\u012e\4\2\0\73\4\225\0\7\4\14\0\5\4\5\0\1\4\1\5" - + "\12\4\1\0\15\4\1\0\5\4\1\0\1\4\1\0\2\4\1\0" - + "\2\4\1\0\154\4\41\0\u016b\4\22\0\100\4\2\0\66\4\50\0" - + "\15\4\3\0\20\5\20\0\4\5\17\0\2\4\30\0\3\4\31\0" - + "\1\4\6\0\5\4\1\0\207\4\2\0\1\5\4\0\1\4\13\0" - + "\12\5\7\0\32\4\4\0\1\4\1\0\32\4\12\0\132\4\3\0" - + "\6\4\2\0\6\4\2\0\6\4\2\0\3\4\3\0\2\4\3\0" - + "\2\4\22\0\3\5\4\0"; - /** - * Translates characters to character classes - */ - private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - /** - * Translates DFA states to action switch labels. - */ - private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 - = "\2\0\2\1\1\2\1\3\1\1\1\3\7\2\1\1" - + "\1\4\1\5\1\6\1\7\1\10\2\2\1\11\2\12" - + "\1\1\1\13\1\14\1\0\1\14\2\0\7\2\1\0" - + "\3\2\1\15\1\16\1\17\1\20\1\21\1\22\1\16" - + "\1\23\1\24\1\25\1\26\1\14\4\0\6\2\1\27" - + "\4\2\1\16\2\0\1\30\2\2\1\31\6\2\1\32" - + "\1\0\7\2\1\33\1\0\1\34\6\2\1\0\4\2" - + "\1\35\1\36\1\0\1\37\1\40\2\2\1\0\1\41" - + "\1\42\20\0\1\43"; - - private static int[] zzUnpackAction() { - int[] result = new int[134]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /** - * Translates a state to a row index in the transition table - */ - private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 - = "\0\0\0\60\0\140\0\220\0\300\0\360\0\u0120\0\u0150" - + "\0\u0180\0\u01b0\0\u01e0\0\u0210\0\u0240\0\u0270\0\u02a0\0\u02d0" - + "\0\140\0\140\0\140\0\140\0\140\0\u0300\0\u0330\0\u0360" - + "\0\u0390\0\140\0\u03c0\0\140\0\360\0\u03f0\0\u0420\0\u0450" - + "\0\u0480\0\u04b0\0\u04e0\0\u0510\0\u0540\0\u0570\0\u05a0\0\u05d0" - + "\0\u0600\0\u0630\0\u0660\0\u0690\0\140\0\u06c0\0\140\0\140" - + "\0\140\0\140\0\u06f0\0\140\0\140\0\140\0\140\0\u0720" - + "\0\u0720\0\u0750\0\u0780\0\u07b0\0\u07e0\0\u0810\0\u0840\0\u0870" - + "\0\u08a0\0\u08d0\0\140\0\u0900\0\u0930\0\u0960\0\u0990\0\140" - + "\0\u09c0\0\u09f0\0\300\0\u0a20\0\u0a50\0\300\0\u0a80\0\u0ab0" - + "\0\u0ae0\0\u0b10\0\u0b40\0\u0b70\0\140\0\u0ba0\0\u0bd0\0\u0c00" - + "\0\u0c30\0\u0c60\0\u0c90\0\u0cc0\0\u0cf0\0\300\0\u0d20\0\300" - + "\0\u0d50\0\u0d80\0\u0db0\0\u0de0\0\u0e10\0\u0e40\0\u0e70\0\u0ea0" - + "\0\u0ed0\0\u0f00\0\u0f30\0\300\0\300\0\u0f60\0\300\0\300" - + "\0\u0f90\0\u0fc0\0\u0ff0\0\300\0\300\0\u1020\0\u1050\0\u1080" - + "\0\u10b0\0\u10e0\0\u1110\0\u1140\0\u1170\0\u11a0\0\u11d0\0\u1200" - + "\0\u1230\0\u1260\0\u1290\0\u12c0\0\u12f0\0\140"; - - private static int[] zzUnpackRowMap() { - int[] result = new int[134]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - /** - * The transition table of the DFA - */ - private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 - = "\3\3\1\4\1\5\1\3\1\6\1\7\1\10\1\11" - + "\2\3\1\12\1\13\1\3\2\5\1\14\1\15\1\5" - + "\1\16\1\5\1\17\5\5\1\3\1\20\1\5\1\3" - + "\1\10\1\3\1\21\1\22\1\23\1\24\1\25\1\26" - + "\5\5\1\27\1\3\1\10\1\30\1\31\1\32\36\30" - + "\1\33\1\34\15\30\63\0\1\4\60\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\15\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\6\0\1\35\1\0" - + "\1\35\13\0\1\36\10\0\1\37\1\36\1\0\1\35" - + "\16\0\1\35\6\0\1\35\1\0\1\10\24\0\1\40" - + "\2\0\1\10\16\0\1\10\6\0\1\10\1\0\1\10" - + "\13\0\1\36\10\0\1\37\1\36\1\0\1\10\16\0" - + "\1\10\4\0\3\5\1\0\2\5\1\41\1\0\2\5" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\1\5" - + "\1\42\1\0\7\5\1\43\5\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\3\5\1\44\11\5\2\0" - + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" - + "\3\5\1\0\2\5\2\0\1\45\1\5\1\0\15\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\11\5" - + "\1\46\3\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\5\5" - + "\1\47\1\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\1\50\1\5\1\0\15\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\6\0\1\37\1\0" - + "\1\37\24\0\1\51\2\0\1\37\16\0\1\37\4\0" - + "\3\5\1\0\2\5\2\0\2\5\1\0\11\5\1\52" - + "\1\5\1\53\1\5\2\0\1\5\1\0\1\5\6\0" - + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" - + "\2\5\1\0\13\5\1\54\1\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\1\30\2\0\36\30" - + "\2\0\15\30\2\0\1\32\55\0\2\55\1\0\3\55" - + "\1\56\5\55\1\57\5\55\1\60\4\55\1\61\1\62" - + "\7\55\1\63\1\64\1\65\12\55\1\66\1\67\1\56" - + "\6\0\1\70\1\71\1\70\26\0\1\71\1\70\16\0" - + "\1\70\6\0\1\37\1\0\1\37\13\0\1\36\11\0" - + "\1\36\1\0\1\37\16\0\1\37\6\0\1\37\1\0" - + "\1\37\27\0\1\37\16\0\1\37\6\0\1\72\1\0" - + "\1\73\27\0\1\73\16\0\1\73\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\74\15\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\14\5\1\75\2\0\1\5" - + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\13\5\1\76\1\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\3\5" - + "\1\77\11\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\7\5\1\100\5\5\2\0\1\5\1\0\1\5" - + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" - + "\6\0\1\101\6\5\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\15\5\2\0\1\5\1\0" - + "\1\5\6\0\2\5\1\102\4\5\1\0\1\5\35\0" - + "\1\103\26\0\3\5\1\0\2\5\2\0\2\5\1\0" - + "\1\5\1\104\1\105\12\5\2\0\1\5\1\0\1\5" - + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" - + "\6\0\1\5\1\106\5\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\14\5\1\107\2\0" - + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\6\0" - + "\1\63\31\0\1\63\16\0\1\63\6\0\1\110\31\0" - + "\1\110\16\0\1\110\6\0\1\70\1\0\1\70\27\0" - + "\1\70\16\0\1\70\13\0\1\111\52\0\1\73\1\0" - + "\1\73\2\0\1\111\24\0\1\73\16\0\1\73\17\0" - + "\1\112\44\0\3\5\1\0\2\5\2\0\2\5\1\0" - + "\14\5\1\113\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\3\5\1\114\11\5\2\0\1\5\1\0\1\5" - + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\5\5\1\115\7\5\2\0\1\5" - + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\5\5\1\116\7\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\14\5" - + "\1\117\2\0\1\5\1\0\1\5\6\0\7\5\1\0" - + "\1\5\4\0\3\5\1\0\2\5\2\0\2\5\1\0" - + "\5\5\1\120\7\5\2\0\1\5\1\0\1\5\6\0" - + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" - + "\2\5\1\0\3\5\1\121\11\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\4\5\1\122\10\5\2\0" - + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" - + "\3\5\1\0\2\5\2\0\2\5\1\0\15\5\2\0" - + "\1\5\1\0\1\5\6\0\3\5\1\123\3\5\1\0" - + "\1\5\4\0\3\5\1\0\2\5\2\0\1\5\1\124" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\42\0\1\125\35\0\1\126\43\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\2\5\1\127\12\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\11\5" - + "\1\130\3\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\2\5\1\131\12\5\2\0\1\5\1\0\1\5" - + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" - + "\6\0\6\5\1\132\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\5\5\1\133\7\5\2\0" - + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" - + "\3\5\1\0\2\5\2\0\2\5\1\0\13\5\1\134" - + "\1\5\2\0\1\5\1\0\1\5\6\0\7\5\1\0" - + "\1\5\4\0\3\5\1\0\2\5\2\0\2\5\1\0" - + "\13\5\1\135\1\5\2\0\1\5\1\0\1\5\6\0" - + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" - + "\2\5\1\0\5\5\1\136\7\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\15\0\1\137\46\0" - + "\3\5\1\0\2\5\2\0\2\5\1\0\15\5\2\0" - + "\1\5\1\0\1\5\6\0\1\5\1\140\5\5\1\0" - + "\1\5\4\0\3\5\1\0\2\5\2\0\1\141\1\5" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\1\5" - + "\1\142\5\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\2\5\1\143\12\5\2\0\1\5" - + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\15\5\2\0\1\5" - + "\1\0\1\5\6\0\1\5\1\144\5\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\3\5" - + "\1\145\11\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" - + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\4\5" - + "\1\146\2\5\1\0\1\5\21\0\1\147\42\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\13\5\1\150\1\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\2\5" - + "\1\151\12\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\1\152" - + "\1\5\1\0\15\5\2\0\1\5\1\0\1\5\6\0" - + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" - + "\2\5\1\0\3\5\1\153\11\5\2\0\1\5\1\0" - + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" - + "\2\5\2\0\2\5\1\0\5\5\1\154\7\5\2\0" - + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" - + "\3\5\1\0\2\5\2\0\2\5\1\0\5\5\1\155" - + "\7\5\2\0\1\5\1\0\1\5\6\0\7\5\1\0" - + "\1\5\22\0\1\156\41\0\3\5\1\0\2\5\2\0" - + "\2\5\1\0\14\5\1\157\2\0\1\5\1\0\1\5" - + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\3\5\1\160\11\5\2\0\1\5" - + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\5\5\1\161\7\5" - + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" - + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\5\5" - + "\1\162\7\5\2\0\1\5\1\0\1\5\6\0\7\5" - + "\1\0\1\5\21\0\1\163\42\0\3\5\1\0\2\5" - + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" - + "\6\0\2\5\1\164\4\5\1\0\1\5\4\0\3\5" - + "\1\0\2\5\2\0\2\5\1\0\15\5\2\0\1\5" - + "\1\0\1\5\6\0\2\5\1\165\4\5\1\0\1\5" - + "\23\0\1\166\60\0\1\167\60\0\1\170\60\0\1\171" - + "\42\0\1\172\75\0\1\173\54\0\1\174\63\0\1\175" - + "\60\0\1\176\47\0\1\177\60\0\1\200\61\0\1\201" - + "\63\0\1\202\61\0\1\203\60\0\1\204\60\0\1\205" - + "\36\0\1\206\44\0"; - - private static int[] zzUnpackTrans() { - int[] result = new int[4896]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 - = "\2\0\1\11\15\1\5\11\4\1\1\11\1\1\1\11" - + "\1\1\1\0\1\1\2\0\7\1\1\0\3\1\1\11" - + "\1\1\4\11\1\1\4\11\1\1\4\0\6\1\1\11" - + "\4\1\1\11\2\0\12\1\1\11\1\0\10\1\1\0" - + "\7\1\1\0\6\1\1\0\4\1\1\0\2\1\20\0" - + "\1\11"; - - private static int[] zzUnpackAttribute() { - int[] result = new int[134]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /** - * the input device - */ - private java.io.Reader zzReader; - /** - * the current state of the DFA - */ - private int zzState; - /** - * the current lexical state - */ - private int zzLexicalState = YYINITIAL; - /** - * this buffer contains the current text to be matched and is the source of - * the yytext() string - */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - /** - * the textposition at the last accepting state - */ - private int zzMarkedPos; - /** - * the current text position in the buffer - */ - private int zzCurrentPos; - /** - * startRead marks the beginning of the yytext() string in the buffer - */ - private int zzStartRead; - /** - * endRead marks the last character in the buffer, that has been read from - * input - */ - private int zzEndRead; - /** - * number of newlines encountered up to the start of the matched text - */ - private int yyline; - /** - * the number of characters up to the start of the matched text - */ - private int yychar; - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; - /** - * zzAtEOF == true <=> the scanner is at the EOF - */ - private boolean zzAtEOF; - /** - * denotes if the user-EOF-code has already been executed - */ - private boolean zzEOFDone; - - /* user code: */ - StringBuffer string = new StringBuffer(); - boolean isMultiname = false; - long multinameId = 0; - - /** - * Create an empty lexer, yyrset will be called later to reset and assign - * the reader - */ - public MethodInfoLexer() { - } - - public int yychar() { - return yychar; - } - - public int yyline() { - return yyline + 1; - } - - /** - * Creates a new scanner There is also a java.io.InputStream version of this - * constructor. - * - * @param in the java.io.Reader to read input from. - */ - public MethodInfoLexer(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. There is also java.io.Reader version of this - * constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public MethodInfoLexer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char[] zzUnpackCMap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - - int j = 0; /* index in unpacked array */ - - while (i < 1768) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do { - map[j++] = value; - } while (--count > 0); - } - return map; - } - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead - zzStartRead); - - /* translate stored positions */ - zzEndRead -= zzStartRead; - zzCurrentPos -= zzStartRead; - zzMarkedPos -= zzStartRead; - zzStartRead = 0; - } - - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos * 2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length - zzEndRead); - - if (numRead > 0) { - zzEndRead += numRead; - return false; - } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { - int c = zzReader.read(); - if (c == -1) { - return true; - } else { - zzBuffer[zzEndRead++] = (char) c; - return false; - } - } - - // numRead < 0 - return true; - } - - /** - * Closes the input stream. - * - * @throws java.io.IOException - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) { - zzReader.close(); - } - } - - /** - * Resets the scanner to read from a new input stream. Does not close the - * old reader. - * - * All internal variables are reset, the old input stream cannot be - * reused (internal buffer is discarded and lost). Lexical state is set to - * ZZ_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - } - - /** - * Returns the current lexical state. - * - * @return - */ - public final int yystate() { - return zzLexicalState; - } - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - /** - * Returns the text matched by the current regular expression. - * - * @return - */ - public final String yytext() { - return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); - } - - /** - * Returns the character at position pos from the matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. A value from 0 to - * yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead + pos]; - } - - /** - * Returns the length of the matched text region. - * - * @return - */ - public final int yylength() { - return zzMarkedPos - zzStartRead; - } - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of yypushback(int) and - * a match-all fallback rule) this method will only be called with things - * that "Can't Possibly Happen". If this method is called, something is - * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done in error - * fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. This number must - * not be greater than yylength()! - */ - public void yypushback(int number) { - if (number > yylength()) { - zzScanError(ZZ_PUSHBACK_2BIG); - } - - zzMarkedPos -= number; - } - - /** - * Resumes scanning until the next regular expression is matched, the end of - * input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - * @throws com.jpexs.decompiler.flash.abc.methodinfo_parser.ParseException - */ - public ParsedSymbol yylex() throws java.io.IOException, ParseException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char[] zzBufferL = zzBuffer; - char[] zzCMapL = ZZ_CMAP; - - int[] zzTransL = ZZ_TRANS; - int[] zzRowMapL = ZZ_ROWMAP; - int[] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar += zzMarkedPosL - zzStartRead; - - boolean zzR = false; - for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; - zzCurrentPosL++) { - switch (zzBufferL[zzCurrentPosL]) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) { - zzR = false; - } else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn++; - } - } - - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } else if (zzAtEOF) { - zzPeek = false; - } else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) { - zzPeek = false; - } else { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } - } - if (zzPeek) { - yyline--; - } - } - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; - - zzForAction: - { - while (true) { - - if (zzCurrentPosL < zzEndReadL) { - zzInput = zzBufferL[zzCurrentPosL++]; - } else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; - if (zzNext == -1) { - break zzForAction; - } - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ((zzAttributes & 1) == 1) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ((zzAttributes & 8) == 8) { - break zzForAction; - } - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 2: { - return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); - } - case 36: - break; - case 8: { - return new ParsedSymbol(ParsedSymbol.TYPE_ASSIGN); - } - case 37: - break; - case 24: { - return new ParsedSymbol(ParsedSymbol.TYPE_NULL); - } - case 38: - break; - case 22: { - string.append('\''); - } - case 39: - break; - case 3: { - return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); - } - case 40: - break; - case 33: { - return new ParsedSymbol(ParsedSymbol.TYPE_UNDEFINED); - } - case 41: - break; - case 34: { - return new ParsedSymbol(ParsedSymbol.TYPE_PROTECTED); - } - case 42: - break; - case 28: { - return new ParsedSymbol(ParsedSymbol.TYPE_STATIC); - } - case 43: - break; - case 9: { - string.append(yytext()); - } - case 44: - break; - case 14: { - char val = (char) Integer.parseInt(yytext().substring(1), 8); - string.append(val); - } - case 45: - break; - case 29: { - return new ParsedSymbol(ParsedSymbol.TYPE_PRIVATE); - } - case 46: - break; - case 5: { - return new ParsedSymbol(ParsedSymbol.TYPE_COLON); - } - case 47: - break; - case 18: { - string.append('\r'); - } - case 48: - break; - case 25: { - return new ParsedSymbol(ParsedSymbol.TYPE_TRUE); - } - case 49: - break; - case 6: { - return new ParsedSymbol(ParsedSymbol.TYPE_COMMA); - } - case 50: - break; - case 35: { - String s = yytext(); - long ns = Long.parseLong(s.substring(3, s.length() - 2)); - return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, new Long(ns)); - } - case 51: - break; - case 27: { - return new ParsedSymbol(ParsedSymbol.TYPE_FALSE); - } - case 52: - break; - case 11: { - yybegin(YYINITIAL); - // length also includes the trailing quote - if (isMultiname) { - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); - } else { - return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); - } - } - case 53: - break; - case 17: { - string.append('\b'); - } - case 54: - break; - case 10: { - throw new ParseException("Unterminated string at end of line", yyline + 1); - } - case 55: - break; - case 4: { - isMultiname = false; - yybegin(STRING); - string.setLength(0); - } - case 56: - break; - case 32: { - return new ParsedSymbol(ParsedSymbol.TYPE_EXPLICIT); - } - case 57: - break; - case 16: { - string.append('\t'); - } - case 58: - break; - case 12: { - return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); - } - case 59: - break; - case 31: { - return new ParsedSymbol(ParsedSymbol.TYPE_INTERNAL); - } - case 60: - break; - case 23: { - return new ParsedSymbol(ParsedSymbol.TYPE_DOTS); - } - case 61: - break; - case 19: { - string.append('\\'); - } - case 62: - break; - case 7: { - return new ParsedSymbol(ParsedSymbol.TYPE_STAR); - } - case 63: - break; - case 13: { - throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); - } - case 64: - break; - case 30: { - return new ParsedSymbol(ParsedSymbol.TYPE_PACKAGE); - } - case 65: - break; - case 26: { - isMultiname = true; - String s = yytext(); - multinameId = Long.parseLong(s.substring(2, s.length() - 2)); - yybegin(STRING); - string.setLength(0); - } - case 66: - break; - case 15: { - string.append('\n'); - } - case 67: - break; - case 21: { - string.append('\f'); - } - case 68: - break; - case 20: { - string.append('\"'); - } - case 69: - break; - case 1: { - } - case 70: - break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ParsedSymbol(ParsedSymbol.TYPE_EOF); - } - } else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.methodinfo_parser; + +/** + * This class is a scanner generated by JFlex + * 1.4.3 on 11.7.11 15:46 from the specification file + * D:/Dokumenty/Programovani/JavaSE/ASDec/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex + */ +public final class MethodInfoLexer { + + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + /** + * lexical states + */ + public static final int STRING = 2; + public static final int YYINITIAL = 0; + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1 + }; + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\5\1\3\1\2\1\0\1\3\1\1\16\5\4\0\1\3\1\0" + + "\1\42\1\0\1\4\2\0\1\56\2\0\1\45\1\37\1\44\1\7" + + "\1\35\1\0\1\6\3\57\4\40\2\10\1\43\2\0\1\46\3\0" + + "\4\4\1\36\6\4\1\31\1\4\1\25\1\4\1\17\12\4\1\12" + + "\1\41\1\13\1\0\1\4\1\0\1\32\1\27\1\50\1\51\1\24" + + "\1\55\1\53\1\4\1\21\1\4\1\52\1\33\1\11\1\14\1\20" + + "\1\47\1\4\1\30\1\15\1\22\1\26\1\23\1\4\1\54\2\4" + + "\1\16\1\0\1\34\1\0\41\5\2\0\4\4\4\0\1\4\2\0" + + "\1\5\7\0\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0" + + "\u013f\4\31\0\162\4\4\0\14\4\16\0\5\4\11\0\1\4\21\0" + + "\130\5\5\0\23\5\12\0\1\4\13\0\1\4\1\0\3\4\1\0" + + "\1\4\1\0\24\4\1\0\54\4\1\0\46\4\1\0\5\4\4\0" + + "\202\4\1\0\4\5\3\0\105\4\1\0\46\4\2\0\2\4\6\0" + + "\20\4\41\0\46\4\2\0\1\4\7\0\47\4\11\0\21\5\1\0" + + "\27\5\1\0\3\5\1\0\1\5\1\0\2\5\1\0\1\5\13\0" + + "\33\4\5\0\3\4\15\0\4\5\14\0\6\5\13\0\32\4\5\0" + + "\13\4\16\5\7\0\12\5\4\0\2\4\1\5\143\4\1\0\1\4" + + "\10\5\1\0\6\5\2\4\2\5\1\0\4\5\2\4\12\5\3\4" + + "\2\0\1\4\17\0\1\5\1\4\1\5\36\4\33\5\2\0\3\4" + + "\60\0\46\4\13\5\1\4\u014f\0\3\5\66\4\2\0\1\5\1\4" + + "\20\5\2\0\1\4\4\5\3\0\12\4\2\5\2\0\12\5\21\0" + + "\3\5\1\0\10\4\2\0\2\4\2\0\26\4\1\0\7\4\1\0" + + "\1\4\3\0\4\4\2\0\1\5\1\4\7\5\2\0\2\5\2\0" + + "\3\5\11\0\1\5\4\0\2\4\1\0\3\4\2\5\2\0\12\5" + + "\4\4\15\0\3\5\1\0\6\4\4\0\2\4\2\0\26\4\1\0" + + "\7\4\1\0\2\4\1\0\2\4\1\0\2\4\2\0\1\5\1\0" + + "\5\5\4\0\2\5\2\0\3\5\13\0\4\4\1\0\1\4\7\0" + + "\14\5\3\4\14\0\3\5\1\0\11\4\1\0\3\4\1\0\26\4" + + "\1\0\7\4\1\0\2\4\1\0\5\4\2\0\1\5\1\4\10\5" + + "\1\0\3\5\1\0\3\5\2\0\1\4\17\0\2\4\2\5\2\0" + + "\12\5\1\0\1\4\17\0\3\5\1\0\10\4\2\0\2\4\2\0" + + "\26\4\1\0\7\4\1\0\2\4\1\0\5\4\2\0\1\5\1\4" + + "\6\5\3\0\2\5\2\0\3\5\10\0\2\5\4\0\2\4\1\0" + + "\3\4\4\0\12\5\1\0\1\4\20\0\1\5\1\4\1\0\6\4" + + "\3\0\3\4\1\0\4\4\3\0\2\4\1\0\1\4\1\0\2\4" + + "\3\0\2\4\3\0\3\4\3\0\10\4\1\0\3\4\4\0\5\5" + + "\3\0\3\5\1\0\4\5\11\0\1\5\17\0\11\5\11\0\1\4" + + "\7\0\3\5\1\0\10\4\1\0\3\4\1\0\27\4\1\0\12\4" + + "\1\0\5\4\4\0\7\5\1\0\3\5\1\0\4\5\7\0\2\5" + + "\11\0\2\4\4\0\12\5\22\0\2\5\1\0\10\4\1\0\3\4" + + "\1\0\27\4\1\0\12\4\1\0\5\4\2\0\1\5\1\4\7\5" + + "\1\0\3\5\1\0\4\5\7\0\2\5\7\0\1\4\1\0\2\4" + + "\4\0\12\5\22\0\2\5\1\0\10\4\1\0\3\4\1\0\27\4" + + "\1\0\20\4\4\0\6\5\2\0\3\5\1\0\4\5\11\0\1\5" + + "\10\0\2\4\4\0\12\5\22\0\2\5\1\0\22\4\3\0\30\4" + + "\1\0\11\4\1\0\1\4\2\0\7\4\3\0\1\5\4\0\6\5" + + "\1\0\1\5\1\0\10\5\22\0\2\5\15\0\60\4\1\5\2\4" + + "\7\5\4\0\10\4\10\5\1\0\12\5\47\0\2\4\1\0\1\4" + + "\2\0\2\4\1\0\1\4\2\0\1\4\6\0\4\4\1\0\7\4" + + "\1\0\3\4\1\0\1\4\1\0\1\4\2\0\2\4\1\0\4\4" + + "\1\5\2\4\6\5\1\0\2\5\1\4\2\0\5\4\1\0\1\4" + + "\1\0\6\5\2\0\12\5\2\0\2\4\42\0\1\4\27\0\2\5" + + "\6\0\12\5\13\0\1\5\1\0\1\5\1\0\1\5\4\0\2\5" + + "\10\4\1\0\42\4\6\0\24\5\1\0\2\5\4\4\4\0\10\5" + + "\1\0\44\5\11\0\1\5\71\0\42\4\1\0\5\4\1\0\2\4" + + "\1\0\7\5\3\0\4\5\6\0\12\5\6\0\6\4\4\5\106\0" + + "\46\4\12\0\51\4\7\0\132\4\5\0\104\4\5\0\122\4\6\0" + + "\7\4\1\0\77\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0" + + "\1\4\1\0\4\4\2\0\47\4\1\0\1\4\1\0\4\4\2\0" + + "\37\4\1\0\1\4\1\0\4\4\2\0\7\4\1\0\1\4\1\0" + + "\4\4\2\0\7\4\1\0\7\4\1\0\27\4\1\0\37\4\1\0" + + "\1\4\1\0\4\4\2\0\7\4\1\0\47\4\1\0\23\4\16\0" + + "\11\5\56\0\125\4\14\0\u026c\4\2\0\10\4\12\0\32\4\5\0" + + "\113\4\3\0\3\4\17\0\15\4\1\0\4\4\3\5\13\0\22\4" + + "\3\5\13\0\22\4\2\5\14\0\15\4\1\0\3\4\1\0\2\5" + + "\14\0\64\4\40\5\3\0\1\4\3\0\2\4\1\5\2\0\12\5" + + "\41\0\3\5\2\0\12\5\6\0\130\4\10\0\51\4\1\5\126\0" + + "\35\4\3\0\14\5\4\0\14\5\12\0\12\5\36\4\2\0\5\4" + + "\u038b\0\154\4\224\0\234\4\4\0\132\4\6\0\26\4\2\0\6\4" + + "\2\0\46\4\2\0\6\4\2\0\10\4\1\0\1\4\1\0\1\4" + + "\1\0\1\4\1\0\37\4\2\0\65\4\1\0\7\4\1\0\1\4" + + "\3\0\3\4\1\0\7\4\3\0\4\4\2\0\6\4\4\0\15\4" + + "\5\0\3\4\1\0\7\4\17\0\4\5\32\0\5\5\20\0\2\4" + + "\23\0\1\4\13\0\4\5\6\0\6\5\1\0\1\4\15\0\1\4" + + "\40\0\22\4\36\0\15\5\4\0\1\5\3\0\6\5\27\0\1\4" + + "\4\0\1\4\2\0\12\4\1\0\1\4\3\0\5\4\6\0\1\4" + + "\1\0\1\4\1\0\1\4\1\0\4\4\1\0\3\4\1\0\7\4" + + "\3\0\3\4\5\0\5\4\26\0\44\4\u0e81\0\3\4\31\0\11\4" + + "\6\5\1\0\5\4\2\0\5\4\4\0\126\4\2\0\2\5\2\0" + + "\3\4\1\0\137\4\5\0\50\4\4\0\136\4\21\0\30\4\70\0" + + "\20\4\u0200\0\u19b6\4\112\0\u51a6\4\132\0\u048d\4\u0773\0\u2ba4\4\u215c\0" + + "\u012e\4\2\0\73\4\225\0\7\4\14\0\5\4\5\0\1\4\1\5" + + "\12\4\1\0\15\4\1\0\5\4\1\0\1\4\1\0\2\4\1\0" + + "\2\4\1\0\154\4\41\0\u016b\4\22\0\100\4\2\0\66\4\50\0" + + "\15\4\3\0\20\5\20\0\4\5\17\0\2\4\30\0\3\4\31\0" + + "\1\4\6\0\5\4\1\0\207\4\2\0\1\5\4\0\1\4\13\0" + + "\12\5\7\0\32\4\4\0\1\4\1\0\32\4\12\0\132\4\3\0" + + "\6\4\2\0\6\4\2\0\6\4\2\0\3\4\3\0\2\4\3\0" + + "\2\4\22\0\3\5\4\0"; + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); + private static final String ZZ_ACTION_PACKED_0 + = "\2\0\2\1\1\2\1\3\1\1\1\3\7\2\1\1" + + "\1\4\1\5\1\6\1\7\1\10\2\2\1\11\2\12" + + "\1\1\1\13\1\14\1\0\1\14\2\0\7\2\1\0" + + "\3\2\1\15\1\16\1\17\1\20\1\21\1\22\1\16" + + "\1\23\1\24\1\25\1\26\1\14\4\0\6\2\1\27" + + "\4\2\1\16\2\0\1\30\2\2\1\31\6\2\1\32" + + "\1\0\7\2\1\33\1\0\1\34\6\2\1\0\4\2" + + "\1\35\1\36\1\0\1\37\1\40\2\2\1\0\1\41" + + "\1\42\20\0\1\43"; + + private static int[] zzUnpackAction() { + int[] result = new int[134]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\60\0\140\0\220\0\300\0\360\0\u0120\0\u0150" + + "\0\u0180\0\u01b0\0\u01e0\0\u0210\0\u0240\0\u0270\0\u02a0\0\u02d0" + + "\0\140\0\140\0\140\0\140\0\140\0\u0300\0\u0330\0\u0360" + + "\0\u0390\0\140\0\u03c0\0\140\0\360\0\u03f0\0\u0420\0\u0450" + + "\0\u0480\0\u04b0\0\u04e0\0\u0510\0\u0540\0\u0570\0\u05a0\0\u05d0" + + "\0\u0600\0\u0630\0\u0660\0\u0690\0\140\0\u06c0\0\140\0\140" + + "\0\140\0\140\0\u06f0\0\140\0\140\0\140\0\140\0\u0720" + + "\0\u0720\0\u0750\0\u0780\0\u07b0\0\u07e0\0\u0810\0\u0840\0\u0870" + + "\0\u08a0\0\u08d0\0\140\0\u0900\0\u0930\0\u0960\0\u0990\0\140" + + "\0\u09c0\0\u09f0\0\300\0\u0a20\0\u0a50\0\300\0\u0a80\0\u0ab0" + + "\0\u0ae0\0\u0b10\0\u0b40\0\u0b70\0\140\0\u0ba0\0\u0bd0\0\u0c00" + + "\0\u0c30\0\u0c60\0\u0c90\0\u0cc0\0\u0cf0\0\300\0\u0d20\0\300" + + "\0\u0d50\0\u0d80\0\u0db0\0\u0de0\0\u0e10\0\u0e40\0\u0e70\0\u0ea0" + + "\0\u0ed0\0\u0f00\0\u0f30\0\300\0\300\0\u0f60\0\300\0\300" + + "\0\u0f90\0\u0fc0\0\u0ff0\0\300\0\300\0\u1020\0\u1050\0\u1080" + + "\0\u10b0\0\u10e0\0\u1110\0\u1140\0\u1170\0\u11a0\0\u11d0\0\u1200" + + "\0\u1230\0\u1260\0\u1290\0\u12c0\0\u12f0\0\140"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[134]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + private static final String ZZ_TRANS_PACKED_0 + = "\3\3\1\4\1\5\1\3\1\6\1\7\1\10\1\11" + + "\2\3\1\12\1\13\1\3\2\5\1\14\1\15\1\5" + + "\1\16\1\5\1\17\5\5\1\3\1\20\1\5\1\3" + + "\1\10\1\3\1\21\1\22\1\23\1\24\1\25\1\26" + + "\5\5\1\27\1\3\1\10\1\30\1\31\1\32\36\30" + + "\1\33\1\34\15\30\63\0\1\4\60\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\15\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\6\0\1\35\1\0" + + "\1\35\13\0\1\36\10\0\1\37\1\36\1\0\1\35" + + "\16\0\1\35\6\0\1\35\1\0\1\10\24\0\1\40" + + "\2\0\1\10\16\0\1\10\6\0\1\10\1\0\1\10" + + "\13\0\1\36\10\0\1\37\1\36\1\0\1\10\16\0" + + "\1\10\4\0\3\5\1\0\2\5\1\41\1\0\2\5" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\1\5" + + "\1\42\1\0\7\5\1\43\5\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\3\5\1\44\11\5\2\0" + + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" + + "\3\5\1\0\2\5\2\0\1\45\1\5\1\0\15\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\11\5" + + "\1\46\3\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\5\5" + + "\1\47\1\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\1\50\1\5\1\0\15\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\6\0\1\37\1\0" + + "\1\37\24\0\1\51\2\0\1\37\16\0\1\37\4\0" + + "\3\5\1\0\2\5\2\0\2\5\1\0\11\5\1\52" + + "\1\5\1\53\1\5\2\0\1\5\1\0\1\5\6\0" + + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" + + "\2\5\1\0\13\5\1\54\1\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\1\30\2\0\36\30" + + "\2\0\15\30\2\0\1\32\55\0\2\55\1\0\3\55" + + "\1\56\5\55\1\57\5\55\1\60\4\55\1\61\1\62" + + "\7\55\1\63\1\64\1\65\12\55\1\66\1\67\1\56" + + "\6\0\1\70\1\71\1\70\26\0\1\71\1\70\16\0" + + "\1\70\6\0\1\37\1\0\1\37\13\0\1\36\11\0" + + "\1\36\1\0\1\37\16\0\1\37\6\0\1\37\1\0" + + "\1\37\27\0\1\37\16\0\1\37\6\0\1\72\1\0" + + "\1\73\27\0\1\73\16\0\1\73\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\74\15\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\14\5\1\75\2\0\1\5" + + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\13\5\1\76\1\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\3\5" + + "\1\77\11\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\7\5\1\100\5\5\2\0\1\5\1\0\1\5" + + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" + + "\6\0\1\101\6\5\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\15\5\2\0\1\5\1\0" + + "\1\5\6\0\2\5\1\102\4\5\1\0\1\5\35\0" + + "\1\103\26\0\3\5\1\0\2\5\2\0\2\5\1\0" + + "\1\5\1\104\1\105\12\5\2\0\1\5\1\0\1\5" + + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" + + "\6\0\1\5\1\106\5\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\14\5\1\107\2\0" + + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\6\0" + + "\1\63\31\0\1\63\16\0\1\63\6\0\1\110\31\0" + + "\1\110\16\0\1\110\6\0\1\70\1\0\1\70\27\0" + + "\1\70\16\0\1\70\13\0\1\111\52\0\1\73\1\0" + + "\1\73\2\0\1\111\24\0\1\73\16\0\1\73\17\0" + + "\1\112\44\0\3\5\1\0\2\5\2\0\2\5\1\0" + + "\14\5\1\113\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\3\5\1\114\11\5\2\0\1\5\1\0\1\5" + + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\5\5\1\115\7\5\2\0\1\5" + + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\5\5\1\116\7\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\14\5" + + "\1\117\2\0\1\5\1\0\1\5\6\0\7\5\1\0" + + "\1\5\4\0\3\5\1\0\2\5\2\0\2\5\1\0" + + "\5\5\1\120\7\5\2\0\1\5\1\0\1\5\6\0" + + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" + + "\2\5\1\0\3\5\1\121\11\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\4\5\1\122\10\5\2\0" + + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" + + "\3\5\1\0\2\5\2\0\2\5\1\0\15\5\2\0" + + "\1\5\1\0\1\5\6\0\3\5\1\123\3\5\1\0" + + "\1\5\4\0\3\5\1\0\2\5\2\0\1\5\1\124" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\42\0\1\125\35\0\1\126\43\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\2\5\1\127\12\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\11\5" + + "\1\130\3\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\2\5\1\131\12\5\2\0\1\5\1\0\1\5" + + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" + + "\6\0\6\5\1\132\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\5\5\1\133\7\5\2\0" + + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" + + "\3\5\1\0\2\5\2\0\2\5\1\0\13\5\1\134" + + "\1\5\2\0\1\5\1\0\1\5\6\0\7\5\1\0" + + "\1\5\4\0\3\5\1\0\2\5\2\0\2\5\1\0" + + "\13\5\1\135\1\5\2\0\1\5\1\0\1\5\6\0" + + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" + + "\2\5\1\0\5\5\1\136\7\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\15\0\1\137\46\0" + + "\3\5\1\0\2\5\2\0\2\5\1\0\15\5\2\0" + + "\1\5\1\0\1\5\6\0\1\5\1\140\5\5\1\0" + + "\1\5\4\0\3\5\1\0\2\5\2\0\1\141\1\5" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\1\5" + + "\1\142\5\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\2\5\1\143\12\5\2\0\1\5" + + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\15\5\2\0\1\5" + + "\1\0\1\5\6\0\1\5\1\144\5\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\3\5" + + "\1\145\11\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\2\5" + + "\1\0\15\5\2\0\1\5\1\0\1\5\6\0\4\5" + + "\1\146\2\5\1\0\1\5\21\0\1\147\42\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\13\5\1\150\1\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\2\5" + + "\1\151\12\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\4\0\3\5\1\0\2\5\2\0\1\152" + + "\1\5\1\0\15\5\2\0\1\5\1\0\1\5\6\0" + + "\7\5\1\0\1\5\4\0\3\5\1\0\2\5\2\0" + + "\2\5\1\0\3\5\1\153\11\5\2\0\1\5\1\0" + + "\1\5\6\0\7\5\1\0\1\5\4\0\3\5\1\0" + + "\2\5\2\0\2\5\1\0\5\5\1\154\7\5\2\0" + + "\1\5\1\0\1\5\6\0\7\5\1\0\1\5\4\0" + + "\3\5\1\0\2\5\2\0\2\5\1\0\5\5\1\155" + + "\7\5\2\0\1\5\1\0\1\5\6\0\7\5\1\0" + + "\1\5\22\0\1\156\41\0\3\5\1\0\2\5\2\0" + + "\2\5\1\0\14\5\1\157\2\0\1\5\1\0\1\5" + + "\6\0\7\5\1\0\1\5\4\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\3\5\1\160\11\5\2\0\1\5" + + "\1\0\1\5\6\0\7\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\5\5\1\161\7\5" + + "\2\0\1\5\1\0\1\5\6\0\7\5\1\0\1\5" + + "\4\0\3\5\1\0\2\5\2\0\2\5\1\0\5\5" + + "\1\162\7\5\2\0\1\5\1\0\1\5\6\0\7\5" + + "\1\0\1\5\21\0\1\163\42\0\3\5\1\0\2\5" + + "\2\0\2\5\1\0\15\5\2\0\1\5\1\0\1\5" + + "\6\0\2\5\1\164\4\5\1\0\1\5\4\0\3\5" + + "\1\0\2\5\2\0\2\5\1\0\15\5\2\0\1\5" + + "\1\0\1\5\6\0\2\5\1\165\4\5\1\0\1\5" + + "\23\0\1\166\60\0\1\167\60\0\1\170\60\0\1\171" + + "\42\0\1\172\75\0\1\173\54\0\1\174\63\0\1\175" + + "\60\0\1\176\47\0\1\177\60\0\1\200\61\0\1\201" + + "\63\0\1\202\61\0\1\203\60\0\1\204\60\0\1\205" + + "\36\0\1\206\44\0"; + + private static int[] zzUnpackTrans() { + int[] result = new int[4896]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\2\0\1\11\15\1\5\11\4\1\1\11\1\1\1\11" + + "\1\1\1\0\1\1\2\0\7\1\1\0\3\1\1\11" + + "\1\1\4\11\1\1\4\11\1\1\4\0\6\1\1\11" + + "\4\1\1\11\2\0\12\1\1\11\1\0\10\1\1\0" + + "\7\1\1\0\6\1\1\0\4\1\1\0\2\1\20\0" + + "\1\11"; + + private static int[] zzUnpackAttribute() { + int[] result = new int[134]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * the input device + */ + private java.io.Reader zzReader; + /** + * the current state of the DFA + */ + private int zzState; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + StringBuffer string = new StringBuffer(); + boolean isMultiname = false; + long multinameId = 0; + + /** + * Create an empty lexer, yyrset will be called later to reset and assign + * the reader + */ + public MethodInfoLexer() { + } + + public int yychar() { + return yychar; + } + + public int yyline() { + return yyline + 1; + } + + /** + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. + * + * @param in the java.io.Reader to read input from. + */ + public MethodInfoLexer(java.io.Reader in) { + this.zzReader = in; + } + + /** + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public MethodInfoLexer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ + + int j = 0; /* index in unpacked array */ + + while (i < 1768) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); + } + return map; + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + + /* first: make room (if you can) */ + if (zzStartRead > 0) { + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); + + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[zzCurrentPos * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + } + + /* finally: fill the buffer with new input */ + int numRead = zzReader.read(zzBuffer, zzEndRead, + zzBuffer.length - zzEndRead); + + if (numRead > 0) { + zzEndRead += numRead; + return false; + } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 + return true; + } + + /** + * Closes the input stream. + * + * @throws java.io.IOException + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + + zzEndRead = zzStartRead; /* invalidate buffer */ + + if (zzReader != null) { + zzReader.close(); + } + } + + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream cannot be + * reused (internal buffer is discarded and lost). Lexical state is set to + * ZZ_INITIAL. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + } + + /** + * Returns the current lexical state. + * + * @return + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + /** + * Returns the text matched by the current regular expression. + * + * @return + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } + + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } + + /** + * Returns the length of the matched text region. + * + * @return + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } + + zzMarkedPos -= number; + } + + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.abc.methodinfo_parser.ParseException + */ + public ParsedSymbol yylex() throws java.io.IOException, ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + yychar += zzMarkedPosL - zzStartRead; + + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL[zzCurrentPosL]) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = zzBufferL[zzCurrentPosL++]; + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = zzBufferL[zzCurrentPosL++]; + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 2: { + return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); + } + case 36: + break; + case 8: { + return new ParsedSymbol(ParsedSymbol.TYPE_ASSIGN); + } + case 37: + break; + case 24: { + return new ParsedSymbol(ParsedSymbol.TYPE_NULL); + } + case 38: + break; + case 22: { + string.append('\''); + } + case 39: + break; + case 3: { + return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); + } + case 40: + break; + case 33: { + return new ParsedSymbol(ParsedSymbol.TYPE_UNDEFINED); + } + case 41: + break; + case 34: { + return new ParsedSymbol(ParsedSymbol.TYPE_PROTECTED); + } + case 42: + break; + case 28: { + return new ParsedSymbol(ParsedSymbol.TYPE_STATIC); + } + case 43: + break; + case 9: { + string.append(yytext()); + } + case 44: + break; + case 14: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 45: + break; + case 29: { + return new ParsedSymbol(ParsedSymbol.TYPE_PRIVATE); + } + case 46: + break; + case 5: { + return new ParsedSymbol(ParsedSymbol.TYPE_COLON); + } + case 47: + break; + case 18: { + string.append('\r'); + } + case 48: + break; + case 25: { + return new ParsedSymbol(ParsedSymbol.TYPE_TRUE); + } + case 49: + break; + case 6: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMA); + } + case 50: + break; + case 35: { + String s = yytext(); + long ns = Long.parseLong(s.substring(3, s.length() - 2)); + return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, new Long(ns)); + } + case 51: + break; + case 27: { + return new ParsedSymbol(ParsedSymbol.TYPE_FALSE); + } + case 52: + break; + case 11: { + yybegin(YYINITIAL); + // length also includes the trailing quote + if (isMultiname) { + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + } else { + return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); + } + } + case 53: + break; + case 17: { + string.append('\b'); + } + case 54: + break; + case 10: { + throw new ParseException("Unterminated string at end of line", yyline + 1); + } + case 55: + break; + case 4: { + isMultiname = false; + yybegin(STRING); + string.setLength(0); + } + case 56: + break; + case 32: { + return new ParsedSymbol(ParsedSymbol.TYPE_EXPLICIT); + } + case 57: + break; + case 16: { + string.append('\t'); + } + case 58: + break; + case 12: { + return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); + } + case 59: + break; + case 31: { + return new ParsedSymbol(ParsedSymbol.TYPE_INTERNAL); + } + case 60: + break; + case 23: { + return new ParsedSymbol(ParsedSymbol.TYPE_DOTS); + } + case 61: + break; + case 19: { + string.append('\\'); + } + case 62: + break; + case 7: { + return new ParsedSymbol(ParsedSymbol.TYPE_STAR); + } + case 63: + break; + case 13: { + throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 64: + break; + case 30: { + return new ParsedSymbol(ParsedSymbol.TYPE_PACKAGE); + } + case 65: + break; + case 26: { + isMultiname = true; + String s = yytext(); + multinameId = Long.parseLong(s.substring(2, s.length() - 2)); + yybegin(STRING); + string.setLength(0); + } + case 66: + break; + case 15: { + string.append('\n'); + } + case 67: + break; + case 21: { + string.append('\f'); + } + case 68: + break; + case 20: { + string.append('\"'); + } + case 69: + break; + case 1: { + } + case 70: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(ParsedSymbol.TYPE_EOF); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java similarity index 93% rename from src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java index c098b7067..b767fdacc 100644 --- a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java @@ -1,313 +1,312 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.types.MethodInfo; -import com.jpexs.decompiler.flash.abc.types.ValueKind; -import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; -import com.jpexs.decompiler.flash.configuration.Configuration; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class MethodInfoParser { - - public static boolean parseSlotConst(String text, TraitSlotConst trait, ABC abc) throws ParseException { - MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); - ParsedSymbol symb; - int type_index = -1; - ValueKind value = new ValueKind(0, 0); - try { - ParsedSymbol symbType = lexer.yylex(); - if (symbType.type == ParsedSymbol.TYPE_STAR) { - type_index = 0; - } else if (symbType.type == ParsedSymbol.TYPE_MULTINAME) { - type_index = (int) (long) (Long) symbType.value; - } else { - throw new ParseException("Multiname or * expected", lexer.yyline()); - } - ParsedSymbol symbEqual = lexer.yylex(); - if (symbEqual.type == ParsedSymbol.TYPE_ASSIGN) { - ParsedSymbol symbValue; - String nstype = ""; - do { - symbValue = lexer.yylex(); - if (symbValue.type >= 8 && symbValue.type <= 13) { - nstype = nstype + symbValue.type + ":"; - } - } while (symbValue.type >= 8 && symbValue.type <= 13); - if ((!nstype.isEmpty()) && (symbValue.type != ParsedSymbol.TYPE_NAMESPACE)) { - throw new ParseException("Namespace expected", lexer.yyline()); - } - int id = 0; - switch (symbValue.type) { - case ParsedSymbol.TYPE_INTEGER: - value = new ValueKind(abc.constants.getIntId((Long) symbValue.value, true), ValueKind.CONSTANT_Int); - break; - case ParsedSymbol.TYPE_FLOAT: - value = new ValueKind(abc.constants.getDoubleId((Double) symbValue.value, true), ValueKind.CONSTANT_Double); - break; - case ParsedSymbol.TYPE_STRING: - value = new ValueKind(abc.constants.getStringId((String) symbValue.value, true), ValueKind.CONSTANT_Utf8); - break; - case ParsedSymbol.TYPE_TRUE: - value = new ValueKind(0, ValueKind.CONSTANT_True); - break; - case ParsedSymbol.TYPE_FALSE: - value = new ValueKind(0, ValueKind.CONSTANT_False); - break; - case ParsedSymbol.TYPE_NULL: - value = new ValueKind(0, ValueKind.CONSTANT_Null); - break; - case ParsedSymbol.TYPE_UNDEFINED: - value = new ValueKind(0, ValueKind.CONSTANT_Undefined); - break; - case ParsedSymbol.TYPE_NAMESPACE: - if (nstype.equals("9:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageNamespace); - } else if (nstype.equals("9:10:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageInternalNs); - } else if (nstype.equals("13:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ProtectedNamespace); - } else if (nstype.equals("12:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ExplicitNamespace); - } else if (nstype.equals("11:13:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_StaticProtectedNs); - } else if (nstype.equals("8:")) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PrivateNs); - } else if (nstype.isEmpty()) { - value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_Namespace); - } else { - throw new ParseException("Invalid type of namespace", lexer.yyline()); - } - break; - default: - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - symb = lexer.yylex(); - if (symb.type != ParsedSymbol.TYPE_EOF) { - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - } else if (symbEqual.type == ParsedSymbol.TYPE_EOF) { - } else { - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - } catch (IOException ex) { - return false; - } - trait.type_index = type_index; - trait.value_kind = value.value_kind; - trait.value_index = value.value_index; - return true; - } - - public static boolean parseReturnType(String text, MethodInfo update) throws ParseException { - MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); - ParsedSymbol symb; - int type = -1; - try { - symb = lexer.yylex(); - if (symb.type == ParsedSymbol.TYPE_STAR) { - type = 0; - } else if (symb.type == ParsedSymbol.TYPE_MULTINAME) { - type = (int) (long) (Long) symb.value; - } else { - throw new ParseException("Multiname or * expected", lexer.yyline()); - } - symb = lexer.yylex(); - if (symb.type != ParsedSymbol.TYPE_EOF) { - throw new ParseException("Only one return type allowed", lexer.yyline()); - } - update.ret_type = type; - return true; - } catch (IOException ex) { - } - return false; - } - - public static boolean parseParams(String text, MethodInfo update, ABC abc) throws ParseException { - MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); - List paramNames = new ArrayList<>(); - List paramTypes = new ArrayList<>(); - List optionalValues = new ArrayList<>(); - boolean hasOptional = false; - boolean needsRest = false; - try { - ParsedSymbol symb; - symb = lexer.yylex(); - while (symb.type != ParsedSymbol.TYPE_EOF) { - if (symb.type == ParsedSymbol.TYPE_DOTS) { - needsRest = true; - symb = lexer.yylex(); - if (symb.type != ParsedSymbol.TYPE_IDENTIFIER) { - throw new ParseException("Identifier expected", lexer.yyline()); - } - symb = lexer.yylex(); - if (symb.type != ParsedSymbol.TYPE_EOF) { - throw new ParseException("End expected after rest params", lexer.yyline()); - } - break; - } - - if (symb.type != ParsedSymbol.TYPE_IDENTIFIER) { - throw new ParseException("Identifier expected", lexer.yyline()); - } - paramNames.add((String) symb.value); - symb = lexer.yylex(); - if (symb.type == ParsedSymbol.TYPE_COLON) { - ParsedSymbol symbType = lexer.yylex(); - if (symbType.type == ParsedSymbol.TYPE_STAR) { - paramTypes.add(new Long(0)); - } else if (symbType.type == ParsedSymbol.TYPE_MULTINAME) { - paramTypes.add((Long) symbType.value); - } else { - throw new ParseException("Multiname or * expected", lexer.yyline()); - } - ParsedSymbol symbEqual = lexer.yylex(); - if (symbEqual.type == ParsedSymbol.TYPE_ASSIGN) { - hasOptional = true; - ParsedSymbol symbValue; - String nstype = ""; - do { - symbValue = lexer.yylex(); - if (symbValue.type >= 8 && symbValue.type <= 13) { - nstype = nstype + symbValue.type + ":"; - } - } while (symbValue.type >= 8 && symbValue.type <= 13); - if ((!nstype.isEmpty()) && (symbValue.type != ParsedSymbol.TYPE_NAMESPACE)) { - throw new ParseException("Namespace expected", lexer.yyline()); - } - int id = 0; - switch (symbValue.type) { - case ParsedSymbol.TYPE_INTEGER: - optionalValues.add(new ValueKind(abc.constants.getIntId((Long) symbValue.value, true), ValueKind.CONSTANT_Int)); - break; - case ParsedSymbol.TYPE_FLOAT: - optionalValues.add(new ValueKind(abc.constants.getDoubleId((Double) symbValue.value, true), ValueKind.CONSTANT_Double)); - break; - case ParsedSymbol.TYPE_STRING: - optionalValues.add(new ValueKind(abc.constants.getStringId((String) symbValue.value, true), ValueKind.CONSTANT_Utf8)); - break; - case ParsedSymbol.TYPE_TRUE: - optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_True)); - break; - case ParsedSymbol.TYPE_FALSE: - optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_False)); - break; - case ParsedSymbol.TYPE_NULL: - optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_Null)); - break; - case ParsedSymbol.TYPE_UNDEFINED: - optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_Undefined)); - break; - case ParsedSymbol.TYPE_NAMESPACE: - if (nstype.equals("9:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageNamespace)); - } else if (nstype.equals("9:10:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageInternalNs)); - } else if (nstype.equals("13:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ProtectedNamespace)); - } else if (nstype.equals("12:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ExplicitNamespace)); - } else if (nstype.equals("11:13:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_StaticProtectedNs)); - } else if (nstype.equals("8:")) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PrivateNs)); - } else if (nstype.isEmpty()) { - optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_Namespace)); - } else { - throw new ParseException("Invalid type of namespace", lexer.yyline()); - } - break; - default: - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - symb = lexer.yylex(); - if (symb.type == ParsedSymbol.TYPE_COMMA) { - } else if (symb.type == ParsedSymbol.TYPE_EOF) { - break; - } - } else if (symbEqual.type == ParsedSymbol.TYPE_COMMA) { - if (hasOptional) { - throw new ParseException("Parameter must have default value", lexer.yyline()); - } - } else if (symbEqual.type == ParsedSymbol.TYPE_EOF) { - if (hasOptional) { - throw new ParseException("Parameter must have default value", lexer.yyline()); - } - break; - } else { - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - } else if (symb.type == ParsedSymbol.TYPE_COMMA) { - } else if (symb.type == ParsedSymbol.TYPE_EOF) { - break; - } else { - throw new ParseException("Unexpected symbol", lexer.yyline()); - } - symb = lexer.yylex(); - } - } catch (IOException iex) { - return false; - } - - if (needsRest && (!optionalValues.isEmpty())) { - throw new ParseException("Rest parameter canot be combined with default values", lexer.yyline()); - } - - update.param_types = new int[paramTypes.size()]; - for (int p = 0; p < paramTypes.size(); p++) { - update.param_types[p] = (int) (long) paramTypes.get(p); - } - update.optional = (ValueKind[]) optionalValues.toArray(new ValueKind[optionalValues.size()]); - update.unsetFlagHas_optional(); - if (!optionalValues.isEmpty()) { - update.setFlagHas_optional(); - } - update.unsetFlagNeed_rest(); - if (needsRest) { - update.setFlagNeed_rest(); - } - - update.unsetFlagHas_paramnames(); - update.paramNames = new int[]{}; - boolean useParamNames = false; - for (int p = 0; p < paramNames.size(); p++) { - if (!paramNames.get(p).equals("param" + (p + 1))) { - useParamNames = true; - } - } - if (!Configuration.paramNamesEnable.get()) { - useParamNames = false; - } - if (useParamNames) { - update.setFlagHas_paramnames(); - update.paramNames = new int[paramNames.size()]; - for (int p = 0; p < paramNames.size(); p++) { - update.paramNames[p] = abc.constants.getStringId(paramNames.get(p), true); - } - } - return true; - - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.methodinfo_parser; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.types.MethodInfo; +import com.jpexs.decompiler.flash.abc.types.ValueKind; +import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; +import com.jpexs.decompiler.flash.configuration.Configuration; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class MethodInfoParser { + + public static boolean parseSlotConst(String text, TraitSlotConst trait, ABC abc) throws ParseException { + MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); + ParsedSymbol symb; + int type_index = -1; + ValueKind value = new ValueKind(0, 0); + try { + ParsedSymbol symbType = lexer.yylex(); + if (symbType.type == ParsedSymbol.TYPE_STAR) { + type_index = 0; + } else if (symbType.type == ParsedSymbol.TYPE_MULTINAME) { + type_index = (int) (long) (Long) symbType.value; + } else { + throw new ParseException("Multiname or * expected", lexer.yyline()); + } + ParsedSymbol symbEqual = lexer.yylex(); + if (symbEqual.type == ParsedSymbol.TYPE_ASSIGN) { + ParsedSymbol symbValue; + String nstype = ""; + do { + symbValue = lexer.yylex(); + if (symbValue.type >= 8 && symbValue.type <= 13) { + nstype = nstype + symbValue.type + ":"; + } + } while (symbValue.type >= 8 && symbValue.type <= 13); + if ((!nstype.isEmpty()) && (symbValue.type != ParsedSymbol.TYPE_NAMESPACE)) { + throw new ParseException("Namespace expected", lexer.yyline()); + } + int id = 0; + switch (symbValue.type) { + case ParsedSymbol.TYPE_INTEGER: + value = new ValueKind(abc.constants.getIntId((Long) symbValue.value, true), ValueKind.CONSTANT_Int); + break; + case ParsedSymbol.TYPE_FLOAT: + value = new ValueKind(abc.constants.getDoubleId((Double) symbValue.value, true), ValueKind.CONSTANT_Double); + break; + case ParsedSymbol.TYPE_STRING: + value = new ValueKind(abc.constants.getStringId((String) symbValue.value, true), ValueKind.CONSTANT_Utf8); + break; + case ParsedSymbol.TYPE_TRUE: + value = new ValueKind(0, ValueKind.CONSTANT_True); + break; + case ParsedSymbol.TYPE_FALSE: + value = new ValueKind(0, ValueKind.CONSTANT_False); + break; + case ParsedSymbol.TYPE_NULL: + value = new ValueKind(0, ValueKind.CONSTANT_Null); + break; + case ParsedSymbol.TYPE_UNDEFINED: + value = new ValueKind(0, ValueKind.CONSTANT_Undefined); + break; + case ParsedSymbol.TYPE_NAMESPACE: + if (nstype.equals("9:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageNamespace); + } else if (nstype.equals("9:10:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageInternalNs); + } else if (nstype.equals("13:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ProtectedNamespace); + } else if (nstype.equals("12:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ExplicitNamespace); + } else if (nstype.equals("11:13:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_StaticProtectedNs); + } else if (nstype.equals("8:")) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PrivateNs); + } else if (nstype.isEmpty()) { + value = new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_Namespace); + } else { + throw new ParseException("Invalid type of namespace", lexer.yyline()); + } + break; + default: + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + symb = lexer.yylex(); + if (symb.type != ParsedSymbol.TYPE_EOF) { + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + } else if (symbEqual.type == ParsedSymbol.TYPE_EOF) { + } else { + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + } catch (IOException ex) { + return false; + } + trait.type_index = type_index; + trait.value_kind = value.value_kind; + trait.value_index = value.value_index; + return true; + } + + public static boolean parseReturnType(String text, MethodInfo update) throws ParseException { + MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); + ParsedSymbol symb; + int type = -1; + try { + symb = lexer.yylex(); + if (symb.type == ParsedSymbol.TYPE_STAR) { + type = 0; + } else if (symb.type == ParsedSymbol.TYPE_MULTINAME) { + type = (int) (long) (Long) symb.value; + } else { + throw new ParseException("Multiname or * expected", lexer.yyline()); + } + symb = lexer.yylex(); + if (symb.type != ParsedSymbol.TYPE_EOF) { + throw new ParseException("Only one return type allowed", lexer.yyline()); + } + update.ret_type = type; + return true; + } catch (IOException ex) { + } + return false; + } + + public static boolean parseParams(String text, MethodInfo update, ABC abc) throws ParseException { + MethodInfoLexer lexer = new MethodInfoLexer(new ByteArrayInputStream(text.getBytes())); + List paramNames = new ArrayList<>(); + List paramTypes = new ArrayList<>(); + List optionalValues = new ArrayList<>(); + boolean hasOptional = false; + boolean needsRest = false; + try { + ParsedSymbol symb; + symb = lexer.yylex(); + while (symb.type != ParsedSymbol.TYPE_EOF) { + if (symb.type == ParsedSymbol.TYPE_DOTS) { + needsRest = true; + symb = lexer.yylex(); + if (symb.type != ParsedSymbol.TYPE_IDENTIFIER) { + throw new ParseException("Identifier expected", lexer.yyline()); + } + symb = lexer.yylex(); + if (symb.type != ParsedSymbol.TYPE_EOF) { + throw new ParseException("End expected after rest params", lexer.yyline()); + } + break; + } + + if (symb.type != ParsedSymbol.TYPE_IDENTIFIER) { + throw new ParseException("Identifier expected", lexer.yyline()); + } + paramNames.add((String) symb.value); + symb = lexer.yylex(); + if (symb.type == ParsedSymbol.TYPE_COLON) { + ParsedSymbol symbType = lexer.yylex(); + if (symbType.type == ParsedSymbol.TYPE_STAR) { + paramTypes.add(new Long(0)); + } else if (symbType.type == ParsedSymbol.TYPE_MULTINAME) { + paramTypes.add((Long) symbType.value); + } else { + throw new ParseException("Multiname or * expected", lexer.yyline()); + } + ParsedSymbol symbEqual = lexer.yylex(); + if (symbEqual.type == ParsedSymbol.TYPE_ASSIGN) { + hasOptional = true; + ParsedSymbol symbValue; + String nstype = ""; + do { + symbValue = lexer.yylex(); + if (symbValue.type >= 8 && symbValue.type <= 13) { + nstype = nstype + symbValue.type + ":"; + } + } while (symbValue.type >= 8 && symbValue.type <= 13); + if ((!nstype.isEmpty()) && (symbValue.type != ParsedSymbol.TYPE_NAMESPACE)) { + throw new ParseException("Namespace expected", lexer.yyline()); + } + int id = 0; + switch (symbValue.type) { + case ParsedSymbol.TYPE_INTEGER: + optionalValues.add(new ValueKind(abc.constants.getIntId((Long) symbValue.value, true), ValueKind.CONSTANT_Int)); + break; + case ParsedSymbol.TYPE_FLOAT: + optionalValues.add(new ValueKind(abc.constants.getDoubleId((Double) symbValue.value, true), ValueKind.CONSTANT_Double)); + break; + case ParsedSymbol.TYPE_STRING: + optionalValues.add(new ValueKind(abc.constants.getStringId((String) symbValue.value, true), ValueKind.CONSTANT_Utf8)); + break; + case ParsedSymbol.TYPE_TRUE: + optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_True)); + break; + case ParsedSymbol.TYPE_FALSE: + optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_False)); + break; + case ParsedSymbol.TYPE_NULL: + optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_Null)); + break; + case ParsedSymbol.TYPE_UNDEFINED: + optionalValues.add(new ValueKind(0, ValueKind.CONSTANT_Undefined)); + break; + case ParsedSymbol.TYPE_NAMESPACE: + if (nstype.equals("9:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageNamespace)); + } else if (nstype.equals("9:10:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PackageInternalNs)); + } else if (nstype.equals("13:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ProtectedNamespace)); + } else if (nstype.equals("12:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_ExplicitNamespace)); + } else if (nstype.equals("11:13:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_StaticProtectedNs)); + } else if (nstype.equals("8:")) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_PrivateNs)); + } else if (nstype.isEmpty()) { + optionalValues.add(new ValueKind((int) (long) (Long) symbValue.value, ValueKind.CONSTANT_Namespace)); + } else { + throw new ParseException("Invalid type of namespace", lexer.yyline()); + } + break; + default: + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + symb = lexer.yylex(); + if (symb.type == ParsedSymbol.TYPE_COMMA) { + } else if (symb.type == ParsedSymbol.TYPE_EOF) { + break; + } + } else if (symbEqual.type == ParsedSymbol.TYPE_COMMA) { + if (hasOptional) { + throw new ParseException("Parameter must have default value", lexer.yyline()); + } + } else if (symbEqual.type == ParsedSymbol.TYPE_EOF) { + if (hasOptional) { + throw new ParseException("Parameter must have default value", lexer.yyline()); + } + break; + } else { + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + } else if (symb.type == ParsedSymbol.TYPE_COMMA) { + } else if (symb.type == ParsedSymbol.TYPE_EOF) { + break; + } else { + throw new ParseException("Unexpected symbol", lexer.yyline()); + } + symb = lexer.yylex(); + } + } catch (IOException iex) { + return false; + } + + if (needsRest && (!optionalValues.isEmpty())) { + throw new ParseException("Rest parameter canot be combined with default values", lexer.yyline()); + } + + update.param_types = new int[paramTypes.size()]; + for (int p = 0; p < paramTypes.size(); p++) { + update.param_types[p] = (int) (long) paramTypes.get(p); + } + update.optional = (ValueKind[]) optionalValues.toArray(new ValueKind[optionalValues.size()]); + update.unsetFlagHas_optional(); + if (!optionalValues.isEmpty()) { + update.setFlagHas_optional(); + } + update.unsetFlagNeed_rest(); + if (needsRest) { + update.setFlagNeed_rest(); + } + + update.unsetFlagHas_paramnames(); + update.paramNames = new int[]{}; + boolean useParamNames = false; + for (int p = 0; p < paramNames.size(); p++) { + if (!paramNames.get(p).equals("param" + (p + 1))) { + useParamNames = true; + } + } + if (!Configuration.paramNamesEnable.get()) { + useParamNames = false; + } + if (useParamNames) { + update.setFlagHas_paramnames(); + update.paramNames = new int[paramNames.size()]; + for (int p = 0; p < paramNames.size(); p++) { + update.paramNames[p] = abc.constants.getStringId(paramNames.get(p), true); + } + } + return true; + + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java new file mode 100644 index 000000000..950434879 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.methodinfo_parser; + +public class ParseException extends Exception { + + public long line; + public String text; + + public ParseException(String text, long line) { + super("ParseException:" + text + " on line " + line); + this.line = line; + this.text = text; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java similarity index 64% rename from src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java index a9de069ee..84a0612d2 100644 --- a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; - -public class ParsedSymbol { - - public int type; - public Object value; - public static final int TYPE_INTEGER = 1; - public static final int TYPE_FLOAT = 2; - public static final int TYPE_TRUE = 3; - public static final int TYPE_FALSE = 4; - public static final int TYPE_NULL = 5; - public static final int TYPE_UNDEFINED = 6; - public static final int TYPE_STRING = 7; - //8-12 namespace prefix - public static final int TYPE_PRIVATE = 8; - public static final int TYPE_PACKAGE = 9; - public static final int TYPE_INTERNAL = 10; - public static final int TYPE_STATIC = 11; - public static final int TYPE_EXPLICIT = 12; - public static final int TYPE_PROTECTED = 13; - public static final int TYPE_NAMESPACE = 14; - public static final int TYPE_COLON = 15; - public static final int TYPE_COMMA = 16; - public static final int TYPE_DOTS = 17; - public static final int TYPE_MULTINAME = 18; - public static final int TYPE_IDENTIFIER = 19; - public static final int TYPE_EOF = 20; - public static final int TYPE_STAR = 21; - public static final int TYPE_ASSIGN = 22; - - public ParsedSymbol(int type, Object value) { - this.type = type; - this.value = value; - } - - public ParsedSymbol(int type) { - this.type = type; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.methodinfo_parser; + +public class ParsedSymbol { + + public int type; + public Object value; + public static final int TYPE_INTEGER = 1; + public static final int TYPE_FLOAT = 2; + public static final int TYPE_TRUE = 3; + public static final int TYPE_FALSE = 4; + public static final int TYPE_NULL = 5; + public static final int TYPE_UNDEFINED = 6; + public static final int TYPE_STRING = 7; + //8-12 namespace prefix + public static final int TYPE_PRIVATE = 8; + public static final int TYPE_PACKAGE = 9; + public static final int TYPE_INTERNAL = 10; + public static final int TYPE_STATIC = 11; + public static final int TYPE_EXPLICIT = 12; + public static final int TYPE_PROTECTED = 13; + public static final int TYPE_NAMESPACE = 14; + public static final int TYPE_COLON = 15; + public static final int TYPE_COMMA = 16; + public static final int TYPE_DOTS = 17; + public static final int TYPE_MULTINAME = 18; + public static final int TYPE_IDENTIFIER = 19; + public static final int TYPE_EOF = 20; + public static final int TYPE_STAR = 21; + public static final int TYPE_ASSIGN = 22; + + public ParsedSymbol(int type, Object value) { + this.type = type; + this.value = value; + } + + public ParsedSymbol(int type) { + this.type = type; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex diff --git a/src/com/jpexs/decompiler/flash/abc/types/ABCException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ABCException.java similarity index 76% rename from src/com/jpexs/decompiler/flash/abc/types/ABCException.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ABCException.java index 53cbed92f..faae86210 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/ABCException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ABCException.java @@ -1,68 +1,67 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.ConvertException; -import com.jpexs.helpers.Helper; -import java.io.Serializable; -import java.util.List; - -public class ABCException implements Serializable { - - public int start; - public int end; - public int target; - public int type_index; - public int name_index; - - @Override - public String toString() { - return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type_index=" + type_index + " name_index=" + name_index; - } - - public String toString(ConstantPool constants, List fullyQualifiedNames) { - return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; - } - - public String toString(ConstantPool constants, AVM2Code code, List fullyQualifiedNames) { - try { - return "Exception: startServer=" + code.adr2pos(start) + ":" + code.code.get(code.adr2pos(start)).toStringNoAddress(constants, fullyQualifiedNames) + " end=" + code.adr2pos(end) + ":" + code.code.get(code.adr2pos(end)).toStringNoAddress(constants, fullyQualifiedNames) + " target=" + code.adr2pos(target) + ":" + code.code.get(code.adr2pos(target)).toStringNoAddress(constants, fullyQualifiedNames) + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; - } catch (ConvertException ex) { - return ""; - } - } - - public boolean isFinally() { - return (name_index == 0) && (type_index == 0); - } - - public String getVarName(ConstantPool constants, List fullyQualifiedNames) { - if (name_index == 0) { - return ""; - } - return constants.getMultiname(name_index).getName(constants, fullyQualifiedNames); - } - - public String getTypeName(ConstantPool constants, List fullyQualifiedNames) { - if (type_index == 0) { - return "*"; - } - return constants.getMultiname(type_index).getName(constants, fullyQualifiedNames); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.ConvertException; +import com.jpexs.helpers.Helper; +import java.io.Serializable; +import java.util.List; + +public class ABCException implements Serializable { + + public int start; + public int end; + public int target; + public int type_index; + public int name_index; + + @Override + public String toString() { + return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type_index=" + type_index + " name_index=" + name_index; + } + + public String toString(ConstantPool constants, List fullyQualifiedNames) { + return "Exception: startServer=" + Helper.formatAddress(start) + " end=" + Helper.formatAddress(end) + " target=" + target + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; + } + + public String toString(ConstantPool constants, AVM2Code code, List fullyQualifiedNames) { + try { + return "Exception: startServer=" + code.adr2pos(start) + ":" + code.code.get(code.adr2pos(start)).toStringNoAddress(constants, fullyQualifiedNames) + " end=" + code.adr2pos(end) + ":" + code.code.get(code.adr2pos(end)).toStringNoAddress(constants, fullyQualifiedNames) + " target=" + code.adr2pos(target) + ":" + code.code.get(code.adr2pos(target)).toStringNoAddress(constants, fullyQualifiedNames) + " type=\"" + getTypeName(constants, fullyQualifiedNames) + "\" name=\"" + getVarName(constants, fullyQualifiedNames) + "\""; + } catch (ConvertException ex) { + return ""; + } + } + + public boolean isFinally() { + return (name_index == 0) && (type_index == 0); + } + + public String getVarName(ConstantPool constants, List fullyQualifiedNames) { + if (name_index == 0) { + return ""; + } + return constants.getMultiname(name_index).getName(constants, fullyQualifiedNames); + } + + public String getTypeName(ConstantPool constants, List fullyQualifiedNames) { + if (type_index == 0) { + return "*"; + } + return constants.getMultiname(type_index).getName(constants, fullyQualifiedNames); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java new file mode 100644 index 000000000..e3eff2ea1 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.types.traits.Traits; +import java.util.List; + +public class ClassInfo { + + public int cinit_index; //MethodInfo - static initializer + public Traits static_traits = new Traits(); + + public boolean deleted; + + @Override + public String toString() { + return "method_index=" + cinit_index + "\r\n" + static_traits.toString(); + } + + public String toString(ABC abc, List fullyQualifiedNames) { + return "method_index=" + cinit_index + "\r\n" + static_traits.toString(abc, fullyQualifiedNames); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Decimal.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Decimal.java new file mode 100644 index 000000000..3fcb756d5 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Decimal.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +/** + * + * @author JPEXS + */ +public class Decimal { + + public byte[] data; + + public Decimal(byte[] data) { + this.data = data; + } + + @Override + public String toString() { + return new String(data); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java similarity index 84% rename from src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java index e3e87e3b0..f8fb8a956 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java similarity index 60% rename from src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java index 513ddfa42..3eae5a138 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.helpers.Helper; - -public class MetadataInfo { - - public int name_index; - public int[] keys; - public int[] values; - - public MetadataInfo(int name_index, int[] keys, int[] values) { - this.name_index = name_index; - this.keys = keys; - this.values = values; - } - - @Override - public String toString() { - return "name_index=" + name_index + " keys=" + Helper.intArrToString(keys) + " values=" + Helper.intArrToString(values); - } - - public String toString(ConstantPool constants) { - String s = "name=" + constants.getString(name_index); - if (keys.length > 0) { - s += "\r\n"; - } - for (int i = 0; i < keys.length; i++) { - if (keys[i] == 0) { - s += "\"" + constants.getString(values[i]) + "\"\r\n"; - } else { - s += "\"" + constants.getString(keys[i]) + "\"=\"" + constants.getString(values[i]) + "\"\r\n"; - } - } - return s; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.helpers.Helper; + +public class MetadataInfo { + + public int name_index; + public int[] keys; + public int[] values; + + public MetadataInfo(int name_index, int[] keys, int[] values) { + this.name_index = name_index; + this.keys = keys; + this.values = values; + } + + @Override + public String toString() { + return "name_index=" + name_index + " keys=" + Helper.intArrToString(keys) + " values=" + Helper.intArrToString(values); + } + + public String toString(ConstantPool constants) { + String s = "name=" + constants.getString(name_index); + if (keys.length > 0) { + s += "\r\n"; + } + for (int i = 0; i < keys.length; i++) { + if (keys[i] == 0) { + s += "\"" + constants.getString(values[i]) + "\"\r\n"; + } else { + s += "\"" + constants.getString(keys[i]) + "\"=\"" + constants.getString(values[i]) + "\"\r\n"; + } + } + return s; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java similarity index 94% rename from src/com/jpexs/decompiler/flash/abc/types/MethodBody.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 128076430..3b09c6581 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.AppStrings; diff --git a/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java similarity index 93% rename from src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java index e93a260f2..fb53d4d26 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/Multiname.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java similarity index 93% rename from src/com/jpexs/decompiler/flash/abc/types/Multiname.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java index f0214ed06..924543a52 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/Multiname.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; diff --git a/src/com/jpexs/decompiler/flash/abc/types/Namespace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java similarity index 83% rename from src/com/jpexs/decompiler/flash/abc/types/Namespace.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java index bb998c943..c6ad16325 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/Namespace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java new file mode 100644 index 000000000..c676d5e69 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; + +public class NamespaceSet { + + public boolean deleted; + public int[] namespaces; + + public NamespaceSet() { + } + + public NamespaceSet(int[] namespaces) { + this.namespaces = namespaces; + } + + public String toString(ConstantPool constants) { + String s = ""; + for (int i = 0; i < this.namespaces.length; i++) { + if (i > 0) { + s += ", "; + } + s += constants.getNamespace(namespaces[i]).getNameWithKind(constants); + } + return s; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java similarity index 80% rename from src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java index ff98977e9..aba35998d 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java similarity index 88% rename from src/com/jpexs/decompiler/flash/abc/types/ValueKind.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java index 071f39352..ccfb43dfb 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java @@ -1,185 +1,184 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.helpers.Helper; - -public class ValueKind { - - public static final int CONSTANT_Decimal = 0x02; //decimal - public static final int CONSTANT_Int = 0x03;// integer - public static final int CONSTANT_UInt = 0x04;// uinteger - public static final int CONSTANT_Double = 0x06;// double - public static final int CONSTANT_Utf8 = 0x01;// string - public static final int CONSTANT_True = 0x0B;// - - public static final int CONSTANT_False = 0x0A;// - - public static final int CONSTANT_Null = 0x0C;// - - public static final int CONSTANT_Undefined = 0x00;// - - public static final int CONSTANT_Namespace = 0x08;// namespace - public static final int CONSTANT_PackageNamespace = 0x16;// namespace - public static final int CONSTANT_PackageInternalNs = 0x17;// Namespace - public static final int CONSTANT_ProtectedNamespace = 0x18;// Namespace - public static final int CONSTANT_ExplicitNamespace = 0x19;// Namespace - public static final int CONSTANT_StaticProtectedNs = 0x1A;// Namespace - public static final int CONSTANT_PrivateNs = 0x05;// namespace - private static final int[] optionalKinds = new int[]{0x03, 0x04, 0x06, 0x02, 0x01, 0x0B, 0x0A, 0x0C, 0x00, 0x08, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x05}; - private static final String[] optionalKindNames = new String[]{"Int", "UInt", "Double", "Decimal", "Utf8", "True", "False", "Null", "Undefined", "Namespace", "PackageNamespace", "PackageInternalNs", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNs", "PrivateNamespace"}; - public int value_index; - public int value_kind; - - public ValueKind(int value_index, int value_kind) { - this.value_index = value_index; - this.value_kind = value_kind; - } - - public static int nsKindToValueKind(int nsKind) { - switch (nsKind) { - case Namespace.KIND_EXPLICIT: - return CONSTANT_ExplicitNamespace; - case Namespace.KIND_NAMESPACE: - return CONSTANT_Namespace; - case Namespace.KIND_PACKAGE: - return CONSTANT_PackageNamespace; - case Namespace.KIND_PACKAGE_INTERNAL: - return CONSTANT_PackageInternalNs; - case Namespace.KIND_PRIVATE: - return CONSTANT_PrivateNs; - case Namespace.KIND_PROTECTED: - return CONSTANT_ProtectedNamespace; - case Namespace.KIND_STATIC_PROTECTED: - return CONSTANT_StaticProtectedNs; - } - return 0; - } - - @Override - public String toString() { - String s = ""; - s += value_index + ":"; - boolean found = false; - for (int i = 0; i < optionalKinds.length; i++) { - if (optionalKinds[i] == value_kind) { - s += optionalKindNames[i]; - found = true; - break; - } - } - if (!found) { - s += "?"; - } - return s; - } - - public boolean isNamespace() { - switch (value_kind) { - case CONSTANT_Namespace: - case CONSTANT_PackageInternalNs: - case CONSTANT_ProtectedNamespace: - case CONSTANT_ExplicitNamespace: - case CONSTANT_StaticProtectedNs: - case CONSTANT_PrivateNs: - return true; - default: - return false; - } - } - - public String toString(ConstantPool constants) { - String ret = "?"; - switch (value_kind) { - case CONSTANT_Int: - ret = "" + constants.getInt(value_index); - break; - case CONSTANT_UInt: - ret = "" + constants.getUInt(value_index); - break; - case CONSTANT_Double: - ret = "" + constants.getDouble(value_index); - break; - case CONSTANT_Decimal: - ret = "" + constants.getDecimal(value_index); - break; - case CONSTANT_Utf8: - ret = "\"" + Helper.escapeString(constants.getString(value_index)) + "\""; - break; - case CONSTANT_True: - ret = "true"; - break; - case CONSTANT_False: - ret = "false"; - break; - case CONSTANT_Null: - ret = "null"; - break; - case CONSTANT_Undefined: - ret = "undefined"; - break; - case CONSTANT_Namespace: - case CONSTANT_PackageInternalNs: - case CONSTANT_ProtectedNamespace: - case CONSTANT_ExplicitNamespace: - case CONSTANT_StaticProtectedNs: - case CONSTANT_PrivateNs: - ret = "\"" + constants.getNamespace(value_index).getName(constants) + "\""; //assume not null name - break; - } - return ret; - } - - public String toASMString(ConstantPool constants) { - String ret = "?"; - switch (value_kind) { - case CONSTANT_Int: - ret = "Integer(" + constants.getInt(value_index) + ")"; - break; - case CONSTANT_UInt: - ret = "UInteger(" + constants.getUInt(value_index) + ")"; - break; - case CONSTANT_Double: - ret = "Double(" + constants.getDouble(value_index) + ")"; - break; - case CONSTANT_Decimal: - ret = "Decimal(" + constants.getDecimal(value_index) + ")"; - break; - case CONSTANT_Utf8: - ret = "Utf8(\"" + Helper.escapeString(constants.getString(value_index)) + "\")"; - break; - case CONSTANT_True: - ret = "True"; - break; - case CONSTANT_False: - ret = "False"; - break; - case CONSTANT_Null: - ret = "Null"; - break; - case CONSTANT_Undefined: - ret = "Undefined"; - break; - case CONSTANT_Namespace: - case CONSTANT_PackageInternalNs: - case CONSTANT_ProtectedNamespace: - case CONSTANT_ExplicitNamespace: - case CONSTANT_StaticProtectedNs: - case CONSTANT_PrivateNs: - ret = constants.getNamespace(value_index).getKindStr() + "(\"" + constants.getNamespace(value_index).getName(constants) + "\")"; //assume not null name - break; - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types; + +import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; +import com.jpexs.helpers.Helper; + +public class ValueKind { + + public static final int CONSTANT_Decimal = 0x02; //decimal + public static final int CONSTANT_Int = 0x03;// integer + public static final int CONSTANT_UInt = 0x04;// uinteger + public static final int CONSTANT_Double = 0x06;// double + public static final int CONSTANT_Utf8 = 0x01;// string + public static final int CONSTANT_True = 0x0B;// - + public static final int CONSTANT_False = 0x0A;// - + public static final int CONSTANT_Null = 0x0C;// - + public static final int CONSTANT_Undefined = 0x00;// - + public static final int CONSTANT_Namespace = 0x08;// namespace + public static final int CONSTANT_PackageNamespace = 0x16;// namespace + public static final int CONSTANT_PackageInternalNs = 0x17;// Namespace + public static final int CONSTANT_ProtectedNamespace = 0x18;// Namespace + public static final int CONSTANT_ExplicitNamespace = 0x19;// Namespace + public static final int CONSTANT_StaticProtectedNs = 0x1A;// Namespace + public static final int CONSTANT_PrivateNs = 0x05;// namespace + private static final int[] optionalKinds = new int[]{0x03, 0x04, 0x06, 0x02, 0x01, 0x0B, 0x0A, 0x0C, 0x00, 0x08, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x05}; + private static final String[] optionalKindNames = new String[]{"Int", "UInt", "Double", "Decimal", "Utf8", "True", "False", "Null", "Undefined", "Namespace", "PackageNamespace", "PackageInternalNs", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNs", "PrivateNamespace"}; + public int value_index; + public int value_kind; + + public ValueKind(int value_index, int value_kind) { + this.value_index = value_index; + this.value_kind = value_kind; + } + + public static int nsKindToValueKind(int nsKind) { + switch (nsKind) { + case Namespace.KIND_EXPLICIT: + return CONSTANT_ExplicitNamespace; + case Namespace.KIND_NAMESPACE: + return CONSTANT_Namespace; + case Namespace.KIND_PACKAGE: + return CONSTANT_PackageNamespace; + case Namespace.KIND_PACKAGE_INTERNAL: + return CONSTANT_PackageInternalNs; + case Namespace.KIND_PRIVATE: + return CONSTANT_PrivateNs; + case Namespace.KIND_PROTECTED: + return CONSTANT_ProtectedNamespace; + case Namespace.KIND_STATIC_PROTECTED: + return CONSTANT_StaticProtectedNs; + } + return 0; + } + + @Override + public String toString() { + String s = ""; + s += value_index + ":"; + boolean found = false; + for (int i = 0; i < optionalKinds.length; i++) { + if (optionalKinds[i] == value_kind) { + s += optionalKindNames[i]; + found = true; + break; + } + } + if (!found) { + s += "?"; + } + return s; + } + + public boolean isNamespace() { + switch (value_kind) { + case CONSTANT_Namespace: + case CONSTANT_PackageInternalNs: + case CONSTANT_ProtectedNamespace: + case CONSTANT_ExplicitNamespace: + case CONSTANT_StaticProtectedNs: + case CONSTANT_PrivateNs: + return true; + default: + return false; + } + } + + public String toString(ConstantPool constants) { + String ret = "?"; + switch (value_kind) { + case CONSTANT_Int: + ret = "" + constants.getInt(value_index); + break; + case CONSTANT_UInt: + ret = "" + constants.getUInt(value_index); + break; + case CONSTANT_Double: + ret = "" + constants.getDouble(value_index); + break; + case CONSTANT_Decimal: + ret = "" + constants.getDecimal(value_index); + break; + case CONSTANT_Utf8: + ret = "\"" + Helper.escapeString(constants.getString(value_index)) + "\""; + break; + case CONSTANT_True: + ret = "true"; + break; + case CONSTANT_False: + ret = "false"; + break; + case CONSTANT_Null: + ret = "null"; + break; + case CONSTANT_Undefined: + ret = "undefined"; + break; + case CONSTANT_Namespace: + case CONSTANT_PackageInternalNs: + case CONSTANT_ProtectedNamespace: + case CONSTANT_ExplicitNamespace: + case CONSTANT_StaticProtectedNs: + case CONSTANT_PrivateNs: + ret = "\"" + constants.getNamespace(value_index).getName(constants) + "\""; //assume not null name + break; + } + return ret; + } + + public String toASMString(ConstantPool constants) { + String ret = "?"; + switch (value_kind) { + case CONSTANT_Int: + ret = "Integer(" + constants.getInt(value_index) + ")"; + break; + case CONSTANT_UInt: + ret = "UInteger(" + constants.getUInt(value_index) + ")"; + break; + case CONSTANT_Double: + ret = "Double(" + constants.getDouble(value_index) + ")"; + break; + case CONSTANT_Decimal: + ret = "Decimal(" + constants.getDecimal(value_index) + ")"; + break; + case CONSTANT_Utf8: + ret = "Utf8(\"" + Helper.escapeString(constants.getString(value_index)) + "\")"; + break; + case CONSTANT_True: + ret = "True"; + break; + case CONSTANT_False: + ret = "False"; + break; + case CONSTANT_Null: + ret = "Null"; + break; + case CONSTANT_Undefined: + ret = "Undefined"; + break; + case CONSTANT_Namespace: + case CONSTANT_PackageInternalNs: + case CONSTANT_ProtectedNamespace: + case CONSTANT_ExplicitNamespace: + case CONSTANT_StaticProtectedNs: + case CONSTANT_PrivateNs: + ret = constants.getNamespace(value_index).getKindStr() + "(\"" + constants.getNamespace(value_index).getName(constants) + "\")"; //assume not null name + break; + } + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java similarity index 91% rename from src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 0fb234dff..1b6a007ad 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java similarity index 97% rename from src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java index af527777e..2977d6471 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java similarity index 87% rename from src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java index 93c1a19ce..9d406d4fa 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java similarity index 88% rename from src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java index 01437f8f6..b23b297e4 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java similarity index 90% rename from src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index fe6635231..9500f720b 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java new file mode 100644 index 000000000..b46ee8e01 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.types.traits; + +/** + * + * @author JPEXS + */ +public interface TraitWithSlot { + + public int getSlotIndex(); +} diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java similarity index 91% rename from src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index cdca3c7d1..0f834f0c0 100644 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.types.traits; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java new file mode 100644 index 000000000..948358256 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ClassNameMultinameUsage extends InsideClassMultinameUsage implements DefinitionUsage { + + public ClassNameMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { + super(abcTags, abc, multinameIndex, classIndex); + } + + @Override + public String toString() { + return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants); + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java similarity index 82% rename from src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java index c4f1b90a1..ceb51e060 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java similarity index 52% rename from src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java index dea931cbe..9ec183813 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarNameMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java similarity index 51% rename from src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java index 83dc34bf5..6ea969005 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarTypeMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java new file mode 100644 index 000000000..5aebe959f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +/** + * + * @author JPEXS + */ +public interface DefinitionUsage { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java new file mode 100644 index 000000000..3f2ca07c3 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ExtendsMultinameUsage extends InsideClassMultinameUsage { + + public ExtendsMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { + super(abcTags, abc, multinameIndex, classIndex); + } + + @Override + public String toString() { + return super.toString() + " extends"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java new file mode 100644 index 000000000..dbae3c966 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ImplementsMultinameUsage extends InsideClassMultinameUsage { + + public ImplementsMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { + super(abcTags, abc, multinameIndex, classIndex); + } + + @Override + public String toString() { + return super.toString() + " implements"; + } +} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java similarity index 57% rename from src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java index 840c6c13c..b3753f6a8 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java similarity index 52% rename from src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java index e167a89a2..9db12b976 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodBodyMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java similarity index 84% rename from src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java index 247276456..373e56856 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java similarity index 53% rename from src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java index cea5241ba..9611d0937 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java similarity index 53% rename from src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java index e839894a6..579c4888c 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodParamsMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java similarity index 53% rename from src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java index 7be4f5c80..9ae21a819 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodReturnTypeMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java new file mode 100644 index 000000000..11cc618d2 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.util.List; + +/** + * + * @author JPEXS + */ +public abstract class MultinameUsage { + + public List abcTags; + public ABC abc; + + public MultinameUsage(List abcTags, ABC abc) { + this.abcTags = abcTags; + this.abc = abc; + } + +} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java similarity index 55% rename from src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java index 00f05914d..4f24d5d0b 100644 --- a/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.abc.usages; import com.jpexs.decompiler.flash.abc.ABC; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java new file mode 100644 index 000000000..20e978025 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.abc.usages; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class TypeNameMultinameUsage extends MultinameUsage { + + public int typename_index; + + public TypeNameMultinameUsage(List abcTags, ABC abc, int typename_index) { + super(abcTags, abc); + this.typename_index = typename_index; + } + + @Override + public String toString() { + return "TypeName " + abc.constants.getMultiname(typename_index).toString(abc.constants, new ArrayList()); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/Action.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java similarity index 98% rename from src/com/jpexs/decompiler/flash/action/Action.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java index daff9333f..6acfe2612 100644 --- a/src/com/jpexs/decompiler/flash/action/Action.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.AppStrings; diff --git a/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java similarity index 97% rename from src/com/jpexs/decompiler/flash/action/ActionGraph.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index e8d30cdb6..f1dac9b10 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java similarity index 87% rename from src/com/jpexs/decompiler/flash/action/ActionGraphSource.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java index ac7cb20f7..724522174 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/ActionList.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java similarity index 89% rename from src/com/jpexs/decompiler/flash/action/ActionList.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java index e7a5c22f2..2e7ba0c83 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionList.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java similarity index 98% rename from src/com/jpexs/decompiler/flash/action/ActionListReader.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java index 23cf02f1a..8dbce7f5a 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.AppStrings; @@ -40,7 +39,6 @@ import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.ecma.Null; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.View; import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin; import com.jpexs.decompiler.graph.Graph; import com.jpexs.decompiler.graph.GraphSourceItemContainer; @@ -175,7 +173,7 @@ public class ActionListReader { actions = fixActionList(actions, null, version); } catch (Throwable e) { Logger.getLogger(ActionListReader.class.getName()).log(Level.SEVERE, null, e); - View.showMessageDialog(null, "Failed to call plugin method actionListParsed. Exception: " + e.getMessage()); + //View.showMessageDialog(null, "Failed to call plugin method actionListParsed. Exception: " + e.getMessage()); } } diff --git a/src/com/jpexs/decompiler/flash/action/ActionLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java similarity index 58% rename from src/com/jpexs/decompiler/flash/action/ActionLocalData.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java index e32179ce4..e3fc60040 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action; - -import com.jpexs.decompiler.flash.BaseLocalData; -import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.HashMap; - -/** - * - * @author JPEXS - */ -public class ActionLocalData extends BaseLocalData { - - public final HashMap regNames; - public final HashMap variables; - public final HashMap functions; - - public ActionLocalData() { - regNames = new HashMap<>(); - variables = new HashMap<>(); - functions = new HashMap<>(); - } - - public ActionLocalData(HashMap regNames) { - this.regNames = regNames; - variables = new HashMap<>(); - functions = new HashMap<>(); - } - - public ActionLocalData(HashMap regNames, HashMap variables, HashMap functions) { - this.regNames = regNames; - this.variables = variables; - this.functions = functions; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action; + +import com.jpexs.decompiler.flash.BaseLocalData; +import com.jpexs.decompiler.graph.GraphTargetItem; +import java.util.HashMap; + +/** + * + * @author JPEXS + */ +public class ActionLocalData extends BaseLocalData { + + public final HashMap regNames; + public final HashMap variables; + public final HashMap functions; + + public ActionLocalData() { + regNames = new HashMap<>(); + variables = new HashMap<>(); + functions = new HashMap<>(); + } + + public ActionLocalData(HashMap regNames) { + this.regNames = regNames; + variables = new HashMap<>(); + functions = new HashMap<>(); + } + + public ActionLocalData(HashMap regNames, HashMap variables, HashMap functions) { + this.regNames = regNames; + this.variables = variables; + this.functions = functions; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/Deobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java similarity index 91% rename from src/com/jpexs/decompiler/flash/action/Deobfuscation.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java index 49715d867..962875a0e 100644 --- a/src/com/jpexs/decompiler/flash/action/Deobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Deobfuscation.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action; @@ -250,7 +250,7 @@ public class Deobfuscation { } public static String makeObfuscatedIdentifier(String s){ - return "§"+escapeOIdentifier(s)+"§"; + return "§"+escapeOIdentifier(s)+"§"; } @@ -272,8 +272,8 @@ public class Deobfuscation { ret.append("\\f"); } else if (c == '\\') { ret.append("\\\\"); - } else if (c == '§') { - ret.append("\\§"); + } else if (c == '\u00A7') { + ret.append("\\\\u00A7"); } else { ret.append(c); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java new file mode 100644 index 000000000..560354e55 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action; + +import com.jpexs.decompiler.flash.action.model.ConstantPool; +import com.jpexs.decompiler.graph.TranslateStack; + +/** + * + * @author JPEXS + */ +public interface StoreTypeAction { + + public String getVariableName(TranslateStack stack, ConstantPool cpool); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownActionException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownActionException.java new file mode 100644 index 000000000..bea9e704c --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownActionException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action; + +/** + * + * @author JPEXS + */ +public class UnknownActionException extends RuntimeException { + + public int opCode; + + public UnknownActionException(int opCode) { + super("Unknown opCode: 0x" + Integer.toHexString(opCode)); + this.opCode = opCode; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/UnknownJumpException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownJumpException.java similarity index 60% rename from src/com/jpexs/decompiler/flash/action/UnknownJumpException.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownJumpException.java index a33e17ac8..707554afd 100644 --- a/src/com/jpexs/decompiler/flash/action/UnknownJumpException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/UnknownJumpException.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action; - -import com.jpexs.decompiler.flash.action.model.ActionItem; -import java.util.List; -import java.util.Stack; - -/** - * Raised when actual address has been referenced with an unknown jump - * - * @author JPEXS - */ -public class UnknownJumpException extends RuntimeException { - - /** - * Actual stack - */ - public Stack stack; - /** - * Actual address - */ - public long addr; - /** - * Output of the method before raising the exception - */ - public List output; - - /** - * Constructor - * - * @param stack Actual stack - * @param addr Actual address - * @param output Output of the method before raising the exception - */ - public UnknownJumpException(Stack stack, long addr, List output) { - this.stack = stack; - this.addr = addr; - this.output = output; - } - - /** - * Returns a string representation of the object - * - * @return a string representation of the object. - */ - @Override - public String toString() { - return "Unknown jump to " + addr; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action; + +import com.jpexs.decompiler.flash.action.model.ActionItem; +import java.util.List; +import java.util.Stack; + +/** + * Raised when actual address has been referenced with an unknown jump + * + * @author JPEXS + */ +public class UnknownJumpException extends RuntimeException { + + /** + * Actual stack + */ + public Stack stack; + /** + * Actual address + */ + public long addr; + /** + * Output of the method before raising the exception + */ + public List output; + + /** + * Constructor + * + * @param stack Actual stack + * @param addr Actual address + * @param output Output of the method before raising the exception + */ + public UnknownJumpException(Stack stack, long addr, List output) { + this.stack = stack; + this.addr = addr; + this.output = output; + } + + /** + * Returns a string representation of the object + * + * @return a string representation of the object. + */ + @Override + public String toString() { + return "Unknown jump to " + addr; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java similarity index 96% rename from src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java index 43f6116fe..41be66746 100644 --- a/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscator.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.deobfuscation; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java similarity index 91% rename from src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java index 1c1677652..15bf93156 100644 --- a/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/ActionDeobfuscatorSimple.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.deobfuscation; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java index 453c9093f..bd32022d2 100644 --- a/src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/deobfuscation/FixItemCounterTranslateStack.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.deobfuscation; import com.jpexs.decompiler.graph.GraphTargetItem; diff --git a/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java index a8aef49b2..9dc118666 100644 --- a/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.flashlite; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java similarity index 72% rename from src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java index 8e141a107..28a613d20 100644 --- a/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionStrictMode.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.flashlite; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/model/ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/ActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java index 60cfe1570..2e951bdef 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java @@ -1,90 +1,89 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionPop; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -public abstract class ActionItem extends GraphTargetItem implements Serializable { - - public ActionItem() { - super(null, NOPRECEDENCE); - } - - public ActionItem(GraphSourceItem instruction, int precedence) { - super(instruction, precedence); - } - - protected boolean isEmptyString(GraphTargetItem target) { - if (target instanceof DirectValueActionItem) { - if (((DirectValueActionItem) target).value instanceof String) { - - if (((DirectValueActionItem) target).value.equals("")) { - return true; - } - } - } - return false; - } - - protected GraphTextWriter stripQuotes(GraphTargetItem target, LocalData localData, GraphTextWriter writer) throws InterruptedException { - if (target instanceof DirectValueActionItem) { - if (((DirectValueActionItem) target).value instanceof String) { - return writer.append((String) ((DirectValueActionItem) target).value); - } - } - if (target == null) { - return writer; - } else { - return target.toString(writer, localData); - } - } - - protected List toSourceCall(SourceGeneratorLocalData localData, SourceGenerator gen, List list) throws CompilationException { - List ret = new ArrayList<>(); - for (int i = 0; i < list.size(); i++) { - ret.addAll(0, list.get(i).toSource(localData, gen)); - } - ret.add(new ActionPush((Long) (long) list.size())); - return ret; - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = toSource(localData, generator); - if (hasReturnValue()) { - ret.add(new ActionPop()); - } - return ret; - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public abstract class ActionItem extends GraphTargetItem implements Serializable { + + public ActionItem() { + super(null, NOPRECEDENCE); + } + + public ActionItem(GraphSourceItem instruction, int precedence) { + super(instruction, precedence); + } + + protected boolean isEmptyString(GraphTargetItem target) { + if (target instanceof DirectValueActionItem) { + if (((DirectValueActionItem) target).value instanceof String) { + + if (((DirectValueActionItem) target).value.equals("")) { + return true; + } + } + } + return false; + } + + protected GraphTextWriter stripQuotes(GraphTargetItem target, LocalData localData, GraphTextWriter writer) throws InterruptedException { + if (target instanceof DirectValueActionItem) { + if (((DirectValueActionItem) target).value instanceof String) { + return writer.append((String) ((DirectValueActionItem) target).value); + } + } + if (target == null) { + return writer; + } else { + return target.toString(writer, localData); + } + } + + protected List toSourceCall(SourceGeneratorLocalData localData, SourceGenerator gen, List list) throws CompilationException { + List ret = new ArrayList<>(); + for (int i = 0; i < list.size(); i++) { + ret.addAll(0, list.get(i).toSource(localData, gen)); + } + ret.add(new ActionPush((Long) (long) list.size())); + return ret; + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = toSource(localData, generator); + if (hasReturnValue()) { + ret.add(new ActionPop()); + } + return ret; + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java index 9db494f61..1d4267810 100644 --- a/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionAsciiToChar; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class AsciiToCharActionItem extends ActionItem { - - public AsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("chr"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionAsciiToChar()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionAsciiToChar; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class AsciiToCharActionItem extends ActionItem { + + public AsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("chr"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionAsciiToChar()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/CallActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java index 4d465638a..6a126edc8 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionCall; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class CallActionItem extends ActionItem { - - public CallActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("call"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - stripQuotes(value, localData, writer); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionCall()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionCall; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class CallActionItem extends ActionItem { + + public CallActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("call"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + stripQuotes(value, localData, writer); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionCall()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java index 95c568925..0df52634b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java @@ -1,128 +1,127 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionCallFunction; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class CallFunctionActionItem extends ActionItem { - - public GraphTargetItem functionName; - public List arguments; - public GraphTargetItem calculatedFunction; - - @Override - public List getAllSubItems() { - return arguments; - } - - public CallFunctionActionItem(GraphSourceItem instruction, GraphTargetItem functionName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.functionName = functionName; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - String paramStr = ""; - stripQuotes(functionName, localData, writer); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int t = 0; t < arguments.size(); t++) { - if (t > 0) { - writer.append(","); - } - arguments.get(t).toStringNL(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(functionName.getNeededSources()); - for (GraphTargetItem ti : arguments) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (calculatedFunction == null) { - return false; - } - if (dependencies.contains(calculatedFunction)) { - return false; - } - dependencies.add(calculatedFunction); - return calculatedFunction.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - if (calculatedFunction == null) { - return null; - } - return calculatedFunction.getResult(); - } - - @Override - public int hashCode() { - int hash = 3; - hash = 37 * hash + (this.functionName != null ? this.functionName.hashCode() : 0); - hash = 37 * hash + (this.arguments != null ? this.arguments.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final CallFunctionActionItem other = (CallFunctionActionItem) obj; - if (this.functionName != other.functionName && (this.functionName == null || !this.functionName.equals(other.functionName))) { - return false; - } - if (this.arguments != other.arguments && (this.arguments == null || !this.arguments.equals(other.arguments))) { - return false; - } - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), functionName, new ActionCallFunction()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionCallFunction; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class CallFunctionActionItem extends ActionItem { + + public GraphTargetItem functionName; + public List arguments; + public GraphTargetItem calculatedFunction; + + @Override + public List getAllSubItems() { + return arguments; + } + + public CallFunctionActionItem(GraphSourceItem instruction, GraphTargetItem functionName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.functionName = functionName; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + String paramStr = ""; + stripQuotes(functionName, localData, writer); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int t = 0; t < arguments.size(); t++) { + if (t > 0) { + writer.append(","); + } + arguments.get(t).toStringNL(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(functionName.getNeededSources()); + for (GraphTargetItem ti : arguments) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (calculatedFunction == null) { + return false; + } + if (dependencies.contains(calculatedFunction)) { + return false; + } + dependencies.add(calculatedFunction); + return calculatedFunction.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + if (calculatedFunction == null) { + return null; + } + return calculatedFunction.getResult(); + } + + @Override + public int hashCode() { + int hash = 3; + hash = 37 * hash + (this.functionName != null ? this.functionName.hashCode() : 0); + hash = 37 * hash + (this.arguments != null ? this.arguments.hashCode() : 0); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallFunctionActionItem other = (CallFunctionActionItem) obj; + if (this.functionName != other.functionName && (this.functionName == null || !this.functionName.equals(other.functionName))) { + return false; + } + if (this.arguments != other.arguments && (this.arguments == null || !this.arguments.equals(other.arguments))) { + return false; + } + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), functionName, new ActionCallFunction()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java similarity index 81% rename from src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java index 33beb444f..4bd851d6f 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java @@ -1,112 +1,111 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionCallMethod; -import com.jpexs.decompiler.flash.ecma.Undefined; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class CallMethodActionItem extends ActionItem { - - public GraphTargetItem methodName; - public GraphTargetItem scriptObject; - public List arguments; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.addAll(arguments); - ret.add(scriptObject); - return ret; - } - - public CallMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.methodName = methodName; - this.arguments = arguments; - this.scriptObject = scriptObject; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - boolean blankMethod = false; - if (methodName instanceof DirectValueActionItem) { - if (((DirectValueActionItem) methodName).value instanceof Undefined) { - blankMethod = true; - } - if (((DirectValueActionItem) methodName).value instanceof String) { - if (((DirectValueActionItem) methodName).value.equals("")) { - blankMethod = true; - } - } - } - if (!blankMethod) { - if (scriptObject.getPrecedence() > this.precedence) { - writer.append("("); - scriptObject.toString(writer, localData); - writer.append(")"); - } else { - scriptObject.toString(writer, localData); - } - writer.append("."); - stripQuotes(methodName, localData, writer); - } else { - scriptObject.toString(writer, localData); - } - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - - for (int t = 0; t < arguments.size(); t++) { - if (t > 0) { - writer.append(","); - } - arguments.get(t).toStringNL(writer, localData); - } - - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(methodName.getNeededSources()); - ret.addAll(scriptObject.getNeededSources()); - for (GraphTargetItem ti : arguments) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), scriptObject, methodName, new ActionCallMethod()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionCallMethod; +import com.jpexs.decompiler.flash.ecma.Undefined; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class CallMethodActionItem extends ActionItem { + + public GraphTargetItem methodName; + public GraphTargetItem scriptObject; + public List arguments; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.addAll(arguments); + ret.add(scriptObject); + return ret; + } + + public CallMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.methodName = methodName; + this.arguments = arguments; + this.scriptObject = scriptObject; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + boolean blankMethod = false; + if (methodName instanceof DirectValueActionItem) { + if (((DirectValueActionItem) methodName).value instanceof Undefined) { + blankMethod = true; + } + if (((DirectValueActionItem) methodName).value instanceof String) { + if (((DirectValueActionItem) methodName).value.equals("")) { + blankMethod = true; + } + } + } + if (!blankMethod) { + if (scriptObject.getPrecedence() > this.precedence) { + writer.append("("); + scriptObject.toString(writer, localData); + writer.append(")"); + } else { + scriptObject.toString(writer, localData); + } + writer.append("."); + stripQuotes(methodName, localData, writer); + } else { + scriptObject.toString(writer, localData); + } + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + + for (int t = 0; t < arguments.size(); t++) { + if (t > 0) { + writer.append(","); + } + arguments.get(t).toStringNL(writer, localData); + } + + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(methodName.getNeededSources()); + ret.addAll(scriptObject.getNeededSources()); + for (GraphTargetItem ti : arguments) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), scriptObject, methodName, new ActionCallMethod()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java similarity index 72% rename from src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java index b5ca4c325..0c0377bfb 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java @@ -1,75 +1,74 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf7.ActionCastOp; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class CastOpActionItem extends ActionItem { - - public GraphTargetItem constructor; - public GraphTargetItem object; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(constructor); - ret.add(object); - return ret; - } - - public CastOpActionItem(GraphSourceItem instruction, GraphTargetItem constructor, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); - this.constructor = constructor; - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("("); - stripQuotes(constructor, localData, writer); - writer.append(")"); - return object.toString(writer, localData); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(constructor.getNeededSources()); - ret.addAll(object.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, constructor, object, new ActionCastOp()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf7.ActionCastOp; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class CastOpActionItem extends ActionItem { + + public GraphTargetItem constructor; + public GraphTargetItem object; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(constructor); + ret.add(object); + return ret; + } + + public CastOpActionItem(GraphSourceItem instruction, GraphTargetItem constructor, GraphTargetItem object) { + super(instruction, PRECEDENCE_PRIMARY); + this.constructor = constructor; + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("("); + stripQuotes(constructor, localData, writer); + writer.append(")"); + return object.toString(writer, localData); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(constructor.getNeededSources()); + ret.addAll(object.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, constructor, object, new ActionCastOp()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java index 8530acf25..e7748ecd8 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java @@ -1,88 +1,87 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionCharToAscii; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class CharToAsciiActionItem extends ActionItem { - - public CharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("ord"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (value instanceof DirectValueActionItem) { - DirectValueActionItem dv = (DirectValueActionItem) value; - if (dv.value instanceof String) { - String s = (String) dv.value; - if (s.length() > 0) { - return true; - } - } - } - return false; - } - - @Override - public Object getResult() { - Object res = value.getResult(); - String s = res.toString(); - if (s.length() > 0) { - char c = s.charAt(0); - return (int) c; - } - return 0; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionCharToAscii()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionCharToAscii; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class CharToAsciiActionItem extends ActionItem { + + public CharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("ord"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (value instanceof DirectValueActionItem) { + DirectValueActionItem dv = (DirectValueActionItem) value; + if (dv.value instanceof String) { + String s = (String) dv.value; + if (s.length() > 0) { + return true; + } + } + } + return false; + } + + @Override + public Object getResult() { + Object res = value.getResult(); + String s = res.toString(); + if (s.length() > 0) { + char c = s.charAt(0); + return (int) c; + } + return 0; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionCharToAscii()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java index 491021f8f..c9adf63b7 100644 --- a/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java @@ -1,84 +1,83 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionCloneSprite; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class CloneSpriteActionItem extends ActionItem { - - public GraphTargetItem source; - public GraphTargetItem target; - public GraphTargetItem depth; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(target); - ret.add(source); - ret.add(depth); - return ret; - } - - public CloneSpriteActionItem(GraphSourceItem instruction, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) { - super(instruction, PRECEDENCE_PRIMARY); - this.source = source; - this.target = target; - this.depth = depth; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("duplicateMovieClip"); - writer.spaceBeforeCallParenthesies(3); - writer.append("("); - target.toString(writer, localData); - writer.append(","); - source.toString(writer, localData); - writer.append(","); - depth.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(source.getNeededSources()); - ret.addAll(target.getNeededSources()); - ret.addAll(depth.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, source, target, depth, new ActionCloneSprite()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionCloneSprite; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class CloneSpriteActionItem extends ActionItem { + + public GraphTargetItem source; + public GraphTargetItem target; + public GraphTargetItem depth; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(target); + ret.add(source); + ret.add(depth); + return ret; + } + + public CloneSpriteActionItem(GraphSourceItem instruction, GraphTargetItem source, GraphTargetItem target, GraphTargetItem depth) { + super(instruction, PRECEDENCE_PRIMARY); + this.source = source; + this.target = target; + this.depth = depth; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("duplicateMovieClip"); + writer.spaceBeforeCallParenthesies(3); + writer.append("("); + target.toString(writer, localData); + writer.append(","); + source.toString(writer, localData); + writer.append(","); + depth.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(source.getNeededSources()); + ret.addAll(target.getNeededSources()); + ret.addAll(depth.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, source, target, depth, new ActionCloneSprite()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java new file mode 100644 index 000000000..904c8b5b6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import java.util.ArrayList; +import java.util.List; + +public class ConstantPool { + + public List constants = new ArrayList<>(); + + public ConstantPool() { + } + + public ConstantPool(List constants) { + this.constants = constants; + } + + public void setNew(List constants) { + this.constants = constants; + } + + @Override + public String toString() { + return "x " + constants.toString(); + } + + public boolean isEmpty() { + return constants.isEmpty(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java index 82814ebda..cbf30de9a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java @@ -1,85 +1,84 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -public class DecrementActionItem extends ActionItem { - - public GraphTargetItem object; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - return ret; - } - - public DecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append(" - 1"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(object)) { - return false; - } - dependencies.add(object); - return object.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(object.getResult()) - 1; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(object.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object, new ActionDecrement()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class DecrementActionItem extends ActionItem { + + public GraphTargetItem object; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + return ret; + } + + public DecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_ADDITIVE); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append(" - 1"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(object)) { + return false; + } + dependencies.add(object); + return object.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(object.getResult()) - 1; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(object.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object, new ActionDecrement()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java index 7afba6fb0..11bdb7a13 100644 --- a/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java similarity index 50% rename from src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java index 8b4bb343a..e3825845f 100644 --- a/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java @@ -1,46 +1,45 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class DefineRegisterActionItem extends ActionItem { - - private final String identifier; - private final int register; - - public DefineRegisterActionItem(String identifier, int register) { - super(null, PRECEDENCE_PRIMARY); - this.identifier = identifier; - this.register = register; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("var " + identifier); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class DefineRegisterActionItem extends ActionItem { + + private final String identifier; + private final int register; + + public DefineRegisterActionItem(String identifier, int register) { + super(null, PRECEDENCE_PRIMARY); + this.identifier = identifier; + this.register = register; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("var " + identifier); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java index 5601fb833..d1d389134 100644 --- a/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java @@ -1,82 +1,81 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionDelete; -import com.jpexs.decompiler.flash.action.swf5.ActionDelete2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class DeleteActionItem extends ActionItem { - - public GraphTargetItem object; - public GraphTargetItem propertyName; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - ret.add(propertyName); - return ret; - } - - public DeleteActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem propertyName) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - this.propertyName = propertyName; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("delete "); - if (object == null) { - return propertyName.toStringNoQuotes(writer, localData); - } - object.toStringNoQuotes(writer, localData); - writer.append("."); - return propertyName.toStringNoQuotes(writer, localData); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(object.getNeededSources()); - ret.addAll(propertyName.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (object == null) { - return toSourceMerge(localData, generator, propertyName, new ActionDelete2()); - } - return toSourceMerge(localData, generator, object, propertyName, new ActionDelete()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class DeleteActionItem extends ActionItem { + + public GraphTargetItem object; + public GraphTargetItem propertyName; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + ret.add(propertyName); + return ret; + } + + public DeleteActionItem(GraphSourceItem instruction, GraphTargetItem object, GraphTargetItem propertyName) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + this.propertyName = propertyName; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("delete "); + if (object == null) { + return propertyName.toStringNoQuotes(writer, localData); + } + object.toStringNoQuotes(writer, localData); + writer.append("."); + return propertyName.toStringNoQuotes(writer, localData); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(object.getNeededSources()); + ret.addAll(propertyName.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (object == null) { + return toSourceMerge(localData, generator, propertyName, new ActionDelete2()); + } + return toSourceMerge(localData, generator, object, propertyName, new ActionDelete()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java similarity index 91% rename from src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java index 596565410..1fca7a755 100644 --- a/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java index 8214d459e..5e72fa317 100644 --- a/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class EnumerateActionItem extends ActionItem { - - public GraphTargetItem object; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - return ret; - } - - public EnumerateActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("enumerate "); - return object.toString(writer, localData); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(object.getNeededSources()); - return ret; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class EnumerateActionItem extends ActionItem { + + public GraphTargetItem object; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + return ret; + } + + public EnumerateActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_PRIMARY); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("enumerate "); + return object.toString(writer, localData); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(object.getNeededSources()); + return ret; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java index d214d6525..4f515f330 100644 --- a/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class EvalActionItem extends ActionItem { - - public EvalActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("eval"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionGetVariable()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class EvalActionItem extends ActionItem { + + public EvalActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("eval"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionGetVariable()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java index 352a3f8e5..5b781a85b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ExtendsActionItem extends ActionItem { - - public GraphTargetItem subclass; - public GraphTargetItem superclass; - - public ExtendsActionItem(GraphSourceItem instruction, GraphTargetItem subclass, GraphTargetItem superclass) { - super(instruction, PRECEDENCE_PRIMARY); - this.subclass = subclass; - this.superclass = superclass; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - subclass.toString(writer, localData); - writer.append(" extends "); - return stripQuotes(superclass, localData, writer); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(subclass.getNeededSources()); - ret.addAll(superclass.getNeededSources()); - return ret; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ExtendsActionItem extends ActionItem { + + public GraphTargetItem subclass; + public GraphTargetItem superclass; + + public ExtendsActionItem(GraphSourceItem instruction, GraphTargetItem subclass, GraphTargetItem superclass) { + super(instruction, PRECEDENCE_PRIMARY); + this.subclass = subclass; + this.superclass = superclass; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + subclass.toString(writer, localData); + writer.append(" extends "); + return stripQuotes(superclass, localData, writer); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(subclass.getNeededSources()); + ret.addAll(superclass.getNeededSources()); + return ret; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java index 4a3bbba58..37c54480d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java @@ -1,91 +1,90 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.flashlite.ActionFSCommand2; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class FSCommand2ActionItem extends ActionItem { - - public String target; - public List arguments; - public GraphTargetItem command; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.addAll(arguments); - ret.add(command); - return ret; - } - - public FSCommand2ActionItem(GraphSourceItem instruction, GraphTargetItem command, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.command = command; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("FSCommand2"); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - command.toString(writer, localData); - for (int t = 0; t < arguments.size(); t++) { - writer.append(","); - arguments.get(t).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(command.getNeededSources()); - for (GraphTargetItem ti : arguments) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - for (GraphTargetItem a : arguments) { - ret.addAll(a.toSource(localData, generator)); - } - ret.addAll(command.toSource(localData, generator)); - ret.add(new ActionPush((Long) (long) arguments.size())); - ret.add(new ActionFSCommand2()); - return ret; - } - - @Override - public boolean hasReturnValue() { - return true; //FIXME ? - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.flashlite.ActionFSCommand2; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class FSCommand2ActionItem extends ActionItem { + + public String target; + public List arguments; + public GraphTargetItem command; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.addAll(arguments); + ret.add(command); + return ret; + } + + public FSCommand2ActionItem(GraphSourceItem instruction, GraphTargetItem command, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.command = command; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("FSCommand2"); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + command.toString(writer, localData); + for (int t = 0; t < arguments.size(); t++) { + writer.append(","); + arguments.get(t).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(command.getNeededSources()); + for (GraphTargetItem ti : arguments) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + for (GraphTargetItem a : arguments) { + ret.addAll(a.toSource(localData, generator)); + } + ret.addAll(command.toSource(localData, generator)); + ret.add(new ActionPush((Long) (long) arguments.size())); + ret.add(new ActionFSCommand2()); + return ret; + } + + @Override + public boolean hasReturnValue() { + return true; //FIXME ? + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java index 3bab33786..72135e462 100644 --- a/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java similarity index 93% rename from src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java index 40e9e6d90..3511e3aff 100644 --- a/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java index 121eed3e3..998e10ca0 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java index d30d8f0ab..7a26e1f9e 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.swf4.ActionGetProperty; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class GetPropertyActionItem extends ActionItem { - - public GraphTargetItem target; - public int propertyIndex; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(target); - return ret; - } - - public GetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - this.propertyIndex = propertyIndex; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (isEmptyString(target)) { - return writer.append(Action.propertyNames[propertyIndex]); - } - target.toString(writer, localData); - return writer.append("." + Action.propertyNames[propertyIndex]); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(target.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), new ActionGetProperty()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.swf4.ActionGetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class GetPropertyActionItem extends ActionItem { + + public GraphTargetItem target; + public int propertyIndex; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(target); + return ret; + } + + public GetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + this.propertyIndex = propertyIndex; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (isEmptyString(target)) { + return writer.append(Action.propertyNames[propertyIndex]); + } + target.toString(writer, localData); + return writer.append("." + Action.propertyNames[propertyIndex]); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(target.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), new ActionGetProperty()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java similarity index 66% rename from src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java index ed6c3736d..786f4b3db 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetTime; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Random; -import java.util.Set; - -public class GetTimeActionItem extends ActionItem { - - public GetTimeActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("getTimer"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public Object getResult() { - return (Double) (double) new Random().nextInt(10000) + 1000; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionGetTime()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetTime; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Random; +import java.util.Set; + +public class GetTimeActionItem extends ActionItem { + + public GetTimeActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("getTimer"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public Object getResult() { + return (Double) (double) new Random().nextInt(10000) + 1000; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionGetTime()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java similarity index 76% rename from src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java index 85b1f5025..449cf0f2a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java @@ -1,88 +1,87 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class GetURL2ActionItem extends ActionItem { - - public GraphTargetItem urlString; - public GraphTargetItem targetString; - public int sendVarsMethod; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(urlString); - ret.add(targetString); - return ret; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - String methodStr = ""; - if (sendVarsMethod == 1) { - methodStr = ",\"GET\""; - } - if (sendVarsMethod == 2) { - methodStr = ",\"POST\""; - } - - writer.append("getURL"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - urlString.toString(writer, localData); - writer.append(","); - targetString.toString(writer, localData); - return writer.append(methodStr + ")"); - } - - public GetURL2ActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); - this.urlString = urlString; - this.targetString = targetString; - this.sendVarsMethod = method; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(urlString.getNeededSources()); - ret.addAll(targetString.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(sendVarsMethod, false, false)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class GetURL2ActionItem extends ActionItem { + + public GraphTargetItem urlString; + public GraphTargetItem targetString; + public int sendVarsMethod; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(urlString); + ret.add(targetString); + return ret; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + String methodStr = ""; + if (sendVarsMethod == 1) { + methodStr = ",\"GET\""; + } + if (sendVarsMethod == 2) { + methodStr = ",\"POST\""; + } + + writer.append("getURL"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + urlString.toString(writer, localData); + writer.append(","); + targetString.toString(writer, localData); + return writer.append(methodStr + ")"); + } + + public GetURL2ActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, PRECEDENCE_PRIMARY); + this.urlString = urlString; + this.targetString = targetString; + this.sendVarsMethod = method; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(urlString.getNeededSources()); + ret.addAll(targetString.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(sendVarsMethod, false, false)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java similarity index 67% rename from src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java index 0d667109b..e4d77ed8d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionGetURL; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.helpers.Helper; -import java.util.List; - -public class GetURLActionItem extends ActionItem { - - public String urlString; - public String targetString; - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("getUrl"); - writer.spaceBeforeCallParenthesies(2); - writer.append("(\""); - writer.append(Helper.escapeString(urlString) + "\", \"" + Helper.escapeString(targetString)); - return writer.append("\")"); - } - - public GetURLActionItem(GraphSourceItem instruction, String urlString, String targetString) { - super(instruction, PRECEDENCE_PRIMARY); - this.urlString = urlString; - this.targetString = targetString; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionGetURL(urlString, targetString)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionGetURL; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.Helper; +import java.util.List; + +public class GetURLActionItem extends ActionItem { + + public String urlString; + public String targetString; + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("getUrl"); + writer.spaceBeforeCallParenthesies(2); + writer.append("(\""); + writer.append(Helper.escapeString(urlString) + "\", \"" + Helper.escapeString(targetString)); + return writer.append("\")"); + } + + public GetURLActionItem(GraphSourceItem instruction, String urlString, String targetString) { + super(instruction, PRECEDENCE_PRIMARY); + this.urlString = urlString; + this.targetString = targetString; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionGetURL(urlString, targetString)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java similarity index 86% rename from src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java index 0c0fd0367..52aceb4e3 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java index 57169ae63..e6a66eed9 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class GetVersionActionItem extends ActionItem { - - public GetVersionActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("getVersion"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionPush("/:$version"), new ActionGetVariable()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class GetVersionActionItem extends ActionItem { + + public GetVersionActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("getVersion"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionPush("/:$version"), new ActionGetVariable()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java index f49daa243..f231b56ef 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java index d0b4520cd..a7625934c 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionGotoFrame; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class GotoFrameActionItem extends ActionItem { - - public int frame; - - public GotoFrameActionItem(GraphSourceItem instruction, int frame) { - super(instruction, PRECEDENCE_PRIMARY); - this.frame = frame; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("gotoAndStop"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - writer.append("" + (frame + 1)); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionGotoFrame(frame)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionGotoFrame; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class GotoFrameActionItem extends ActionItem { + + public int frame; + + public GotoFrameActionItem(GraphSourceItem instruction, int frame) { + super(instruction, PRECEDENCE_PRIMARY); + this.frame = frame; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("gotoAndStop"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + writer.append("" + (frame + 1)); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionGotoFrame(frame)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java index 06ae1cb71..5d2ac62e7 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionGoToLabel; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.helpers.Helper; -import java.util.List; - -public class GotoLabelActionItem extends ActionItem { - - public String label; - - public GotoLabelActionItem(GraphSourceItem instruction, String label) { - super(instruction, PRECEDENCE_PRIMARY); - this.label = label; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("gotoAndStop"); - writer.spaceBeforeCallParenthesies(1); - writer.append("(\""); - writer.append(Helper.escapeString(label)); - return writer.append("\")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionGoToLabel(label)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionGoToLabel; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.Helper; +import java.util.List; + +public class GotoLabelActionItem extends ActionItem { + + public String label; + + public GotoLabelActionItem(GraphSourceItem instruction, String label) { + super(instruction, PRECEDENCE_PRIMARY); + this.label = label; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("gotoAndStop"); + writer.spaceBeforeCallParenthesies(1); + writer.append("(\""); + writer.append(Helper.escapeString(label)); + return writer.append("\")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionGoToLabel(label)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java index 100c3e30b..b21456de7 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ImplementsOpActionItem extends ActionItem { - - public GraphTargetItem subclass; - public List superclasses; - - public ImplementsOpActionItem(GraphSourceItem instruction, GraphTargetItem subclass, List superclasses) { - super(instruction, PRECEDENCE_PRIMARY); - this.subclass = subclass; - this.superclasses = superclasses; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - subclass.toString(writer, localData); - writer.append(" implements "); - for (int i = 0; i < superclasses.size(); i++) { - if (i > 0) { - writer.append(","); - } - superclasses.get(i).toString(writer, localData); - } - return writer; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(subclass.getNeededSources()); - for (GraphTargetItem ti : superclasses) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ImplementsOpActionItem extends ActionItem { + + public GraphTargetItem subclass; + public List superclasses; + + public ImplementsOpActionItem(GraphSourceItem instruction, GraphTargetItem subclass, List superclasses) { + super(instruction, PRECEDENCE_PRIMARY); + this.subclass = subclass; + this.superclasses = superclasses; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + subclass.toString(writer, localData); + writer.append(" implements "); + for (int i = 0; i < superclasses.size(); i++) { + if (i > 0) { + writer.append(","); + } + superclasses.get(i).toString(writer, localData); + } + return writer; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(subclass.getNeededSources()); + for (GraphTargetItem ti : superclasses) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java index 45427a260..ebed33a8b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java @@ -1,85 +1,84 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -public class IncrementActionItem extends ActionItem { - - public GraphTargetItem object; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - return ret; - } - - public IncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_ADDITIVE); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append(" + 1"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(object)) { - return false; - } - dependencies.add(object); - return object.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(object.getResult()) + 1; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(object.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object, new ActionIncrement()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class IncrementActionItem extends ActionItem { + + public GraphTargetItem object; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + return ret; + } + + public IncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_ADDITIVE); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append(" + 1"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(object)) { + return false; + } + dependencies.add(object); + return object.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(object.getResult()) + 1; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(object.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object, new ActionIncrement()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java similarity index 73% rename from src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java index da85dbd04..70816d7ff 100644 --- a/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionInitArray; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class InitArrayActionItem extends ActionItem { - - public List values; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.addAll(values); - return ret; - } - - public InitArrayActionItem(GraphSourceItem instruction, List values) { - super(instruction, PRECEDENCE_PRIMARY); - this.values = values; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("["); - for (int i = 0; i < values.size(); i++) { - if (i > 0) { - writer.append(","); - } - values.get(i).toString(writer, localData); - } - return writer.append("]"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - for (GraphTargetItem value : values) { - ret.addAll(value.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, toSourceCall(localData, generator, values), new ActionInitArray()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionInitArray; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class InitArrayActionItem extends ActionItem { + + public List values; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.addAll(values); + return ret; + } + + public InitArrayActionItem(GraphSourceItem instruction, List values) { + super(instruction, PRECEDENCE_PRIMARY); + this.values = values; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("["); + for (int i = 0; i < values.size(); i++) { + if (i > 0) { + writer.append(","); + } + values.get(i).toString(writer, localData); + } + return writer.append("]"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + for (GraphTargetItem value : values) { + ret.addAll(value.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, toSourceCall(localData, generator, values), new ActionInitArray()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java similarity index 79% rename from src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java index 7d8680d31..507eb1feb 100644 --- a/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java @@ -1,100 +1,99 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf5.ActionInitObject; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.TernarOpItem; -import java.util.ArrayList; -import java.util.List; - -public class InitObjectActionItem extends ActionItem { - - public List names; - public List values; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.addAll(names); - ret.addAll(values); - return ret; - } - - public InitObjectActionItem(GraphSourceItem instruction, List names, List values) { - super(instruction, PRECEDENCE_PRIMARY); - this.values = values; - this.names = names; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("{"); - for (int i = values.size() - 1; i >= 0; i--) { - if (i < values.size() - 1) { - writer.append(","); - } - names.get(i).toStringNoQuotes(writer, localData); //AS1/2 do not allow quotes in name here - writer.append(":"); - if (values.get(i) instanceof TernarOpItem) { //Ternar operator contains ":" - writer.append("("); - values.get(i).toString(writer, localData); - writer.append(")"); - } else { - values.get(i).toString(writer, localData); - } - } - return writer.append("}"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - for (GraphTargetItem name : names) { - ret.addAll(name.getNeededSources()); - } - for (GraphTargetItem value : values) { - ret.addAll(value.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - for (int i = values.size() - 1; i >= 0; i--) { - ret.addAll(names.get(i).toSource(localData, generator)); - ret.addAll(values.get(i).toSource(localData, generator)); - } - ret.add(new ActionPush((Long) (long) values.size())); - ret.add(new ActionInitObject()); - return ret; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf5.ActionInitObject; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.TernarOpItem; +import java.util.ArrayList; +import java.util.List; + +public class InitObjectActionItem extends ActionItem { + + public List names; + public List values; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.addAll(names); + ret.addAll(values); + return ret; + } + + public InitObjectActionItem(GraphSourceItem instruction, List names, List values) { + super(instruction, PRECEDENCE_PRIMARY); + this.values = values; + this.names = names; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("{"); + for (int i = values.size() - 1; i >= 0; i--) { + if (i < values.size() - 1) { + writer.append(","); + } + names.get(i).toStringNoQuotes(writer, localData); //AS1/2 do not allow quotes in name here + writer.append(":"); + if (values.get(i) instanceof TernarOpItem) { //Ternar operator contains ":" + writer.append("("); + values.get(i).toString(writer, localData); + writer.append(")"); + } else { + values.get(i).toString(writer, localData); + } + } + return writer.append("}"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + for (GraphTargetItem name : names) { + ret.addAll(name.getNeededSources()); + } + for (GraphTargetItem value : values) { + ret.addAll(value.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + for (int i = values.size() - 1; i >= 0; i--) { + ret.addAll(names.get(i).toSource(localData, generator)); + ret.addAll(values.get(i).toSource(localData, generator)); + } + ret.add(new ActionPush((Long) (long) values.size())); + ret.add(new ActionInitObject()); + return ret; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java index bf74bdbd8..4eb016dbf 100644 --- a/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java @@ -1,82 +1,81 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class LoadMovieActionItem extends ActionItem { - - private final GraphTargetItem urlString; - private final GraphTargetItem targetString; - private final int method; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(urlString); - ret.add(targetString); - return ret; - } - - public LoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); - this.urlString = urlString; - this.targetString = targetString; - this.method = method; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - String methodStr = ""; - if (method == 1) { - methodStr = ",\"GET\""; - } - if (method == 2) { - methodStr = ",\"POST\""; - } - writer.append("loadMovie"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - urlString.toString(writer, localData); - writer.append(","); - targetString.toString(writer, localData); - return writer.append(methodStr + ")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, false, true)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class LoadMovieActionItem extends ActionItem { + + private final GraphTargetItem urlString; + private final GraphTargetItem targetString; + private final int method; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(urlString); + ret.add(targetString); + return ret; + } + + public LoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, PRECEDENCE_PRIMARY); + this.urlString = urlString; + this.targetString = targetString; + this.method = method; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + String methodStr = ""; + if (method == 1) { + methodStr = ",\"GET\""; + } + if (method == 2) { + methodStr = ",\"POST\""; + } + writer.append("loadMovie"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + urlString.toString(writer, localData); + writer.append(","); + targetString.toString(writer, localData); + return writer.append(methodStr + ")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, false, true)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java similarity index 79% rename from src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java index 4844a1b4a..3d7e6bee6 100644 --- a/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java index faaf44406..f0206bf88 100644 --- a/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java @@ -1,82 +1,81 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class LoadVariablesActionItem extends ActionItem { - - private final GraphTargetItem urlString; - private final GraphTargetItem targetString; - private final int method; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(urlString); - ret.add(targetString); - return ret; - } - - public LoadVariablesActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { - super(instruction, PRECEDENCE_PRIMARY); - this.urlString = urlString; - this.targetString = targetString; - this.method = method; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - String methodStr = ""; - if (method == 1) { - methodStr = ",\"GET\""; - } - if (method == 2) { - methodStr = ",\"POST\""; - } - writer.append("loadVariables"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - urlString.toString(writer, localData); - writer.append(","); - targetString.toString(writer, localData); - return writer.append(methodStr + ")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, true, true)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class LoadVariablesActionItem extends ActionItem { + + private final GraphTargetItem urlString; + private final GraphTargetItem targetString; + private final int method; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(urlString); + ret.add(targetString); + return ret; + } + + public LoadVariablesActionItem(GraphSourceItem instruction, GraphTargetItem urlString, GraphTargetItem targetString, int method) { + super(instruction, PRECEDENCE_PRIMARY); + this.urlString = urlString; + this.targetString = targetString; + this.method = method; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + String methodStr = ""; + if (method == 1) { + methodStr = ",\"GET\""; + } + if (method == 2) { + methodStr = ",\"POST\""; + } + writer.append("loadVariables"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + urlString.toString(writer, localData); + writer.append(","); + targetString.toString(writer, localData); + return writer.append(methodStr + ")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, true, true)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java index 4d4db99bc..55865db06 100644 --- a/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java index 15cfa87da..03dcd0baa 100644 --- a/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionMBAsciiToChar; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class MBAsciiToCharActionItem extends ActionItem { - - public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("mbchr"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionMBAsciiToChar()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionMBAsciiToChar; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class MBAsciiToCharActionItem extends ActionItem { + + public MBAsciiToCharActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("mbchr"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionMBAsciiToChar()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java index 95375b6c8..2a1494d02 100644 --- a/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionMBCharToAscii; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class MBCharToAsciiActionItem extends ActionItem { - - public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("mbord"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionMBCharToAscii()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionMBCharToAscii; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class MBCharToAsciiActionItem extends ActionItem { + + public MBCharToAsciiActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("mbord"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionMBCharToAscii()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java index 0565c96b9..54bc305d4 100644 --- a/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java @@ -1,84 +1,83 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionMBStringExtract; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class MBStringExtractActionItem extends ActionItem { - - //public GraphTargetItem value; - public GraphTargetItem index; - public GraphTargetItem count; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(value); - ret.add(index); - ret.add(count); - return ret; - } - - public MBStringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - this.index = index; - this.count = count; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("mbsubstring"); - writer.spaceBeforeCallParenthesies(3); - writer.append("("); - value.toString(writer, localData); - writer.append(","); - index.toString(writer, localData); - writer.append(","); - count.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - ret.addAll(index.getNeededSources()); - ret.addAll(count.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, index, count, new ActionMBStringExtract()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringExtract; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class MBStringExtractActionItem extends ActionItem { + + //public GraphTargetItem value; + public GraphTargetItem index; + public GraphTargetItem count; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(value); + ret.add(index); + ret.add(count); + return ret; + } + + public MBStringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + this.index = index; + this.count = count; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("mbsubstring"); + writer.spaceBeforeCallParenthesies(3); + writer.append("("); + value.toString(writer, localData); + writer.append(","); + index.toString(writer, localData); + writer.append(","); + count.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + ret.addAll(index.getNeededSources()); + ret.addAll(count.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, index, count, new ActionMBStringExtract()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java similarity index 71% rename from src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java index 5d040f91a..3ab945f91 100644 --- a/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java @@ -1,69 +1,68 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionMBStringLength; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class MBStringLengthActionItem extends ActionItem { - - //public GraphTargetItem value; - public MBStringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("mblength"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - if (value.getPrecedence() > precedence) { - writer.append("("); - value.toString(writer, localData); - writer.append(")"); - } else { - value.toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionMBStringLength()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringLength; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class MBStringLengthActionItem extends ActionItem { + + //public GraphTargetItem value; + public MBStringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("mblength"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + if (value.getPrecedence() > precedence) { + writer.append("("); + value.toString(writer, localData); + writer.append(")"); + } else { + value.toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionMBStringLength()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java index 7a7498206..bbbdbd55e 100644 --- a/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java @@ -1,113 +1,112 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionNewMethod; -import com.jpexs.decompiler.flash.ecma.Undefined; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class NewMethodActionItem extends ActionItem { - - public GraphTargetItem methodName; - public GraphTargetItem scriptObject; - public List arguments; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(scriptObject); - ret.addAll(arguments); - return ret; - } - - public NewMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.methodName = methodName; - this.arguments = arguments; - this.scriptObject = scriptObject; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - boolean blankMethod = false; - if (methodName instanceof DirectValueActionItem) { - if (((DirectValueActionItem) methodName).value instanceof Undefined) { - blankMethod = true; - } else if (((DirectValueActionItem) methodName).value instanceof String) { - if (((DirectValueActionItem) methodName).value.equals("")) { - blankMethod = true; - } - } - } - if (!blankMethod) { - writer.append("new "); - } - scriptObject.toString(writer, localData); - if (!blankMethod) { - writer.append("."); - if (methodName instanceof DirectValueActionItem) { - if (((DirectValueActionItem) methodName).value instanceof Undefined) { - } else if (((DirectValueActionItem) methodName).value instanceof String) { - ((DirectValueActionItem) methodName).toStringNoQuotes(writer, localData); - } else { - methodName.toString(writer, localData); - } - } else { - methodName.toString(writer, localData); - } - } - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int t = 0; t < arguments.size(); t++) { - if (t > 0) { - writer.append(","); - } - arguments.get(t).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(methodName.getNeededSources()); - ret.addAll(scriptObject.getNeededSources()); - for (GraphTargetItem ti : arguments) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), scriptObject, methodName, new ActionNewMethod()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionNewMethod; +import com.jpexs.decompiler.flash.ecma.Undefined; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class NewMethodActionItem extends ActionItem { + + public GraphTargetItem methodName; + public GraphTargetItem scriptObject; + public List arguments; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(scriptObject); + ret.addAll(arguments); + return ret; + } + + public NewMethodActionItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.methodName = methodName; + this.arguments = arguments; + this.scriptObject = scriptObject; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + boolean blankMethod = false; + if (methodName instanceof DirectValueActionItem) { + if (((DirectValueActionItem) methodName).value instanceof Undefined) { + blankMethod = true; + } else if (((DirectValueActionItem) methodName).value instanceof String) { + if (((DirectValueActionItem) methodName).value.equals("")) { + blankMethod = true; + } + } + } + if (!blankMethod) { + writer.append("new "); + } + scriptObject.toString(writer, localData); + if (!blankMethod) { + writer.append("."); + if (methodName instanceof DirectValueActionItem) { + if (((DirectValueActionItem) methodName).value instanceof Undefined) { + } else if (((DirectValueActionItem) methodName).value instanceof String) { + ((DirectValueActionItem) methodName).toStringNoQuotes(writer, localData); + } else { + methodName.toString(writer, localData); + } + } else { + methodName.toString(writer, localData); + } + } + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int t = 0; t < arguments.size(); t++) { + if (t > 0) { + writer.append(","); + } + arguments.get(t).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(methodName.getNeededSources()); + ret.addAll(scriptObject.getNeededSources()); + for (GraphTargetItem ti : arguments) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), scriptObject, methodName, new ActionNewMethod()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java index f82f6279e..171d4e9bf 100644 --- a/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java @@ -1,84 +1,83 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionNewObject; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class NewObjectActionItem extends ActionItem { - - public GraphTargetItem objectName; - public List arguments; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(objectName); - ret.addAll(arguments); - return ret; - } - - public NewObjectActionItem(GraphSourceItem instruction, GraphTargetItem objectName, List arguments) { - super(instruction, PRECEDENCE_PRIMARY); - this.objectName = objectName; - this.arguments = arguments; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("new "); - stripQuotes(objectName, localData, writer); - writer.spaceBeforeCallParenthesies(arguments.size()); - writer.append("("); - for (int t = 0; t < arguments.size(); t++) { - if (t > 0) { - writer.append(","); - } - arguments.get(t).toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(objectName.getNeededSources()); - for (GraphTargetItem ti : arguments) { - ret.addAll(ti.getNeededSources()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), objectName, new ActionNewObject()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionNewObject; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class NewObjectActionItem extends ActionItem { + + public GraphTargetItem objectName; + public List arguments; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(objectName); + ret.addAll(arguments); + return ret; + } + + public NewObjectActionItem(GraphSourceItem instruction, GraphTargetItem objectName, List arguments) { + super(instruction, PRECEDENCE_PRIMARY); + this.objectName = objectName; + this.arguments = arguments; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("new "); + stripQuotes(objectName, localData, writer); + writer.spaceBeforeCallParenthesies(arguments.size()); + writer.append("("); + for (int t = 0; t < arguments.size(); t++) { + if (t > 0) { + writer.append(","); + } + arguments.get(t).toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(objectName.getNeededSources()); + for (GraphTargetItem ti : arguments) { + ret.addAll(ti.getNeededSources()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), objectName, new ActionNewObject()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java index b4d6b302f..30f312046 100644 --- a/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionNextFrame; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class NextFrameActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("nextFrame"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public NextFrameActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionNextFrame()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionNextFrame; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class NextFrameActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("nextFrame"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public NextFrameActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionNextFrame()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java index df237003d..e8fa4954a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionPlay; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class PlayActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("play"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public PlayActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionPlay()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionPlay; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class PlayActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("play"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public PlayActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionPlay()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/model/PopActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java index 1a48aef68..373714c4a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionPop; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class PopActionItem extends ActionItem { - - public PopActionItem(GraphSourceItem instruction) { - super(instruction, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public boolean isEmpty() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionPop()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class PopActionItem extends ActionItem { + + public PopActionItem(GraphSourceItem instruction) { + super(instruction, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public boolean isEmpty() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionPop()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java similarity index 85% rename from src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java index cbf58342c..fe999f0f0 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java @@ -1,141 +1,140 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.operations.SubtractActionItem; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionPop; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; -import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; -import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class PostDecrementActionItem extends ActionItem implements SetTypeActionItem { - - public GraphTargetItem object; - private int tempRegister = -1; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - return ret; - } - - public PostDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append("--"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem getObject() { - return object; - } - - @Override - public GraphTargetItem getValue() { - return new SubtractActionItem(null, object, new DirectValueActionItem(null, 0, new Long(1), null)); - } - - @Override - public void setTempRegister(int regIndex) { - tempRegister = regIndex; - } - - @Override - public int getTempRegister() { - return tempRegister; - } - - @Override - public void setValue(GraphTargetItem value) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - - GraphTargetItem val = object; - if (val instanceof VariableActionItem) { - val = ((VariableActionItem) val).getBoxedValue(); - } - - if (val instanceof GetVariableActionItem) { - GetVariableActionItem gv = (GetVariableActionItem) val; - ret.addAll(gv.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetVariable - ret.addAll(gv.toSource(localData, generator)); - ret.add(new ActionDecrement()); - ret.add(new ActionSetVariable()); - } else if (val instanceof GetMemberActionItem) { - GetMemberActionItem mem = (GetMemberActionItem) val; - ret.addAll(mem.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetMember - ret.addAll(mem.toSource(localData, generator)); - ret.add(new ActionDecrement()); - ret.add(new ActionSetMember()); - } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { - RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; - ret.add(new ActionPush(new RegisterNumber(rn.number))); - ret.add(new ActionDecrement()); - ret.add(new ActionStoreRegister(rn.number)); - ret.add(new ActionPop()); - } else if (val instanceof GetPropertyActionItem) { - GetPropertyActionItem gp = (GetPropertyActionItem) val; - ret.addAll(gp.toSource(localData, generator)); - ret.remove(ret.size() - 1); - ret.addAll(gp.toSource(localData, generator)); - ret.add(new ActionDecrement()); - ret.add(new ActionSetProperty()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object.toSource(localData, generator), toSourceIgnoreReturnValue(localData, generator)); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.operations.SubtractActionItem; +import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class PostDecrementActionItem extends ActionItem implements SetTypeActionItem { + + public GraphTargetItem object; + private int tempRegister = -1; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + return ret; + } + + public PostDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_POSTFIX); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append("--"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem getObject() { + return object; + } + + @Override + public GraphTargetItem getValue() { + return new SubtractActionItem(null, object, new DirectValueActionItem(null, 0, new Long(1), null)); + } + + @Override + public void setTempRegister(int regIndex) { + tempRegister = regIndex; + } + + @Override + public int getTempRegister() { + return tempRegister; + } + + @Override + public void setValue(GraphTargetItem value) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + + GraphTargetItem val = object; + if (val instanceof VariableActionItem) { + val = ((VariableActionItem) val).getBoxedValue(); + } + + if (val instanceof GetVariableActionItem) { + GetVariableActionItem gv = (GetVariableActionItem) val; + ret.addAll(gv.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetVariable + ret.addAll(gv.toSource(localData, generator)); + ret.add(new ActionDecrement()); + ret.add(new ActionSetVariable()); + } else if (val instanceof GetMemberActionItem) { + GetMemberActionItem mem = (GetMemberActionItem) val; + ret.addAll(mem.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetMember + ret.addAll(mem.toSource(localData, generator)); + ret.add(new ActionDecrement()); + ret.add(new ActionSetMember()); + } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { + RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; + ret.add(new ActionPush(new RegisterNumber(rn.number))); + ret.add(new ActionDecrement()); + ret.add(new ActionStoreRegister(rn.number)); + ret.add(new ActionPop()); + } else if (val instanceof GetPropertyActionItem) { + GetPropertyActionItem gp = (GetPropertyActionItem) val; + ret.addAll(gp.toSource(localData, generator)); + ret.remove(ret.size() - 1); + ret.addAll(gp.toSource(localData, generator)); + ret.add(new ActionDecrement()); + ret.add(new ActionSetProperty()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object.toSource(localData, generator), toSourceIgnoreReturnValue(localData, generator)); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java similarity index 85% rename from src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java index e2cc5fbf7..ee48a168b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java @@ -1,141 +1,140 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionPop; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; -import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; -import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -public class PostIncrementActionItem extends ActionItem implements SetTypeActionItem { - - public GraphTargetItem object; - private int tempRegister = -1; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(object); - return ret; - } - - public PostIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_POSTFIX); - this.object = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - object.toString(writer, localData); - return writer.append("++"); - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public GraphTargetItem getObject() { - return object; - } - - @Override - public GraphTargetItem getValue() { - return new AddActionItem(null, object, new DirectValueActionItem(null, 0, new Long(1), null), true); - } - - @Override - public void setTempRegister(int regIndex) { - tempRegister = regIndex; - } - - @Override - public int getTempRegister() { - return tempRegister; - } - - @Override - public void setValue(GraphTargetItem value) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - - GraphTargetItem val = object; - if (val instanceof VariableActionItem) { - val = ((VariableActionItem) val).getBoxedValue(); - } - - if (val instanceof GetVariableActionItem) { - GetVariableActionItem gv = (GetVariableActionItem) val; - ret.addAll(gv.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetVariable - ret.addAll(gv.toSource(localData, generator)); - ret.add(new ActionIncrement()); - ret.add(new ActionSetVariable()); - } else if (val instanceof GetMemberActionItem) { - GetMemberActionItem mem = (GetMemberActionItem) val; - ret.addAll(mem.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetMember - ret.addAll(mem.toSource(localData, generator)); - ret.add(new ActionIncrement()); - ret.add(new ActionSetMember()); - } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { - RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; - ret.add(new ActionPush(new RegisterNumber(rn.number))); - ret.add(new ActionIncrement()); - ret.add(new ActionStoreRegister(rn.number)); - ret.add(new ActionPop()); - } else if (val instanceof GetPropertyActionItem) { - GetPropertyActionItem gp = (GetPropertyActionItem) val; - ret.addAll(gp.toSource(localData, generator)); - ret.remove(ret.size() - 1); - ret.addAll(gp.toSource(localData, generator)); - ret.add(new ActionIncrement()); - ret.add(new ActionSetProperty()); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, object.toSource(localData, generator), toSourceIgnoreReturnValue(localData, generator)); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; +import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +public class PostIncrementActionItem extends ActionItem implements SetTypeActionItem { + + public GraphTargetItem object; + private int tempRegister = -1; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(object); + return ret; + } + + public PostIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_POSTFIX); + this.object = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + object.toString(writer, localData); + return writer.append("++"); + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public GraphTargetItem getObject() { + return object; + } + + @Override + public GraphTargetItem getValue() { + return new AddActionItem(null, object, new DirectValueActionItem(null, 0, new Long(1), null), true); + } + + @Override + public void setTempRegister(int regIndex) { + tempRegister = regIndex; + } + + @Override + public int getTempRegister() { + return tempRegister; + } + + @Override + public void setValue(GraphTargetItem value) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + + GraphTargetItem val = object; + if (val instanceof VariableActionItem) { + val = ((VariableActionItem) val).getBoxedValue(); + } + + if (val instanceof GetVariableActionItem) { + GetVariableActionItem gv = (GetVariableActionItem) val; + ret.addAll(gv.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetVariable + ret.addAll(gv.toSource(localData, generator)); + ret.add(new ActionIncrement()); + ret.add(new ActionSetVariable()); + } else if (val instanceof GetMemberActionItem) { + GetMemberActionItem mem = (GetMemberActionItem) val; + ret.addAll(mem.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetMember + ret.addAll(mem.toSource(localData, generator)); + ret.add(new ActionIncrement()); + ret.add(new ActionSetMember()); + } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { + RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; + ret.add(new ActionPush(new RegisterNumber(rn.number))); + ret.add(new ActionIncrement()); + ret.add(new ActionStoreRegister(rn.number)); + ret.add(new ActionPop()); + } else if (val instanceof GetPropertyActionItem) { + GetPropertyActionItem gp = (GetPropertyActionItem) val; + ret.addAll(gp.toSource(localData, generator)); + ret.remove(ret.size() - 1); + ret.addAll(gp.toSource(localData, generator)); + ret.add(new ActionIncrement()); + ret.add(new ActionSetProperty()); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, object.toSource(localData, generator), toSourceIgnoreReturnValue(localData, generator)); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java index d13f1ec1c..e0b0433f5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionPrevFrame; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class PrevFrameActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("prevFrame"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public PrevFrameActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionPrevFrame()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionPrevFrame; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class PrevFrameActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("prevFrame"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public PrevFrameActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionPrevFrame()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java index 39e5511b2..1bbb7fcd2 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class PrintActionItem extends ActionItem { - - private final GraphTargetItem target; - private final GraphTargetItem boundingBox; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(target); - ret.add(boundingBox); - return ret; - } - - public PrintActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - this.boundingBox = boundingBox; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("print"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - target.toString(writer, localData); - writer.append(","); - boundingBox.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - return toSourceMerge(localData, generator, new AddActionItem(src, asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class PrintActionItem extends ActionItem { + + private final GraphTargetItem target; + private final GraphTargetItem boundingBox; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(target); + ret.add(boundingBox); + return ret; + } + + public PrintActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + this.boundingBox = boundingBox; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("print"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + target.toString(writer, localData); + writer.append(","); + boundingBox.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + return toSourceMerge(localData, generator, new AddActionItem(src, asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java index f27ce4d24..d6895f1ce 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class PrintAsBitmapActionItem extends ActionItem { - - private final GraphTargetItem target; - private final GraphTargetItem boundingBox; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(target); - ret.add(boundingBox); - return ret; - } - - public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - this.boundingBox = boundingBox; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("printAsBitmap"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - target.toString(writer, localData); - writer.append(","); - boundingBox.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - return toSourceMerge(localData, generator, new AddActionItem(src, asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.operations.AddActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class PrintAsBitmapActionItem extends ActionItem { + + private final GraphTargetItem target; + private final GraphTargetItem boundingBox; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(target); + ret.add(boundingBox); + return ret; + } + + public PrintAsBitmapActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem boundingBox) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + this.boundingBox = boundingBox; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("printAsBitmap"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + target.toString(writer, localData); + writer.append(","); + boundingBox.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + return toSourceMerge(localData, generator, new AddActionItem(src, asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java similarity index 79% rename from src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java index 7fef1bbf4..7e2aecacf 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java similarity index 78% rename from src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java index b19ce7fed..eacce0a59 100644 --- a/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java similarity index 69% rename from src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java index d047a6242..681e1ef0e 100644 --- a/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionRandomNumber; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class RandomNumberActionItem extends ActionItem { - - public RandomNumberActionItem(GraphSourceItem instruction, GraphTargetItem maximum) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = maximum; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("random"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionRandomNumber()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionRandomNumber; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class RandomNumberActionItem extends ActionItem { + + public RandomNumberActionItem(GraphSourceItem instruction, GraphTargetItem maximum) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = maximum; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("random"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionRandomNumber()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java similarity index 69% rename from src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java index b13da888b..29dc7a101 100644 --- a/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionRemoveSprite; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class RemoveSpriteActionItem extends ActionItem { - - public RemoveSpriteActionItem(GraphSourceItem instruction, GraphTargetItem target) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = target; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("removeMovieClip"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionRemoveSprite()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionRemoveSprite; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class RemoveSpriteActionItem extends ActionItem { + + public RemoveSpriteActionItem(GraphSourceItem instruction, GraphTargetItem target) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = target; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("removeMovieClip"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionRemoveSprite()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java index 73ceb8b9c..6dbfa7f01 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java @@ -1,96 +1,95 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.swf4.ActionIf; -import com.jpexs.decompiler.flash.action.swf4.ActionNot; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; -import com.jpexs.decompiler.flash.action.swf5.ActionReturn; -import com.jpexs.decompiler.flash.ecma.Null; -import com.jpexs.decompiler.flash.ecma.Undefined; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.ExitItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -public class ReturnActionItem extends ActionItem implements ExitItem { - - //public GraphTargetItem value; - public ReturnActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("return "); - return value.toString(writer, localData); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - List ret = new ArrayList<>(); - int forinlevel = asGenerator.getForInLevel(localData); - for (int i = 0; i < forinlevel; i++) { //Must POP all remaining values from enumerations (for..in) - List forinret = new ArrayList<>(); - forinret.add(new ActionPush(new Null())); - forinret.add(new ActionEquals2()); - forinret.add(new ActionNot()); - ActionIf aforinif = new ActionIf(0); - forinret.add(aforinif); - aforinif.setJumpOffset(-Action.actionsToBytes(forinret, false, SWF.DEFAULT_VERSION).length); - ret.addAll(forinret); - } - if (value == null) { - ret.add(new ActionPush(new Undefined())); - } else { - ret.addAll(value.toSource(localData, generator)); - } - ret.add(new ActionReturn()); - return ret; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.action.swf5.ActionReturn; +import com.jpexs.decompiler.flash.ecma.Null; +import com.jpexs.decompiler.flash.ecma.Undefined; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.ExitItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class ReturnActionItem extends ActionItem implements ExitItem { + + //public GraphTargetItem value; + public ReturnActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("return "); + return value.toString(writer, localData); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + List ret = new ArrayList<>(); + int forinlevel = asGenerator.getForInLevel(localData); + for (int i = 0; i < forinlevel; i++) { //Must POP all remaining values from enumerations (for..in) + List forinret = new ArrayList<>(); + forinret.add(new ActionPush(new Null())); + forinret.add(new ActionEquals2()); + forinret.add(new ActionNot()); + ActionIf aforinif = new ActionIf(0); + forinret.add(aforinif); + aforinif.setJumpOffset(-Action.actionsToBytes(forinret, false, SWF.DEFAULT_VERSION).length); + ret.addAll(forinret); + } + if (value == null) { + ret.add(new ActionPush(new Undefined())); + } else { + ret.addAll(value.toSource(localData, generator)); + } + ret.add(new ActionReturn()); + return ret; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java similarity index 85% rename from src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java index 53a8acb8e..eaf2d7604 100644 --- a/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java index 622c8593b..7f293a754 100644 --- a/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java @@ -1,120 +1,119 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class SetPropertyActionItem extends ActionItem implements SetTypeActionItem { - - public GraphTargetItem target; - public int propertyIndex; - //public GraphTargetItem value; - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - @Override - public void setValue(GraphTargetItem value) { - this.value = value; - } - private int tempRegister = -1; - - @Override - public int getTempRegister() { - return tempRegister; - } - - @Override - public void setTempRegister(int tempRegister) { - this.tempRegister = tempRegister; - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - public SetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex, GraphTargetItem value) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.target = target; - this.propertyIndex = propertyIndex; - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (isEmptyString(target)) { - writer.append(Action.propertyNames[propertyIndex] + " = "); - return value.toString(writer, localData); - } - target.toString(writer, localData); - writer.append("." + Action.propertyNames[propertyIndex] + " = "); - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem getObject() { - return new GetPropertyActionItem(src, target, propertyIndex); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(target.getNeededSources()); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public boolean hasSideEffect() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - int tmpReg = asGenerator.getTempRegister(localData); - return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), value, new ActionStoreRegister(tmpReg), new ActionSetProperty(), new ActionPush(new RegisterNumber(tmpReg))); - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), value, new ActionSetProperty()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class SetPropertyActionItem extends ActionItem implements SetTypeActionItem { + + public GraphTargetItem target; + public int propertyIndex; + //public GraphTargetItem value; + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + @Override + public void setValue(GraphTargetItem value) { + this.value = value; + } + private int tempRegister = -1; + + @Override + public int getTempRegister() { + return tempRegister; + } + + @Override + public void setTempRegister(int tempRegister) { + this.tempRegister = tempRegister; + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + public SetPropertyActionItem(GraphSourceItem instruction, GraphTargetItem target, int propertyIndex, GraphTargetItem value) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.target = target; + this.propertyIndex = propertyIndex; + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (isEmptyString(target)) { + writer.append(Action.propertyNames[propertyIndex] + " = "); + return value.toString(writer, localData); + } + target.toString(writer, localData); + writer.append("." + Action.propertyNames[propertyIndex] + " = "); + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem getObject() { + return new GetPropertyActionItem(src, target, propertyIndex); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(target.getNeededSources()); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public boolean hasSideEffect() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + int tmpReg = asGenerator.getTempRegister(localData); + return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), value, new ActionStoreRegister(tmpReg), new ActionSetProperty(), new ActionPush(new RegisterNumber(tmpReg))); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex), value, new ActionSetProperty()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java index d97b98f3e..2c5385d87 100644 --- a/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class SetTarget2ActionItem extends ActionItem { - - public GraphTargetItem target; - - public SetTarget2ActionItem(GraphSourceItem instruction, GraphTargetItem target) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("tellTarget"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - target.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(target.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class SetTarget2ActionItem extends ActionItem { + + public GraphTargetItem target; + + public SetTarget2ActionItem(GraphSourceItem instruction, GraphTargetItem target) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("tellTarget"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + target.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(target.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + throw new UnsupportedOperationException(); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java index f66ed6d61..952f8c115 100644 --- a/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.helpers.Helper; -import java.util.List; - -public class SetTargetActionItem extends ActionItem { - - public String target; - - public SetTargetActionItem(GraphSourceItem instruction, String target) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("tellTarget(\""); - writer.append(Helper.escapeString(target)); - return writer.append("\")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.Helper; +import java.util.List; + +public class SetTargetActionItem extends ActionItem { + + public String target; + + public SetTargetActionItem(GraphSourceItem instruction, String target) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("tellTarget(\""); + writer.append(Helper.escapeString(target)); + return writer.append("\")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + throw new UnsupportedOperationException(); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java new file mode 100644 index 000000000..4bf8983bf --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public interface SetTypeActionItem { + + public GraphTargetItem getObject(); + + public GraphTargetItem getValue(); + + public void setTempRegister(int regIndex); + + public int getTempRegister(); + + public void setValue(GraphTargetItem value); +} diff --git a/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java similarity index 86% rename from src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java index 12a627e72..61237da09 100644 --- a/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java similarity index 81% rename from src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java index bf7807c3b..5a2243268 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java @@ -1,110 +1,109 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionStartDrag; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class StartDragActionItem extends ActionItem { - - public GraphTargetItem target; - public GraphTargetItem lockCenter; - public GraphTargetItem constrain; - public GraphTargetItem y2; - public GraphTargetItem x2; - public GraphTargetItem y1; - public GraphTargetItem x1; - - public StartDragActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) { - super(instruction, PRECEDENCE_PRIMARY); - this.target = target; - this.lockCenter = lockCenter; - this.constrain = constrain; - this.y2 = y2; - this.x2 = x2; - this.y1 = y1; - this.x1 = x1; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - boolean hasConstrains = true; - if (constrain instanceof DirectValueActionItem) { - if (Double.compare(EcmaScript.toNumber(constrain.getResult()), 0) == 0) { - hasConstrains = false; - } - } - writer.append("startDrag"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - target.toString(writer, localData); - writer.append(","); - lockCenter.toString(writer, localData); - if (hasConstrains) { - writer.append(","); - x1.toString(writer, localData); - writer.append(","); - y1.toString(writer, localData); - writer.append(","); - x2.toString(writer, localData); - writer.append(","); - y2.toString(writer, localData); - } - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(target.getNeededSources()); - ret.addAll(constrain.getNeededSources()); - ret.addAll(x1.getNeededSources()); - ret.addAll(x2.getNeededSources()); - ret.addAll(y1.getNeededSources()); - ret.addAll(y2.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - boolean hasConstrains = true; - if (constrain instanceof DirectValueActionItem) { - if (Double.compare(EcmaScript.toNumber(constrain.getResult()), 0) == 0) { - hasConstrains = false; - } - } - if (hasConstrains) { - return toSourceMerge(localData, generator, x1, y1, x2, y2, constrain, lockCenter, target, new ActionStartDrag()); - } else { - return toSourceMerge(localData, generator, constrain, lockCenter, target, new ActionStartDrag()); - } - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionStartDrag; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class StartDragActionItem extends ActionItem { + + public GraphTargetItem target; + public GraphTargetItem lockCenter; + public GraphTargetItem constrain; + public GraphTargetItem y2; + public GraphTargetItem x2; + public GraphTargetItem y1; + public GraphTargetItem x1; + + public StartDragActionItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) { + super(instruction, PRECEDENCE_PRIMARY); + this.target = target; + this.lockCenter = lockCenter; + this.constrain = constrain; + this.y2 = y2; + this.x2 = x2; + this.y1 = y1; + this.x1 = x1; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + boolean hasConstrains = true; + if (constrain instanceof DirectValueActionItem) { + if (Double.compare(EcmaScript.toNumber(constrain.getResult()), 0) == 0) { + hasConstrains = false; + } + } + writer.append("startDrag"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + target.toString(writer, localData); + writer.append(","); + lockCenter.toString(writer, localData); + if (hasConstrains) { + writer.append(","); + x1.toString(writer, localData); + writer.append(","); + y1.toString(writer, localData); + writer.append(","); + x2.toString(writer, localData); + writer.append(","); + y2.toString(writer, localData); + } + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(target.getNeededSources()); + ret.addAll(constrain.getNeededSources()); + ret.addAll(x1.getNeededSources()); + ret.addAll(x2.getNeededSources()); + ret.addAll(y1.getNeededSources()); + ret.addAll(y2.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + boolean hasConstrains = true; + if (constrain instanceof DirectValueActionItem) { + if (Double.compare(EcmaScript.toNumber(constrain.getResult()), 0) == 0) { + hasConstrains = false; + } + } + if (hasConstrains) { + return toSourceMerge(localData, generator, x1, y1, x2, y2, constrain, lockCenter, target, new ActionStartDrag()); + } else { + return toSourceMerge(localData, generator, constrain, lockCenter, target, new ActionStartDrag()); + } + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/StopActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java index 342f7c8fe..340481ba9 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionStop; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class StopActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("stop"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public StopActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionStop()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionStop; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class StopActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("stop"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public StopActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionStop()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java index 5a824d1b0..1f381ddf3 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionStopSounds; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class StopAllSoundsActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("stopAllSounds"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public StopAllSoundsActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionStopSounds()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionStopSounds; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class StopAllSoundsActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("stopAllSounds"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public StopAllSoundsActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionStopSounds()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java index 94965de6d..3843ffde5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionEndDrag; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class StopDragActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("stopDrag"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public StopDragActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionEndDrag()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionEndDrag; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class StopDragActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("stopDrag"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public StopDragActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionEndDrag()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java similarity index 79% rename from src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java index 48495d6f3..98d3fae57 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java @@ -1,122 +1,121 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class StoreRegisterActionItem extends ActionItem implements SetTypeActionItem { - - public RegisterNumber register; - //public GraphTargetItem value; - public boolean define = false; - public boolean temporary = false; - - @Override - public GraphPart getFirstPart() { - return value.getFirstPart(); - } - - @Override - public void setValue(GraphTargetItem value) { - this.value = value; - } - private int tempRegister = -1; - - @Override - public int getTempRegister() { - return tempRegister; - } - - @Override - public void setTempRegister(int tempRegister) { - this.tempRegister = tempRegister; - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - public StoreRegisterActionItem(GraphSourceItem instruction, RegisterNumber register, GraphTargetItem value, boolean define) { - super(instruction, PRECEDENCE_ASSIGMENT); - this.value = value; - this.register = register; - this.define = define; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (temporary) { - value.toString(writer, localData); - } else { - if (define) { - writer.append("var "); - } - writer.append(register.translate() + " = "); - value.toString(writer, localData); - } - return writer; - } - - @Override - public GraphTargetItem getObject() { - return new DirectValueActionItem(src, -1, register, null); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionStoreRegister(register.number)); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public Object getResult() { - return value.getResult(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class StoreRegisterActionItem extends ActionItem implements SetTypeActionItem { + + public RegisterNumber register; + //public GraphTargetItem value; + public boolean define = false; + public boolean temporary = false; + + @Override + public GraphPart getFirstPart() { + return value.getFirstPart(); + } + + @Override + public void setValue(GraphTargetItem value) { + this.value = value; + } + private int tempRegister = -1; + + @Override + public int getTempRegister() { + return tempRegister; + } + + @Override + public void setTempRegister(int tempRegister) { + this.tempRegister = tempRegister; + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + public StoreRegisterActionItem(GraphSourceItem instruction, RegisterNumber register, GraphTargetItem value, boolean define) { + super(instruction, PRECEDENCE_ASSIGMENT); + this.value = value; + this.register = register; + this.define = define; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (temporary) { + value.toString(writer, localData); + } else { + if (define) { + writer.append("var "); + } + writer.append(register.translate() + " = "); + value.toString(writer, localData); + } + return writer; + } + + @Override + public GraphTargetItem getObject() { + return new DirectValueActionItem(src, -1, register, null); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionStoreRegister(register.number)); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public Object getResult() { + return value.getResult(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java index 72dfed5a2..72fcc0e36 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java @@ -1,43 +1,42 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class StrictModeActionItem extends ActionItem { - - public int mode; - - public StrictModeActionItem(GraphSourceItem instruction, int mode) { - super(instruction, PRECEDENCE_PRIMARY); - this.mode = mode; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("StrictMode"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("(" + mode + ");"); //I still don't know how AS source of Strict Mode instruction looks like, assuming this... - } - - @Override - public boolean hasReturnValue() { - return false; //FIXME ? - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class StrictModeActionItem extends ActionItem { + + public int mode; + + public StrictModeActionItem(GraphSourceItem instruction, int mode) { + super(instruction, PRECEDENCE_PRIMARY); + this.mode = mode; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("StrictMode"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("(" + mode + ");"); //I still don't know how AS source of Strict Mode instruction looks like, assuming this... + } + + @Override + public boolean hasReturnValue() { + return false; //FIXME ? + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java similarity index 73% rename from src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java index f8fb0d4ac..1c83e52bb 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionStringExtract; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class StringExtractActionItem extends ActionItem { - - //public GraphTargetItem value; - public GraphTargetItem index; - public GraphTargetItem count; - - public StringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - this.index = index; - this.count = count; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - value.toString(writer, localData); - writer.append(".substr"); - writer.spaceBeforeCallParenthesies(2); - writer.append("("); - index.toString(writer, localData); - writer.append(","); - count.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - ret.addAll(index.getNeededSources()); - ret.addAll(count.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, index, count, new ActionStringExtract()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionStringExtract; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class StringExtractActionItem extends ActionItem { + + //public GraphTargetItem value; + public GraphTargetItem index; + public GraphTargetItem count; + + public StringExtractActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem index, GraphTargetItem count) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + this.index = index; + this.count = count; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + value.toString(writer, localData); + writer.append(".substr"); + writer.spaceBeforeCallParenthesies(2); + writer.append("("); + index.toString(writer, localData); + writer.append(","); + count.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + ret.addAll(index.getNeededSources()); + ret.addAll(count.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, index, count, new ActionStringExtract()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java similarity index 67% rename from src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java index 210566a54..36d240ed1 100644 --- a/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java @@ -1,61 +1,60 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionStringLength; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class StringLengthActionItem extends ActionItem { - - //public GraphTargetItem value; - public StringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("length"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionStringLength()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionStringLength; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class StringLengthActionItem extends ActionItem { + + //public GraphTargetItem value; + public StringLengthActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("length"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionStringLength()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java index 9676ba5b9..90bd21f29 100644 --- a/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionTargetPath; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class TargetPathActionItem extends ActionItem { - - public TargetPathActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("targetPath"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionTargetPath()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionTargetPath; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class TargetPathActionItem extends ActionItem { + + public TargetPathActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("targetPath"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionTargetPath()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java index d716082e0..c3c04b4a7 100644 --- a/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class TemporaryRegister extends ActionItem { - - private final int regId; - - public TemporaryRegister(int regId, GraphTargetItem value) { - super(value.src, value.getPrecedence()); - this.value = value; - this.regId = regId; - } - - public int getRegId() { - return regId; - } - - @Override - public String toString() { - return "temp reg " + regId + ":" + value.toString(); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return value.toString(writer, localData); - } - - @Override - public boolean hasReturnValue() { - return value.hasReturnValue(); - } - - @Override - public Object getResult() { - return value.getResult(); - } - - @Override - public List getAllSubItems() { - return value.getAllSubItems(); - } - - @Override - public List getNeededSources() { - return value.getNeededSources(); - } - - @Override - public GraphTargetItem getNotCoerced() { - return value.getNotCoerced(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class TemporaryRegister extends ActionItem { + + private final int regId; + + public TemporaryRegister(int regId, GraphTargetItem value) { + super(value.src, value.getPrecedence()); + this.value = value; + this.regId = regId; + } + + public int getRegId() { + return regId; + } + + @Override + public String toString() { + return "temp reg " + regId + ":" + value.toString(); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return value.toString(writer, localData); + } + + @Override + public boolean hasReturnValue() { + return value.hasReturnValue(); + } + + @Override + public Object getResult() { + return value.getResult(); + } + + @Override + public List getAllSubItems() { + return value.getAllSubItems(); + } + + @Override + public List getNeededSources() { + return value.getNeededSources(); + } + + @Override + public GraphTargetItem getNotCoerced() { + return value.getNotCoerced(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java similarity index 67% rename from src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java index 270009767..0985a98d9 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf7.ActionThrow; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ThrowActionItem extends ActionItem { - - public ThrowActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = object; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("throw "); - return value.toString(writer, localData); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionThrow()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf7.ActionThrow; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ThrowActionItem extends ActionItem { + + public ThrowActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = object; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("throw "); + return value.toString(writer, localData); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionThrow()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java index 059dc04f9..4f5f392fa 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionToInteger; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ToIntegerActionItem extends ActionItem { - - public ToIntegerActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("int"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionToInteger()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionToInteger; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ToIntegerActionItem extends ActionItem { + + public ToIntegerActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("int"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionToInteger()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java index a8acf3ec0..bd968877f 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionToNumber; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ToNumberActionItem extends ActionItem { - - public ToNumberActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("Number"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionToNumber()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionToNumber; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ToNumberActionItem extends ActionItem { + + public ToNumberActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("Number"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionToNumber()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java index dc17fd409..2d395997a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionToString; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ToStringActionItem extends ActionItem { - - public ToStringActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("String"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionToString()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionToString; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ToStringActionItem extends ActionItem { + + public ToStringActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("String"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionToString()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java index 0c3acb89c..edbb4c4c9 100644 --- a/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf3.ActionToggleQuality; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class ToggleHighQualityActionItem extends ActionItem { - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("toggleHighQuality"); - writer.spaceBeforeCallParenthesies(0); - return writer.append("()"); - } - - public ToggleHighQualityActionItem(GraphSourceItem instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionToggleQuality()); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf3.ActionToggleQuality; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class ToggleHighQualityActionItem extends ActionItem { + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("toggleHighQuality"); + writer.spaceBeforeCallParenthesies(0); + return writer.append("()"); + } + + public ToggleHighQualityActionItem(GraphSourceItem instruction) { + super(instruction, PRECEDENCE_PRIMARY); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionToggleQuality()); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java index 026c79e49..bc92a4756 100644 --- a/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionTrace; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class TraceActionItem extends ActionItem { - - public TraceActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("trace"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionTrace()); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionTrace; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class TraceActionItem extends ActionItem { + + public TraceActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("trace"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionTrace()); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java similarity index 76% rename from src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java index fd2791cbb..b4cea2068 100644 --- a/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java @@ -1,95 +1,94 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.ecma.EcmaType; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; -import java.util.Set; - -public class TypeOfActionItem extends ActionItem { - - public TypeOfActionItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("typeof "); - writer.spaceBeforeCallParenthesies(1); - value.toString(writer, localData); - return writer; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public Object getResult() { - Object res = value.getResult(); - EcmaType type = EcmaScript.type(res); - switch (type) { - case STRING: - return "string"; - case BOOLEAN: - return "boolean"; - case NUMBER: - return "number"; - case OBJECT: - return "object"; - case UNDEFINED: - return "undefined"; - case NULL: - return "null"; - } - //TODO: function,movieclip - return "object"; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, value, new ActionTypeOf()); - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.ecma.EcmaType; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; +import java.util.Set; + +public class TypeOfActionItem extends ActionItem { + + public TypeOfActionItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("typeof "); + writer.spaceBeforeCallParenthesies(1); + value.toString(writer, localData); + return writer; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public Object getResult() { + Object res = value.getResult(); + EcmaType type = EcmaScript.type(res); + switch (type) { + case STRING: + return "string"; + case BOOLEAN: + return "boolean"; + case NUMBER: + return "number"; + case OBJECT: + return "object"; + case UNDEFINED: + return "undefined"; + case NULL: + return "null"; + } + //TODO: function,movieclip + return "object"; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, value, new ActionTypeOf()); + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java similarity index 70% rename from src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java index 45a6128c1..7796cd641 100644 --- a/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java @@ -1,69 +1,68 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class UnLoadMovieActionItem extends ActionItem { - - private final GraphTargetItem targetString; - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(targetString); - return ret; - } - - public UnLoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem targetString) { - super(instruction, PRECEDENCE_PRIMARY); - this.targetString = targetString; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("unloadMovie"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - targetString.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, new ActionPush(""), targetString, new ActionGetURL2(0, false, true)); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class UnLoadMovieActionItem extends ActionItem { + + private final GraphTargetItem targetString; + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(targetString); + return ret; + } + + public UnLoadMovieActionItem(GraphSourceItem instruction, GraphTargetItem targetString) { + super(instruction, PRECEDENCE_PRIMARY); + this.targetString = targetString; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("unloadMovie"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + targetString.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, new ActionPush(""), targetString, new ActionGetURL2(0, false, true)); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java index 8c4b76321..0161a16a5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java similarity index 52% rename from src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java index bd108c66b..afe46f96a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java @@ -1,42 +1,41 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.AppStrings; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.model.LocalData; - -public class UnsupportedActionItem extends ActionItem { - - public String value; - - public UnsupportedActionItem(GraphSourceItem instruction, String value) { - super(instruction, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("//" + AppStrings.translate("decompilation.unsupported") + ":" + value); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model; + +import com.jpexs.decompiler.flash.AppStrings; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.model.LocalData; + +public class UnsupportedActionItem extends ActionItem { + + public String value; + + public UnsupportedActionItem(GraphSourceItem instruction, String value) { + super(instruction, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("//" + AppStrings.translate("decompilation.unsupported") + ":" + value); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java similarity index 89% rename from src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java index 822f93a7f..9bb32a22d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java @@ -1,227 +1,226 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.clauses; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.model.ActionItem; -import com.jpexs.decompiler.flash.action.model.FunctionActionItem; -import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; -import com.jpexs.decompiler.flash.action.model.SetMemberActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.collections.MyEntry; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.ContinueItem; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.helpers.Helper; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class ClassActionItem extends ActionItem implements Block { - - public List functions; - public List staticFunctions; - public GraphTargetItem extendsOp; - public List implementsOp; - public GraphTargetItem className; - public GraphTargetItem constructor; - public List> vars; - public List> staticVars; - public Set uninitializedVars; - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (functions != null) { - ret.add(functions); - } - if (staticFunctions != null) { - ret.add(staticFunctions); - } - return ret; - } - - public ClassActionItem(GraphTargetItem className, GraphTargetItem extendsOp, List implementsOp, GraphTargetItem constructor, List functions, List> vars, List staticFunctions, List> staticVars) { - super(null, NOPRECEDENCE); - this.className = className; - this.functions = functions; - this.vars = vars; - this.extendsOp = extendsOp; - this.implementsOp = implementsOp; - this.staticFunctions = staticFunctions; - this.staticVars = staticVars; - this.constructor = constructor; - - List allFunc = new ArrayList<>(functions); - if (constructor != null) { - allFunc.add(constructor); - } - this.uninitializedVars = new HashSet<>(); - List allUsages = new ArrayList<>(); - for (GraphTargetItem it : allFunc) { - if (it instanceof FunctionActionItem) { - FunctionActionItem f = (FunctionActionItem) it; - detectUnitializedVars(f.actions, allUsages); - } - } - Set allMembers = new HashSet<>(); - for (GraphTargetItem it : allUsages) { - allMembers.add(it.toStringNoQuotes(LocalData.empty)); - } - uninitializedVars.addAll(allMembers); - for (MyEntry v : vars) { - String s = v.key.toStringNoQuotes(LocalData.empty); - if (uninitializedVars.contains(s)) { - uninitializedVars.remove(s); - } - } - } - - private boolean isThis(GraphTargetItem item) { - if (item instanceof VariableActionItem) { - return "this".equals(((VariableActionItem) item).getVariableName()); - } - return false; - } - - private void detectUnitializedVars(GraphTargetItem item, List ret) { - if (item == null) { - return; - } - - if (item instanceof GetMemberActionItem) { - GetMemberActionItem gm = (GetMemberActionItem) item; - if (isThis(gm.object)) { - ret.add(gm.memberName); - } else { - detectUnitializedVars(gm.object, ret); - } - } - if (item instanceof SetMemberActionItem) { - SetMemberActionItem sm = (SetMemberActionItem) item; - if (isThis(sm.object)) { - ret.add(sm.objectName); - } else { - detectUnitializedVars(sm.object, ret); - } - } - - if (item instanceof Block) { - Block bl = (Block) item; - for (List list : bl.getSubs()) { - detectUnitializedVars(list, ret); - } - } - detectUnitializedVars(item.getAllSubItems(), ret); - } - - private void detectUnitializedVars(List items, List ret) { - for (GraphTargetItem it : items) { - detectUnitializedVars(it, ret); - } - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("class "); - className.toStringNoQuotes(writer, localData); - if (extendsOp != null) { - writer.append(" extends "); - extendsOp.toStringNoQuotes(writer, localData); - } - if (!implementsOp.isEmpty()) { - writer.append(" implements "); - boolean first = true; - for (GraphTargetItem t : implementsOp) { - if (!first) { - writer.append(", "); - } - first = false; - Action.getWithoutGlobal(t).toString(writer, localData); - } - } - writer.startBlock(); - - if (constructor != null) { - constructor.toString(writer, localData).newLine(); - } - - for (MyEntry item : vars) { - writer.append("var "); - item.key.toStringNoQuotes(writer, localData); - writer.append(" = "); - item.value.toString(writer, localData); - writer.append(";").newLine(); - } - for (String v : uninitializedVars) { - writer.append("var "); - writer.append(v); - writer.append(";").newLine(); - } - for (MyEntry item : staticVars) { - writer.append("static var "); - item.key.toStringNoQuotes(writer, localData); - writer.append(" = "); - item.value.toString(writer, localData); - writer.append(";").newLine(); - } - - for (GraphTargetItem f : functions) { - f.toString(writer, localData).newLine(); - } - for (GraphTargetItem f : staticFunctions) { - writer.append("static "); - f.toString(writer, localData).newLine(); - } - - return writer.endBlock(); - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - return ret; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - SourceGeneratorLocalData localData2 = Helper.deepCopy(localData); - asGenerator.setInMethod(localData2, true); - ret.addAll(asGenerator.generateTraits(localData2, false, className, extendsOp, implementsOp, constructor, functions, vars, staticFunctions, staticVars)); - return ret; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.clauses; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.flash.action.model.FunctionActionItem; +import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; +import com.jpexs.decompiler.flash.action.model.SetMemberActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.collections.MyEntry; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.ContinueItem; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.Helper; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class ClassActionItem extends ActionItem implements Block { + + public List functions; + public List staticFunctions; + public GraphTargetItem extendsOp; + public List implementsOp; + public GraphTargetItem className; + public GraphTargetItem constructor; + public List> vars; + public List> staticVars; + public Set uninitializedVars; + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (functions != null) { + ret.add(functions); + } + if (staticFunctions != null) { + ret.add(staticFunctions); + } + return ret; + } + + public ClassActionItem(GraphTargetItem className, GraphTargetItem extendsOp, List implementsOp, GraphTargetItem constructor, List functions, List> vars, List staticFunctions, List> staticVars) { + super(null, NOPRECEDENCE); + this.className = className; + this.functions = functions; + this.vars = vars; + this.extendsOp = extendsOp; + this.implementsOp = implementsOp; + this.staticFunctions = staticFunctions; + this.staticVars = staticVars; + this.constructor = constructor; + + List allFunc = new ArrayList<>(functions); + if (constructor != null) { + allFunc.add(constructor); + } + this.uninitializedVars = new HashSet<>(); + List allUsages = new ArrayList<>(); + for (GraphTargetItem it : allFunc) { + if (it instanceof FunctionActionItem) { + FunctionActionItem f = (FunctionActionItem) it; + detectUnitializedVars(f.actions, allUsages); + } + } + Set allMembers = new HashSet<>(); + for (GraphTargetItem it : allUsages) { + allMembers.add(it.toStringNoQuotes(LocalData.empty)); + } + uninitializedVars.addAll(allMembers); + for (MyEntry v : vars) { + String s = v.key.toStringNoQuotes(LocalData.empty); + if (uninitializedVars.contains(s)) { + uninitializedVars.remove(s); + } + } + } + + private boolean isThis(GraphTargetItem item) { + if (item instanceof VariableActionItem) { + return "this".equals(((VariableActionItem) item).getVariableName()); + } + return false; + } + + private void detectUnitializedVars(GraphTargetItem item, List ret) { + if (item == null) { + return; + } + + if (item instanceof GetMemberActionItem) { + GetMemberActionItem gm = (GetMemberActionItem) item; + if (isThis(gm.object)) { + ret.add(gm.memberName); + } else { + detectUnitializedVars(gm.object, ret); + } + } + if (item instanceof SetMemberActionItem) { + SetMemberActionItem sm = (SetMemberActionItem) item; + if (isThis(sm.object)) { + ret.add(sm.objectName); + } else { + detectUnitializedVars(sm.object, ret); + } + } + + if (item instanceof Block) { + Block bl = (Block) item; + for (List list : bl.getSubs()) { + detectUnitializedVars(list, ret); + } + } + detectUnitializedVars(item.getAllSubItems(), ret); + } + + private void detectUnitializedVars(List items, List ret) { + for (GraphTargetItem it : items) { + detectUnitializedVars(it, ret); + } + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("class "); + className.toStringNoQuotes(writer, localData); + if (extendsOp != null) { + writer.append(" extends "); + extendsOp.toStringNoQuotes(writer, localData); + } + if (!implementsOp.isEmpty()) { + writer.append(" implements "); + boolean first = true; + for (GraphTargetItem t : implementsOp) { + if (!first) { + writer.append(", "); + } + first = false; + Action.getWithoutGlobal(t).toString(writer, localData); + } + } + writer.startBlock(); + + if (constructor != null) { + constructor.toString(writer, localData).newLine(); + } + + for (MyEntry item : vars) { + writer.append("var "); + item.key.toStringNoQuotes(writer, localData); + writer.append(" = "); + item.value.toString(writer, localData); + writer.append(";").newLine(); + } + for (String v : uninitializedVars) { + writer.append("var "); + writer.append(v); + writer.append(";").newLine(); + } + for (MyEntry item : staticVars) { + writer.append("static var "); + item.key.toStringNoQuotes(writer, localData); + writer.append(" = "); + item.value.toString(writer, localData); + writer.append(";").newLine(); + } + + for (GraphTargetItem f : functions) { + f.toString(writer, localData).newLine(); + } + for (GraphTargetItem f : staticFunctions) { + writer.append("static "); + f.toString(writer, localData).newLine(); + } + + return writer.endBlock(); + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + return ret; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + SourceGeneratorLocalData localData2 = Helper.deepCopy(localData); + asGenerator.setInMethod(localData2, true); + ret.addAll(asGenerator.generateTraits(localData2, false, className, extendsOp, implementsOp, constructor, functions, vars, staticFunctions, staticVars)); + return ret; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java similarity index 88% rename from src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java index 1a482a188..6842bd1ab 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java @@ -1,173 +1,172 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.clauses; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.swf4.ActionIf; -import com.jpexs.decompiler.flash.action.swf4.ActionJump; -import com.jpexs.decompiler.flash.action.swf4.ActionPop; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.action.swf6.ActionEnumerate2; -import com.jpexs.decompiler.flash.ecma.Null; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.ContinueItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -public class ForInActionItem extends LoopActionItem implements Block { - - public GraphTargetItem variableName; - public GraphTargetItem enumVariable; - public List commands; - private boolean labelUsed; - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (commands != null) { - ret.add(commands); - } - return ret; - } - - public ForInActionItem(Action instruction, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List commands) { - super(instruction, loop); - this.variableName = variableName; - this.enumVariable = enumVariable; - this.commands = commands; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("for"); - if (writer.getFormatting().spaceBeforeParenthesesForParentheses) { - writer.append(" "); - } - writer.append("("); - if ((variableName instanceof DirectValueActionItem) && (((DirectValueActionItem) variableName).value instanceof RegisterNumber)) { - writer.append("var "); - } - stripQuotes(variableName, localData, writer); - writer.append(" in "); - enumVariable.toString(writer, localData); - writer.append(")").startBlock(); - for (GraphTargetItem ti : commands) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - writer.endBlock(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : commands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List ret = new ArrayList<>(); - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - HashMap registerVars = asGenerator.getRegisterVars(localData); - ret.addAll(enumVariable.toSource(localData, generator)); - ret.add(new ActionEnumerate2()); - - List loopExpr = new ArrayList<>(); - int exprReg = 0; - for (int i = 0; i < 256; i++) { - if (!registerVars.containsValue(i)) { - registerVars.put("__forin" + asGenerator.uniqId(), i); - exprReg = i; - break; - } - } - int innerExprReg = asGenerator.getTempRegister(localData); - loopExpr.add(new ActionStoreRegister(exprReg)); - loopExpr.add(new ActionPush(new Null())); - loopExpr.add(new ActionEquals2()); - ActionIf forInEndIf = new ActionIf(0); - loopExpr.add(forInEndIf); - List loopBody = new ArrayList<>(); - loopBody.add(new ActionPush(new RegisterNumber(exprReg))); - if (asGenerator.isInFunction(localData) == 2) { - loopBody.add(new ActionStoreRegister(innerExprReg)); - loopBody.add(new ActionPop()); - } else { - loopBody.addAll(0, asGenerator.toActionList(variableName.toSource(localData, generator))); - loopBody.add(new ActionSetVariable()); - } - int oldForIn = asGenerator.getForInLevel(localData); - asGenerator.setForInLevel(localData, oldForIn + 1); - loopBody.addAll(asGenerator.toActionList(asGenerator.generate(localData, commands))); - asGenerator.setForInLevel(localData, oldForIn); - ActionJump forinJmpBack = new ActionJump(0); - loopBody.add(forinJmpBack); - int bodyLen = Action.actionsToBytes(loopBody, false, SWF.DEFAULT_VERSION).length; - int exprLen = Action.actionsToBytes(loopExpr, false, SWF.DEFAULT_VERSION).length; - forinJmpBack.setJumpOffset(-bodyLen - exprLen); - forInEndIf.setJumpOffset(bodyLen); - ret.addAll(loopExpr); - ret.addAll(loopBody); - return ret; - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.clauses; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ActionJump; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.action.swf6.ActionEnumerate2; +import com.jpexs.decompiler.flash.ecma.Null; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.ContinueItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class ForInActionItem extends LoopActionItem implements Block { + + public GraphTargetItem variableName; + public GraphTargetItem enumVariable; + public List commands; + private boolean labelUsed; + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (commands != null) { + ret.add(commands); + } + return ret; + } + + public ForInActionItem(Action instruction, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List commands) { + super(instruction, loop); + this.variableName = variableName; + this.enumVariable = enumVariable; + this.commands = commands; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("for"); + if (writer.getFormatting().spaceBeforeParenthesesForParentheses) { + writer.append(" "); + } + writer.append("("); + if ((variableName instanceof DirectValueActionItem) && (((DirectValueActionItem) variableName).value instanceof RegisterNumber)) { + writer.append("var "); + } + stripQuotes(variableName, localData, writer); + writer.append(" in "); + enumVariable.toString(writer, localData); + writer.append(")").startBlock(); + for (GraphTargetItem ti : commands) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + writer.endBlock(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : commands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List ret = new ArrayList<>(); + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + HashMap registerVars = asGenerator.getRegisterVars(localData); + ret.addAll(enumVariable.toSource(localData, generator)); + ret.add(new ActionEnumerate2()); + + List loopExpr = new ArrayList<>(); + int exprReg = 0; + for (int i = 0; i < 256; i++) { + if (!registerVars.containsValue(i)) { + registerVars.put("__forin" + asGenerator.uniqId(), i); + exprReg = i; + break; + } + } + int innerExprReg = asGenerator.getTempRegister(localData); + loopExpr.add(new ActionStoreRegister(exprReg)); + loopExpr.add(new ActionPush(new Null())); + loopExpr.add(new ActionEquals2()); + ActionIf forInEndIf = new ActionIf(0); + loopExpr.add(forInEndIf); + List loopBody = new ArrayList<>(); + loopBody.add(new ActionPush(new RegisterNumber(exprReg))); + if (asGenerator.isInFunction(localData) == 2) { + loopBody.add(new ActionStoreRegister(innerExprReg)); + loopBody.add(new ActionPop()); + } else { + loopBody.addAll(0, asGenerator.toActionList(variableName.toSource(localData, generator))); + loopBody.add(new ActionSetVariable()); + } + int oldForIn = asGenerator.getForInLevel(localData); + asGenerator.setForInLevel(localData, oldForIn + 1); + loopBody.addAll(asGenerator.toActionList(asGenerator.generate(localData, commands))); + asGenerator.setForInLevel(localData, oldForIn); + ActionJump forinJmpBack = new ActionJump(0); + loopBody.add(forinJmpBack); + int bodyLen = Action.actionsToBytes(loopBody, false, SWF.DEFAULT_VERSION).length; + int exprLen = Action.actionsToBytes(loopExpr, false, SWF.DEFAULT_VERSION).length; + forinJmpBack.setJumpOffset(-bodyLen - exprLen); + forInEndIf.setJumpOffset(bodyLen); + ret.addAll(loopExpr); + ret.addAll(loopBody); + return ret; + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java index ea04fefb3..d81bf85b1 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java @@ -1,89 +1,88 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.clauses; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.ActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionWaitForFrame2; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.Graph; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.ContinueItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class IfFrameLoadedActionItem extends ActionItem implements Block { - - private final List actions; - private final GraphTargetItem frame; - - public IfFrameLoadedActionItem(GraphTargetItem frame, List actions, GraphSourceItem instruction) { - super(instruction, NOPRECEDENCE); - this.actions = actions; - this.frame = frame; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("ifFrameLoaded"); - writer.spaceBeforeCallParenthesies(1); - writer.append("("); - frame.toString(writer, localData); - writer.append(")").startBlock(); - Graph.graphToString(actions, writer, localData); - return writer.endBlock(); - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List getContinues() { - return new ArrayList<>(); - } - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (actions != null) { - ret.add(actions); - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - List body = generator.generate(localData, actions); - return toSourceMerge(localData, generator, frame, new ActionWaitForFrame2(body.size()), body); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.clauses; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionWaitForFrame2; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.Graph; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.ContinueItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class IfFrameLoadedActionItem extends ActionItem implements Block { + + private final List actions; + private final GraphTargetItem frame; + + public IfFrameLoadedActionItem(GraphTargetItem frame, List actions, GraphSourceItem instruction) { + super(instruction, NOPRECEDENCE); + this.actions = actions; + this.frame = frame; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("ifFrameLoaded"); + writer.spaceBeforeCallParenthesies(1); + writer.append("("); + frame.toString(writer, localData); + writer.append(")").startBlock(); + Graph.graphToString(actions, writer, localData); + return writer.endBlock(); + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List getContinues() { + return new ArrayList<>(); + } + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (actions != null) { + ret.add(actions); + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + List body = generator.generate(localData, actions); + return toSourceMerge(localData, generator, frame, new ActionWaitForFrame2(body.size()), body); + } + + @Override + public boolean hasReturnValue() { + return false; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java similarity index 76% rename from src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java index 21bd950ce..7ebbab6d8 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java new file mode 100644 index 000000000..fc1790b0e --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.clauses; + +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.graph.Loop; + +public abstract class LoopActionItem extends ActionItem { + + public Loop loop; + + public LoopActionItem(Action instruction, Loop loop) { + super(instruction, NOPRECEDENCE); + this.loop = loop; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java index 57f672370..9b696c665 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java similarity index 90% rename from src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java index 3d7aaea3a..83f4af5bd 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.clauses; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java index 2b9959999..eab98a716 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.clauses; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java index 2e1a0c64a..123cfb69d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java index cd9d85062..f79d729af 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AndActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionAnd; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class AndActionItem extends BinaryOpItem { - - public AndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and"); - } - - @Override - public Object getResult() { - return EcmaScript.toBoolean(leftSide.getResult()) && EcmaScript.toBoolean(rightSide.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionAnd()); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionAnd; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class AndActionItem extends BinaryOpItem { + + public AndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_LOGICALAND, leftSide, rightSide, "and"); + } + + @Override + public Object getResult() { + return EcmaScript.toBoolean(leftSide.getResult()) && EcmaScript.toBoolean(rightSide.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionAnd()); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java index b045a1264..928eb8d47 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionBitAnd; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitAndActionItem extends BinaryOpItem { - - public BitAndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) & ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitAnd()); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionBitAnd; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitAndActionItem extends BinaryOpItem { + + public BitAndActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) & ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitAnd()); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java index 9a45d6d69..3c42aecd7 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionBitOr; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class BitOrActionItem extends BinaryOpItem { - - public BitOrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) | ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitOr()); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionBitOr; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class BitOrActionItem extends BinaryOpItem { + + public BitOrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) | ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitOr()); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java similarity index 76% rename from src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java index bb2bf01e9..cb70e746a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java similarity index 66% rename from src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java index 11488c82a..6c7be7ed0 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionDivide; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.List; - -public class DivideActionItem extends BinaryOpItem { - - public DivideActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); - } - - @Override - public Object getResult() { - if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { - return Double.NaN; - } - return (EcmaScript.toNumber(leftSide.getResult())) / (EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionDivide()); - } - - @Override - public GraphTargetItem returnType() { - return new UnboundedTypeItem(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionDivide; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.List; + +public class DivideActionItem extends BinaryOpItem { + + public DivideActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/"); + } + + @Override + public Object getResult() { + if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { + return Double.NaN; + } + return (EcmaScript.toNumber(leftSide.getResult())) / (EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionDivide()); + } + + @Override + public GraphTargetItem returnType() { + return new UnboundedTypeItem(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java similarity index 71% rename from src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java index e6203030e..1dd3e6987 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/EqActionItem.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class EqActionItem extends BinaryOpItem implements LogicalOpItem { - - boolean version2; - - public EqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); - this.version2 = version2; - } - - @Override - public Object getResult() { - if (version2) { - return EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); - } else { - //For SWF 4 and older, it should return 1 or 0 - return (Action.toFloatPoint(leftSide.getResult()) == Action.toFloatPoint(rightSide.getResult())); - } - } - - @Override - public GraphTargetItem invert() { - return new NeqActionItem(src, leftSide, rightSide, version2); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionEquals2()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class EqActionItem extends BinaryOpItem implements LogicalOpItem { + + boolean version2; + + public EqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "=="); + this.version2 = version2; + } + + @Override + public Object getResult() { + if (version2) { + return EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); + } else { + //For SWF 4 and older, it should return 1 or 0 + return (Action.toFloatPoint(leftSide.getResult()) == Action.toFloatPoint(rightSide.getResult())); + } + } + + @Override + public GraphTargetItem invert() { + return new NeqActionItem(src, leftSide, rightSide, version2); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionEquals2()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java index df74299c0..bccd42059 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GeActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java similarity index 73% rename from src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java index 6bd8ee069..e660b69e5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/GtActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java similarity index 51% rename from src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java index f47e3c529..b1f437701 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InActionItem.java @@ -1,41 +1,40 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.action.model.ActionItem; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.Set; - -public class InActionItem extends BinaryOpItem { - - public InActionItem(GraphSourceItem instruction, ActionItem name, ActionItem object) { - super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.Set; + +public class InActionItem extends BinaryOpItem { + + public InActionItem(GraphSourceItem instruction, ActionItem name, ActionItem object) { + super(instruction, PRECEDENCE_RELATIONAL, name, object, "in"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java index 669413465..682c31800 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/InstanceOfActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf6.ActionInstanceOf; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; -import java.util.Set; - -public class InstanceOfActionItem extends BinaryOpItem { - - public InstanceOfActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem type) { - super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionInstanceOf()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf6.ActionInstanceOf; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; +import java.util.Set; + +public class InstanceOfActionItem extends BinaryOpItem { + + public InstanceOfActionItem(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem type) { + super(instruction, PRECEDENCE_RELATIONAL, value, type, "instanceof"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionInstanceOf()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java new file mode 100644 index 000000000..9e431928f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public interface Inverted { + + public GraphTargetItem invert(); +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java index 3c9105f84..316ee6cb5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionBitLShift; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class LShiftActionItem extends BinaryOpItem { - - public LShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); - } - - @Override - public Object getResult() { - return ((int) (double) EcmaScript.toNumber(leftSide.getResult())) << ((int) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitLShift()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionBitLShift; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class LShiftActionItem extends BinaryOpItem { + + public LShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<"); + } + + @Override + public Object getResult() { + return ((int) (double) EcmaScript.toNumber(leftSide.getResult())) << ((int) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitLShift()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java similarity index 77% rename from src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java index 695bdf09f..6814407ee 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LeActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java index ee6723755..0594c56f3 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LtActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java similarity index 66% rename from src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java index 453b381cd..86c7beb19 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionModulo; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class ModuloActionItem extends BinaryOpItem { - - public ModuloActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); - } - - @Override - public Object getResult() { - if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { - return Double.NaN; - } - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) % ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionModulo()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionModulo; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class ModuloActionItem extends BinaryOpItem { + + public ModuloActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%"); + } + + @Override + public Object getResult() { + if (Double.compare(EcmaScript.toNumber(rightSide.getResult()), 0) == 0) { + return Double.NaN; + } + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) % ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionModulo()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java index 3693424d9..cfb8d3dae 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionMultiply; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class MultiplyActionItem extends BinaryOpItem { - - public MultiplyActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); - } - - @Override - public Object getResult() { - return (EcmaScript.toNumber(leftSide.getResult())) * (EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionMultiply()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionMultiply; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class MultiplyActionItem extends BinaryOpItem { + + public MultiplyActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*"); + } + + @Override + public Object getResult() { + return (EcmaScript.toNumber(leftSide.getResult())) * (EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionMultiply()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java similarity index 72% rename from src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java index 068c9bf75..7ae0a57e5 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/NeqActionItem.java @@ -1,66 +1,65 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.swf4.ActionNot; -import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class NeqActionItem extends BinaryOpItem implements LogicalOpItem, Inverted { - - boolean version2; - - public NeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); - this.version2 = version2; - } - - @Override - public Object getResult() { - if (version2) { - return !EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); - } else { - //For SWF 4 and older, it should return 1 or 0 - return (Action.toFloatPoint(leftSide.getResult()) != Action.toFloatPoint(rightSide.getResult())); - } - } - - @Override - public GraphTargetItem invert() { - return new EqActionItem(src, leftSide, rightSide, version2); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionEquals2(), new ActionNot()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class NeqActionItem extends BinaryOpItem implements LogicalOpItem, Inverted { + + boolean version2; + + public NeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide, boolean version2) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!="); + this.version2 = version2; + } + + @Override + public Object getResult() { + if (version2) { + return !EcmaScript.equals(leftSide.getResult(), rightSide.getResult()); + } else { + //For SWF 4 and older, it should return 1 or 0 + return (Action.toFloatPoint(leftSide.getResult()) != Action.toFloatPoint(rightSide.getResult())); + } + } + + @Override + public GraphTargetItem invert() { + return new EqActionItem(src, leftSide, rightSide, version2); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionEquals2(), new ActionNot()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java index e31e0c6fc..b5d8f0477 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/OrActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionOr; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class OrActionItem extends BinaryOpItem { - - public OrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_LOGICALOR, leftSide, rightSide, "or"); - } - - @Override - public Object getResult() { - return EcmaScript.toBoolean(leftSide.getResult()) || EcmaScript.toBoolean(rightSide.getResult()); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionOr()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionOr; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class OrActionItem extends BinaryOpItem { + + public OrActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_LOGICALOR, leftSide, rightSide, "or"); + } + + @Override + public Object getResult() { + return EcmaScript.toBoolean(leftSide.getResult()) || EcmaScript.toBoolean(rightSide.getResult()); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionOr()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java similarity index 84% rename from src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java index eebe1d8e1..02791852d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreDecrementActionItem.java @@ -1,102 +1,101 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; -import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; -import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; -import com.jpexs.decompiler.flash.action.model.GetVariableActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; -import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; -import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import java.util.ArrayList; -import java.util.List; - -public class PreDecrementActionItem extends UnaryOpItem { - - public PreDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "--"); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(value.getResult()) - 1; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - List ret = new ArrayList<>(); - GraphTargetItem val = value; - if (val instanceof VariableActionItem) { - val = ((VariableActionItem) val).getBoxedValue(); - } - if (val instanceof GetVariableActionItem) { - GetVariableActionItem gv = (GetVariableActionItem) val; - ret.addAll(gv.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetVariable - ret.addAll(gv.toSource(localData, generator)); - ret.add(new ActionDecrement()); - int tmpReg = asGenerator.getTempRegister(localData); - ret.add(new ActionStoreRegister(tmpReg)); - ret.add(new ActionSetVariable()); - ret.add(new ActionPush(new RegisterNumber(tmpReg))); - } else if (val instanceof GetMemberActionItem) { - GetMemberActionItem mem = (GetMemberActionItem) val; - ret.addAll(mem.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetMember - ret.addAll(mem.toSource(localData, generator)); - ret.add(new ActionDecrement()); - int tmpReg = asGenerator.getTempRegister(localData); - ret.add(new ActionStoreRegister(tmpReg)); - ret.add(new ActionSetMember()); - ret.add(new ActionPush(new RegisterNumber(tmpReg))); - } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { - RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; - ret.add(new ActionPush(new RegisterNumber(rn.number))); - ret.add(new ActionDecrement()); - ret.add(new ActionStoreRegister(rn.number)); - } else if (val instanceof GetPropertyActionItem) { - GetPropertyActionItem gp = (GetPropertyActionItem) val; - ret.addAll(gp.toSource(localData, generator)); // old value - ret.addAll(gp.toSource(localData, generator)); - ret.remove(ret.size() - 1); - ret.addAll(gp.toSource(localData, generator)); - ret.add(new ActionDecrement()); - ret.add(new ActionSetProperty()); - } - return ret; - } - - @Override - public GraphTargetItem returnType() { - return value.returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; +import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; +import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; +import com.jpexs.decompiler.flash.action.model.GetVariableActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import java.util.ArrayList; +import java.util.List; + +public class PreDecrementActionItem extends UnaryOpItem { + + public PreDecrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_UNARY, object, "--"); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(value.getResult()) - 1; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + List ret = new ArrayList<>(); + GraphTargetItem val = value; + if (val instanceof VariableActionItem) { + val = ((VariableActionItem) val).getBoxedValue(); + } + if (val instanceof GetVariableActionItem) { + GetVariableActionItem gv = (GetVariableActionItem) val; + ret.addAll(gv.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetVariable + ret.addAll(gv.toSource(localData, generator)); + ret.add(new ActionDecrement()); + int tmpReg = asGenerator.getTempRegister(localData); + ret.add(new ActionStoreRegister(tmpReg)); + ret.add(new ActionSetVariable()); + ret.add(new ActionPush(new RegisterNumber(tmpReg))); + } else if (val instanceof GetMemberActionItem) { + GetMemberActionItem mem = (GetMemberActionItem) val; + ret.addAll(mem.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetMember + ret.addAll(mem.toSource(localData, generator)); + ret.add(new ActionDecrement()); + int tmpReg = asGenerator.getTempRegister(localData); + ret.add(new ActionStoreRegister(tmpReg)); + ret.add(new ActionSetMember()); + ret.add(new ActionPush(new RegisterNumber(tmpReg))); + } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { + RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; + ret.add(new ActionPush(new RegisterNumber(rn.number))); + ret.add(new ActionDecrement()); + ret.add(new ActionStoreRegister(rn.number)); + } else if (val instanceof GetPropertyActionItem) { + GetPropertyActionItem gp = (GetPropertyActionItem) val; + ret.addAll(gp.toSource(localData, generator)); // old value + ret.addAll(gp.toSource(localData, generator)); + ret.remove(ret.size() - 1); + ret.addAll(gp.toSource(localData, generator)); + ret.add(new ActionDecrement()); + ret.add(new ActionSetProperty()); + } + return ret; + } + + @Override + public GraphTargetItem returnType() { + return value.returnType(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java similarity index 84% rename from src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java index fbfb19ce9..1af977fdb 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/PreIncrementActionItem.java @@ -1,102 +1,101 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; -import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; -import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; -import com.jpexs.decompiler.flash.action.model.GetVariableActionItem; -import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; -import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionPush; -import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; -import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; -import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; -import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.UnaryOpItem; -import java.util.ArrayList; -import java.util.List; - -public class PreIncrementActionItem extends UnaryOpItem { - - public PreIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, PRECEDENCE_UNARY, object, "++"); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(value.getResult()) + 1; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - List ret = new ArrayList<>(); - GraphTargetItem val = value; - if (val instanceof VariableActionItem) { - val = ((VariableActionItem) val).getBoxedValue(); - } - if (val instanceof GetVariableActionItem) { - GetVariableActionItem gv = (GetVariableActionItem) val; - ret.addAll(gv.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetVariable - ret.addAll(gv.toSource(localData, generator)); - ret.add(new ActionIncrement()); - int tmpReg = asGenerator.getTempRegister(localData); - ret.add(new ActionStoreRegister(tmpReg)); - ret.add(new ActionSetVariable()); - ret.add(new ActionPush(new RegisterNumber(tmpReg))); - } else if (val instanceof GetMemberActionItem) { - GetMemberActionItem mem = (GetMemberActionItem) val; - ret.addAll(mem.toSource(localData, generator)); - ret.remove(ret.size() - 1); //ActionGetMember - ret.addAll(mem.toSource(localData, generator)); - ret.add(new ActionIncrement()); - int tmpReg = asGenerator.getTempRegister(localData); - ret.add(new ActionStoreRegister(tmpReg)); - ret.add(new ActionSetMember()); - ret.add(new ActionPush(new RegisterNumber(tmpReg))); - } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { - RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; - ret.add(new ActionPush(new RegisterNumber(rn.number))); - ret.add(new ActionIncrement()); - ret.add(new ActionStoreRegister(rn.number)); - } else if (val instanceof GetPropertyActionItem) { - GetPropertyActionItem gp = (GetPropertyActionItem) val; - ret.addAll(gp.toSource(localData, generator)); // old value - ret.addAll(gp.toSource(localData, generator)); - ret.remove(ret.size() - 1); - ret.addAll(gp.toSource(localData, generator)); - ret.add(new ActionIncrement()); - ret.add(new ActionSetProperty()); - } - return ret; - } - - @Override - public GraphTargetItem returnType() { - return value.returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; +import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; +import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; +import com.jpexs.decompiler.flash.action.model.GetVariableActionItem; +import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator; +import com.jpexs.decompiler.flash.action.parser.script.VariableActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.UnaryOpItem; +import java.util.ArrayList; +import java.util.List; + +public class PreIncrementActionItem extends UnaryOpItem { + + public PreIncrementActionItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, PRECEDENCE_UNARY, object, "++"); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(value.getResult()) + 1; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; + List ret = new ArrayList<>(); + GraphTargetItem val = value; + if (val instanceof VariableActionItem) { + val = ((VariableActionItem) val).getBoxedValue(); + } + if (val instanceof GetVariableActionItem) { + GetVariableActionItem gv = (GetVariableActionItem) val; + ret.addAll(gv.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetVariable + ret.addAll(gv.toSource(localData, generator)); + ret.add(new ActionIncrement()); + int tmpReg = asGenerator.getTempRegister(localData); + ret.add(new ActionStoreRegister(tmpReg)); + ret.add(new ActionSetVariable()); + ret.add(new ActionPush(new RegisterNumber(tmpReg))); + } else if (val instanceof GetMemberActionItem) { + GetMemberActionItem mem = (GetMemberActionItem) val; + ret.addAll(mem.toSource(localData, generator)); + ret.remove(ret.size() - 1); //ActionGetMember + ret.addAll(mem.toSource(localData, generator)); + ret.add(new ActionIncrement()); + int tmpReg = asGenerator.getTempRegister(localData); + ret.add(new ActionStoreRegister(tmpReg)); + ret.add(new ActionSetMember()); + ret.add(new ActionPush(new RegisterNumber(tmpReg))); + } else if ((val instanceof DirectValueActionItem) && ((DirectValueActionItem) val).value instanceof RegisterNumber) { + RegisterNumber rn = (RegisterNumber) ((DirectValueActionItem) val).value; + ret.add(new ActionPush(new RegisterNumber(rn.number))); + ret.add(new ActionIncrement()); + ret.add(new ActionStoreRegister(rn.number)); + } else if (val instanceof GetPropertyActionItem) { + GetPropertyActionItem gp = (GetPropertyActionItem) val; + ret.addAll(gp.toSource(localData, generator)); // old value + ret.addAll(gp.toSource(localData, generator)); + ret.remove(ret.size() - 1); + ret.addAll(gp.toSource(localData, generator)); + ret.add(new ActionIncrement()); + ret.add(new ActionSetProperty()); + } + return ret; + } + + @Override + public GraphTargetItem returnType() { + return value.returnType(); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java index 11067f76f..418968e73 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionBitRShift; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class RShiftActionItem extends BinaryOpItem { - - public RShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitRShift()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionBitRShift; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class RShiftActionItem extends BinaryOpItem { + + public RShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitRShift()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java index 2493f00b7..dcf00d25b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictEqActionItem.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class StrictEqActionItem extends BinaryOpItem implements LogicalOpItem { - - public StrictEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); - } - - @Override - public Object getResult() { - Object x = leftSide.getResult(); - Object y = rightSide.getResult(); - return EcmaScript.type(x) == EcmaScript.type(y) - && EcmaScript.equals(x, y); - } - - @Override - public GraphTargetItem invert() { - return new StrictNeqActionItem(src, leftSide, rightSide); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStrictEquals()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class StrictEqActionItem extends BinaryOpItem implements LogicalOpItem { + + public StrictEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "==="); + } + + @Override + public Object getResult() { + Object x = leftSide.getResult(); + Object y = rightSide.getResult(); + return EcmaScript.type(x) == EcmaScript.type(y) + && EcmaScript.equals(x, y); + } + + @Override + public GraphTargetItem invert() { + return new StrictNeqActionItem(src, leftSide, rightSide); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStrictEquals()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java similarity index 69% rename from src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java index b27b9255f..64bad19ea 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StrictNeqActionItem.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionNot; -import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LogicalOpItem; -import java.util.List; - -public class StrictNeqActionItem extends BinaryOpItem implements LogicalOpItem { - - public StrictNeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); - } - - @Override - public Object getResult() { - Object x = leftSide.getResult(); - Object y = rightSide.getResult(); - return EcmaScript.type(x) != EcmaScript.type(y) - || (!EcmaScript.equals(x, y)); - } - - @Override - public GraphTargetItem invert() { - return new StrictEqActionItem(src, leftSide, rightSide); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStrictEquals(), new ActionNot()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LogicalOpItem; +import java.util.List; + +public class StrictNeqActionItem extends BinaryOpItem implements LogicalOpItem { + + public StrictNeqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=="); + } + + @Override + public Object getResult() { + Object x = leftSide.getResult(); + Object y = rightSide.getResult(); + return EcmaScript.type(x) != EcmaScript.type(y) + || (!EcmaScript.equals(x, y)); + } + + @Override + public GraphTargetItem invert() { + return new StrictEqActionItem(src, leftSide, rightSide); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStrictEquals(), new ActionNot()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java index 5807b7fb8..4c45a436d 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringAddActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionStringAdd; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; -import java.util.Set; - -public class StringAddActionItem extends BinaryOpItem { - - public StringAddActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "add"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringAdd()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionStringAdd; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; +import java.util.Set; + +public class StringAddActionItem extends BinaryOpItem { + + public StringAddActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "add"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringAdd()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java index 2a814318f..c0f70e1e1 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringEqActionItem.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; -import java.util.Set; - -public class StringEqActionItem extends BinaryOpItem implements Inverted { - - public StringEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "eq"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringEquals()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } - - @Override - public GraphTargetItem invert() { - return new StringNeActionItem(src, leftSide, rightSide); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; +import java.util.Set; + +public class StringEqActionItem extends BinaryOpItem implements Inverted { + + public StringEqActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "eq"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringEquals()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } + + @Override + public GraphTargetItem invert() { + return new StringNeActionItem(src, leftSide, rightSide); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java index 6c5271f58..0f0d8f06f 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGeActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java similarity index 72% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java index 008d3b926..dc0063edc 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringGtActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java similarity index 73% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java index daf586822..7bab7e48e 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLeActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java similarity index 67% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java index 0499fdefd..403c72045 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringLtActionItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java similarity index 66% rename from src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java index 71bffcff9..832325e4a 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/StringNeActionItem.java @@ -1,56 +1,55 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf4.ActionNot; -import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; -import java.util.Set; - -public class StringNeActionItem extends BinaryOpItem implements Inverted { - - public StringNeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "ne"); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringEquals(), new ActionNot()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } - - @Override - public GraphTargetItem invert() { - return new StringEqActionItem(src, leftSide, rightSide); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; +import java.util.Set; + +public class StringNeActionItem extends BinaryOpItem implements Inverted { + + public StringNeActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_EQUALITY, leftSide, rightSide, "ne"); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringEquals(), new ActionNot()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } + + @Override + public GraphTargetItem invert() { + return new StringEqActionItem(src, leftSide, rightSide); + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java similarity index 79% rename from src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java index 0a4c78d18..439ab6e4b 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java @@ -1,86 +1,85 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; -import com.jpexs.decompiler.flash.action.swf4.ActionSubtract; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.List; - -public class SubtractActionItem extends BinaryOpItem { - - public SubtractActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); - } - - @Override - public Object getResult() { - return EcmaScript.toNumber(leftSide.getResult()) - EcmaScript.toNumber(rightSide.getResult()); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if ((leftSide instanceof DirectValueActionItem) - && (((((DirectValueActionItem) leftSide).value instanceof Float) && (((Float) ((DirectValueActionItem) leftSide).value) == 0f)) - || ((((DirectValueActionItem) leftSide).value instanceof Double) && (((Double) ((DirectValueActionItem) leftSide).value) == 0.0)) - || ((((DirectValueActionItem) leftSide).value instanceof Long) && (((Long) ((DirectValueActionItem) leftSide).value) == 0L)))) { - writer.append(operator); - writer.append(" "); - rightSide.appendTo(writer, localData); - return writer; - } else { - if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too - - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - writer.append(" "); - writer.append(operator); - writer.append(" "); - - writer.append("("); - rightSide.toString(writer, localData); - return writer.append(")"); - } else { - return super.appendTo(writer, localData); - } - } - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionSubtract()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; +import com.jpexs.decompiler.flash.action.swf4.ActionSubtract; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.List; + +public class SubtractActionItem extends BinaryOpItem { + + public SubtractActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-"); + } + + @Override + public Object getResult() { + return EcmaScript.toNumber(leftSide.getResult()) - EcmaScript.toNumber(rightSide.getResult()); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if ((leftSide instanceof DirectValueActionItem) + && (((((DirectValueActionItem) leftSide).value instanceof Float) && (((Float) ((DirectValueActionItem) leftSide).value) == 0f)) + || ((((DirectValueActionItem) leftSide).value instanceof Double) && (((Double) ((DirectValueActionItem) leftSide).value) == 0.0)) + || ((((DirectValueActionItem) leftSide).value instanceof Long) && (((Long) ((DirectValueActionItem) leftSide).value) == 0L)))) { + writer.append(operator); + writer.append(" "); + rightSide.appendTo(writer, localData); + return writer; + } else { + if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too + + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + writer.append(" "); + writer.append(operator); + writer.append(" "); + + writer.append("("); + rightSide.toString(writer, localData); + return writer.append(")"); + } else { + return super.appendTo(writer, localData); + } + } + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionSubtract()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java index c156d6373..77791fe51 100644 --- a/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.swf5.ActionBitURShift; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import com.jpexs.decompiler.graph.model.BinaryOpItem; -import java.util.List; - -public class URShiftActionItem extends BinaryOpItem { - - public URShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); - } - - @Override - public Object getResult() { - return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >>> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitURShift()); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.model.operations; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.swf5.ActionBitURShift; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import java.util.List; + +public class URShiftActionItem extends BinaryOpItem { + + public URShiftActionItem(GraphSourceItem instruction, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(instruction, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>"); + } + + @Override + public Object getResult() { + return ((long) (double) EcmaScript.toNumber(leftSide.getResult())) >>> ((long) (double) EcmaScript.toNumber(rightSide.getResult())); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSourceMerge(localData, generator, leftSide, rightSide, new ActionBitURShift()); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ParseException.java new file mode 100644 index 000000000..ed3575f13 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/ParseException.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser; + +public class ParseException extends Exception { + + public long line; + public String text; + + public ParseException(String text, long line) { + super("ParseException:" + text + " on line " + line); + this.line = line; + this.text = text; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java similarity index 60% rename from src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java index f1afa0586..9fe983900 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParsedSymbol.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.pcode; - -public class ASMParsedSymbol { - - public int type; - public Object value; - public static final int TYPE_STRING = 1; - public static final int TYPE_BLOCK_END = 2; - public static final int TYPE_INSTRUCTION_NAME = 3; - public static final int TYPE_INTEGER = 4; - public static final int TYPE_FLOAT = 5; - public static final int TYPE_BOOLEAN = 11; - public static final int TYPE_IDENTIFIER = 6; - public static final int TYPE_EOF = 7; - public static final int TYPE_LABEL = 8; - public static final int TYPE_COMMENT = 9; - public static final int TYPE_BLOCK_START = 10; - public static final int TYPE_REGISTER = 12; - public static final int TYPE_CONSTANT = 13; - public static final int TYPE_NULL = 14; - public static final int TYPE_UNDEFINED = 15; - public static final int TYPE_EOL = 16; - public static final int TYPE_CONSTANT_LITERAL = 17; - - public ASMParsedSymbol(int type, Object value) { - this.type = type; - this.value = value; - } - - public ASMParsedSymbol(int type) { - this.type = type; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.pcode; + +public class ASMParsedSymbol { + + public int type; + public Object value; + public static final int TYPE_STRING = 1; + public static final int TYPE_BLOCK_END = 2; + public static final int TYPE_INSTRUCTION_NAME = 3; + public static final int TYPE_INTEGER = 4; + public static final int TYPE_FLOAT = 5; + public static final int TYPE_BOOLEAN = 11; + public static final int TYPE_IDENTIFIER = 6; + public static final int TYPE_EOF = 7; + public static final int TYPE_LABEL = 8; + public static final int TYPE_COMMENT = 9; + public static final int TYPE_BLOCK_START = 10; + public static final int TYPE_REGISTER = 12; + public static final int TYPE_CONSTANT = 13; + public static final int TYPE_NULL = 14; + public static final int TYPE_UNDEFINED = 15; + public static final int TYPE_EOL = 16; + public static final int TYPE_CONSTANT_LITERAL = 17; + + public ASMParsedSymbol(int type, Object value) { + this.type = type; + this.value = value; + } + + public ASMParsedSymbol(int type) { + this.type = type; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java similarity index 97% rename from src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java index b69a4ebaf..2b70f1caf 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.parser.pcode; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java similarity index 95% rename from src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java index e8c32b5b5..072054f7d 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java @@ -1,1064 +1,1060 @@ -/* The following code was generated by JFlex 1.4.3 on 12.4.13 19:32 */ - -/* Flash assembler language lexer specification */ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.pcode; - -import com.jpexs.decompiler.flash.action.parser.ParseException; -import com.jpexs.decompiler.flash.action.swf4.ConstantIndex; -import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; -import com.jpexs.decompiler.flash.ecma.Null; -import com.jpexs.decompiler.flash.ecma.Undefined; - -/** - * This class is a scanner generated by - * JFlex 1.4.3 on 12.4.13 19:32 from the - * specification file - * D:/Dokumenty/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex - */ -public final class FlasmLexer { - - /** - * This character denotes the end of file - */ - public static final int YYEOF = -1; - /** - * initial size of the lookahead buffer - */ - private static final int ZZ_BUFFERSIZE = 16384; - /** - * lexical states - */ - public static final int STRING = 2; - public static final int YYINITIAL = 0; - public static final int PARAMETERS = 4; - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the - * beginning of a line l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1, 2, 2 - }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED - = "\11\6\1\4\1\2\1\0\1\4\1\1\16\6\4\0\1\4\1\0" - + "\1\45\1\0\1\5\2\0\1\47\3\0\1\37\1\0\1\30\1\35" - + "\1\0\1\33\3\50\4\40\2\11\1\12\1\3\5\0\4\7\1\36" - + "\3\7\1\31\4\7\1\34\14\7\1\0\1\41\2\0\1\10\1\0" - + "\1\22\1\46\1\43\1\26\1\20\1\21\1\42\1\7\1\27\2\7" - + "\1\23\1\7\1\25\1\44\2\7\1\16\1\24\1\15\1\17\3\7" - + "\1\32\1\7\1\13\1\0\1\14\1\0\41\6\2\0\4\5\4\0" - + "\1\5\2\0\1\6\7\0\1\5\4\0\1\5\5\0\27\5\1\0" - + "\37\5\1\0\u01ca\5\4\0\14\5\16\0\5\5\7\0\1\5\1\0" - + "\1\5\21\0\160\6\5\5\1\0\2\5\2\0\4\5\10\0\1\5" - + "\1\0\3\5\1\0\1\5\1\0\24\5\1\0\123\5\1\0\213\5" - + "\1\0\5\6\2\0\236\5\11\0\46\5\2\0\1\5\7\0\47\5" - + "\11\0\55\6\1\0\1\6\1\0\2\6\1\0\2\6\1\0\1\6" - + "\10\0\33\5\5\0\3\5\15\0\4\6\7\0\1\5\4\0\13\6" - + "\5\0\53\5\37\6\4\0\2\5\1\6\143\5\1\0\1\5\10\6" - + "\1\0\6\6\2\5\2\6\1\0\4\6\2\5\12\6\3\5\2\0" - + "\1\5\17\0\1\6\1\5\1\6\36\5\33\6\2\0\131\5\13\6" - + "\1\5\16\0\12\6\41\5\11\6\2\5\4\0\1\5\5\0\26\5" - + "\4\6\1\5\11\6\1\5\3\6\1\5\5\6\22\0\31\5\3\6" - + "\244\0\4\6\66\5\3\6\1\5\22\6\1\5\7\6\12\5\2\6" - + "\2\0\12\6\1\0\7\5\1\0\7\5\1\0\3\6\1\0\10\5" - + "\2\0\2\5\2\0\26\5\1\0\7\5\1\0\1\5\3\0\4\5" - + "\2\0\1\6\1\5\7\6\2\0\2\6\2\0\3\6\1\5\10\0" - + "\1\6\4\0\2\5\1\0\3\5\2\6\2\0\12\6\4\5\7\0" - + "\1\5\5\0\3\6\1\0\6\5\4\0\2\5\2\0\26\5\1\0" - + "\7\5\1\0\2\5\1\0\2\5\1\0\2\5\2\0\1\6\1\0" - + "\5\6\4\0\2\6\2\0\3\6\3\0\1\6\7\0\4\5\1\0" - + "\1\5\7\0\14\6\3\5\1\6\13\0\3\6\1\0\11\5\1\0" - + "\3\5\1\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5\2\0" - + "\1\6\1\5\10\6\1\0\3\6\1\0\3\6\2\0\1\5\17\0" - + "\2\5\2\6\2\0\12\6\1\0\1\5\17\0\3\6\1\0\10\5" - + "\2\0\2\5\2\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5" - + "\2\0\1\6\1\5\7\6\2\0\2\6\2\0\3\6\10\0\2\6" - + "\4\0\2\5\1\0\3\5\2\6\2\0\12\6\1\0\1\5\20\0" - + "\1\6\1\5\1\0\6\5\3\0\3\5\1\0\4\5\3\0\2\5" - + "\1\0\1\5\1\0\2\5\3\0\2\5\3\0\3\5\3\0\14\5" - + "\4\0\5\6\3\0\3\6\1\0\4\6\2\0\1\5\6\0\1\6" - + "\16\0\12\6\11\0\1\5\7\0\3\6\1\0\10\5\1\0\3\5" - + "\1\0\27\5\1\0\12\5\1\0\5\5\3\0\1\5\7\6\1\0" - + "\3\6\1\0\4\6\7\0\2\6\1\0\2\5\6\0\2\5\2\6" - + "\2\0\12\6\22\0\2\6\1\0\10\5\1\0\3\5\1\0\27\5" - + "\1\0\12\5\1\0\5\5\2\0\1\6\1\5\7\6\1\0\3\6" - + "\1\0\4\6\7\0\2\6\7\0\1\5\1\0\2\5\2\6\2\0" - + "\12\6\1\0\2\5\17\0\2\6\1\0\10\5\1\0\3\5\1\0" - + "\51\5\2\0\1\5\7\6\1\0\3\6\1\0\4\6\1\5\10\0" - + "\1\6\10\0\2\5\2\6\2\0\12\6\12\0\6\5\2\0\2\6" - + "\1\0\22\5\3\0\30\5\1\0\11\5\1\0\1\5\2\0\7\5" - + "\3\0\1\6\4\0\6\6\1\0\1\6\1\0\10\6\22\0\2\6" - + "\15\0\60\5\1\6\2\5\7\6\4\0\10\5\10\6\1\0\12\6" - + "\47\0\2\5\1\0\1\5\2\0\2\5\1\0\1\5\2\0\1\5" - + "\6\0\4\5\1\0\7\5\1\0\3\5\1\0\1\5\1\0\1\5" - + "\2\0\2\5\1\0\4\5\1\6\2\5\6\6\1\0\2\6\1\5" - + "\2\0\5\5\1\0\1\5\1\0\6\6\2\0\12\6\2\0\2\5" - + "\42\0\1\5\27\0\2\6\6\0\12\6\13\0\1\6\1\0\1\6" - + "\1\0\1\6\4\0\2\6\10\5\1\0\44\5\4\0\24\6\1\0" - + "\2\6\5\5\13\6\1\0\44\6\11\0\1\6\71\0\53\5\24\6" - + "\1\5\12\6\6\0\6\5\4\6\4\5\3\6\1\5\3\6\2\5" - + "\7\6\3\5\4\6\15\5\14\6\1\5\17\6\2\0\46\5\12\0" - + "\53\5\1\0\1\5\3\0\u0149\5\1\0\4\5\2\0\7\5\1\0" - + "\1\5\1\0\4\5\2\0\51\5\1\0\4\5\2\0\41\5\1\0" - + "\4\5\2\0\7\5\1\0\1\5\1\0\4\5\2\0\17\5\1\0" - + "\71\5\1\0\4\5\2\0\103\5\2\0\3\6\40\0\20\5\20\0" - + "\125\5\14\0\u026c\5\2\0\21\5\1\0\32\5\5\0\113\5\3\0" - + "\3\5\17\0\15\5\1\0\4\5\3\6\13\0\22\5\3\6\13\0" - + "\22\5\2\6\14\0\15\5\1\0\3\5\1\0\2\6\14\0\64\5" - + "\40\6\3\0\1\5\3\0\2\5\1\6\2\0\12\6\41\0\3\6" - + "\2\0\12\6\6\0\130\5\10\0\51\5\1\6\1\5\5\0\106\5" - + "\12\0\35\5\3\0\14\6\4\0\14\6\12\0\12\6\36\5\2\0" - + "\5\5\13\0\54\5\4\0\21\6\7\5\2\6\6\0\12\6\46\0" - + "\27\5\5\6\4\0\65\5\12\6\1\0\35\6\2\0\13\6\6\0" - + "\12\6\15\0\1\5\130\0\5\6\57\5\21\6\7\5\4\0\12\6" - + "\21\0\11\6\14\0\3\6\36\5\12\6\3\0\2\5\12\6\6\0" - + "\46\5\16\6\14\0\44\5\24\6\10\0\12\6\3\0\3\5\12\6" - + "\44\5\122\0\3\6\1\0\25\6\4\5\1\6\4\5\1\6\15\0" - + "\300\5\47\6\25\0\4\6\u0116\5\2\0\6\5\2\0\46\5\2\0" - + "\6\5\2\0\10\5\1\0\1\5\1\0\1\5\1\0\1\5\1\0" - + "\37\5\2\0\65\5\1\0\7\5\1\0\1\5\3\0\3\5\1\0" - + "\7\5\3\0\4\5\2\0\6\5\4\0\15\5\5\0\3\5\1\0" - + "\7\5\16\0\5\6\32\0\5\6\20\0\2\5\23\0\1\5\13\0" - + "\5\6\5\0\6\6\1\0\1\5\15\0\1\5\20\0\15\5\3\0" - + "\32\5\26\0\15\6\4\0\1\6\3\0\14\6\21\0\1\5\4\0" - + "\1\5\2\0\12\5\1\0\1\5\3\0\5\5\6\0\1\5\1\0" - + "\1\5\1\0\1\5\1\0\4\5\1\0\13\5\2\0\4\5\5\0" - + "\5\5\4\0\1\5\21\0\51\5\u0a77\0\57\5\1\0\57\5\1\0" - + "\205\5\6\0\4\5\3\6\16\0\46\5\12\0\66\5\11\0\1\5" - + "\17\0\1\6\27\5\11\0\7\5\1\0\7\5\1\0\7\5\1\0" - + "\7\5\1\0\7\5\1\0\7\5\1\0\7\5\1\0\7\5\1\0" - + "\40\6\57\0\1\5\u01d5\0\3\5\31\0\11\5\6\6\1\0\5\5" - + "\2\0\5\5\4\0\126\5\2\0\2\6\2\0\3\5\1\0\132\5" - + "\1\0\4\5\5\0\51\5\3\0\136\5\21\0\33\5\65\0\20\5" - + "\u0200\0\u19b6\5\112\0\u51cc\5\64\0\u048d\5\103\0\56\5\2\0\u010d\5" - + "\3\0\20\5\12\6\2\5\24\0\57\5\1\6\14\0\2\6\1\0" - + "\31\5\10\0\120\5\2\6\45\0\11\5\2\0\147\5\2\0\4\5" - + "\1\0\2\5\16\0\12\5\120\0\10\5\1\6\3\5\1\6\4\5" - + "\1\6\27\5\5\6\20\0\1\5\7\0\64\5\14\0\2\6\62\5" - + "\21\6\13\0\12\6\6\0\22\6\6\5\3\0\1\5\4\0\12\6" - + "\34\5\10\6\2\0\27\5\15\6\14\0\35\5\3\0\4\6\57\5" - + "\16\6\16\0\1\5\12\6\46\0\51\5\16\6\11\0\3\5\1\6" - + "\10\5\2\6\2\0\12\6\6\0\27\5\3\0\1\5\1\6\4\0" - + "\60\5\1\6\1\5\3\6\2\5\2\6\5\5\2\6\1\5\1\6" - + "\1\5\30\0\3\5\43\0\6\5\2\0\6\5\2\0\6\5\11\0" - + "\7\5\1\0\7\5\221\0\43\5\10\6\1\0\2\6\2\0\12\6" - + "\6\0\u2ba4\5\14\0\27\5\4\0\61\5\u2104\0\u012e\5\2\0\76\5" - + "\2\0\152\5\46\0\7\5\14\0\5\5\5\0\1\5\1\6\12\5" - + "\1\0\15\5\1\0\5\5\1\0\1\5\1\0\2\5\1\0\2\5" - + "\1\0\154\5\41\0\u016b\5\22\0\100\5\2\0\66\5\50\0\15\5" - + "\3\0\20\6\20\0\7\6\14\0\2\5\30\0\3\5\31\0\1\5" - + "\6\0\5\5\1\0\207\5\2\0\1\6\4\0\1\5\13\0\12\6" - + "\7\0\32\5\4\0\1\5\1\0\32\5\13\0\131\5\3\0\6\5" - + "\2\0\6\5\2\0\6\5\2\0\3\5\3\0\2\5\3\0\2\5" - + "\22\0\3\6\4\0"; - /** - * Translates characters to character classes - */ - private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - /** - * Translates DFA states to action switch labels. - */ - private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 - = "\3\0\3\1\1\2\1\3\1\4\2\5\1\1\1\6" - + "\2\7\1\10\1\11\1\12\1\13\5\11\1\1\1\11" - + "\1\12\1\11\1\1\1\11\1\14\1\0\1\15\1\16" - + "\1\17\1\20\1\21\1\22\2\23\1\24\1\25\1\26" - + "\1\27\1\0\1\30\5\11\1\12\1\0\1\12\1\11" - + "\1\30\2\11\1\23\1\30\1\0\5\11\1\0\1\11" - + "\1\30\1\11\1\31\3\11\1\32\1\0\4\11\1\33" - + "\1\0\4\11\1\0\4\11\1\0\4\11\1\0\1\11" - + "\2\34\1\35\1\30\2\36"; - - private static int[] zzUnpackAction() { - int[] result = new int[104]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /** - * Translates a state to a row index in the transition table - */ - private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 - = "\0\0\0\51\0\122\0\173\0\244\0\315\0\366\0\173" - + "\0\u011f\0\u0148\0\173\0\u0171\0\173\0\u019a\0\173\0\u01c3" - + "\0\u01ec\0\u0215\0\173\0\u023e\0\u0267\0\u0290\0\u02b9\0\u02e2" - + "\0\u030b\0\u0334\0\u035d\0\u0386\0\u03af\0\u03d8\0\173\0\315" - + "\0\173\0\173\0\173\0\173\0\173\0\173\0\u0401\0\u042a" - + "\0\173\0\173\0\173\0\173\0\u0453\0\u047c\0\u04a5\0\u04ce" - + "\0\u04f7\0\u0520\0\u0549\0\u0572\0\u059b\0\173\0\u05c4\0\u035d" - + "\0\u05ed\0\u0616\0\173\0\u063f\0\u063f\0\u0668\0\u0691\0\u06ba" - + "\0\u06e3\0\u070c\0\u0735\0\u075e\0\u01ec\0\u0787\0\u01ec\0\u07b0" - + "\0\u07d9\0\u0802\0\u01ec\0\u082b\0\u0854\0\u087d\0\u08a6\0\u08cf" - + "\0\u01ec\0\u08f8\0\u0921\0\u094a\0\u0973\0\u099c\0\u09c5\0\u09ee" - + "\0\u0a17\0\u0a40\0\u0a69\0\u0a92\0\u0abb\0\u0ae4\0\u0b0d\0\u0b36" - + "\0\u0b5f\0\u0b88\0\u0bb1\0\u01ec\0\u01ec\0\173\0\u0bda\0\u01ec"; - - private static int[] zzUnpackRowMap() { - int[] result = new int[104]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - /** - * The transition table of the DFA - */ - private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 - = "\4\4\1\5\1\6\1\4\1\7\1\6\3\4\1\10" - + "\13\7\1\4\2\7\1\4\1\7\1\4\1\7\3\4" - + "\3\7\1\4\1\7\2\4\1\11\1\12\1\13\36\11" - + "\1\14\3\11\1\15\3\11\1\4\1\16\1\17\1\20" - + "\1\4\1\21\1\4\2\21\1\22\1\4\1\23\1\4" - + "\1\24\1\25\1\26\1\21\1\27\3\21\1\30\2\21" - + "\1\31\1\32\1\21\1\33\1\34\1\35\1\21\1\4" - + "\1\22\1\4\1\21\1\36\1\21\1\37\1\21\1\4" - + "\1\22\55\0\1\5\51\0\5\40\1\41\2\0\13\40" - + "\1\0\4\40\1\0\1\40\1\0\1\40\1\0\3\40" - + "\1\0\1\40\1\0\1\40\5\0\2\40\3\7\1\41" - + "\2\0\13\7\1\0\4\7\1\0\1\7\1\0\1\7" - + "\1\0\3\7\1\0\1\7\1\0\1\7\1\11\2\0" - + "\36\11\1\0\3\11\1\0\3\11\2\0\1\13\46\0" - + "\2\42\1\0\12\42\1\43\1\44\2\42\1\45\3\42" - + "\1\46\5\42\1\47\4\42\1\50\1\51\3\42\1\52" - + "\1\53\1\54\1\47\2\0\1\17\46\0\1\20\2\0" - + "\46\20\5\0\5\21\3\0\13\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\11\0\1\22\6\0\1\55\12\0\1\22\1\0" - + "\1\56\1\55\1\0\1\22\7\0\1\22\5\0\5\21" - + "\3\0\1\21\1\57\11\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\5\0\5\21\3\0\3\21\1\60\7\21\1\0\4\21" - + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" - + "\1\0\1\21\5\0\5\21\3\0\10\21\1\61\2\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\5\21" - + "\1\62\5\21\1\0\4\21\1\0\1\21\1\0\1\21" - + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" - + "\3\0\2\21\1\63\10\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\11\0\1\64\17\0\1\65\1\0\1\66\4\0\1\64" - + "\7\0\1\64\5\0\5\21\3\0\10\21\1\67\2\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\11\0\1\70\6\0\1\55" - + "\12\0\1\70\1\0\1\56\1\55\1\0\1\70\7\0" - + "\1\70\5\0\5\21\3\0\5\21\1\71\5\21\1\0" - + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" - + "\1\21\1\0\1\21\11\0\1\56\21\0\1\56\4\0" - + "\1\56\7\0\1\56\5\0\5\21\3\0\13\21\1\0" - + "\4\21\1\0\1\21\1\0\1\21\1\0\2\21\1\72" - + "\1\0\1\21\1\0\1\21\33\0\1\50\4\0\1\50" - + "\7\0\1\50\33\0\1\73\4\0\1\73\7\0\1\73" - + "\11\0\1\74\16\0\1\75\2\0\1\74\3\0\1\75" - + "\1\74\7\0\1\74\11\0\1\56\6\0\1\55\12\0" - + "\1\56\2\0\1\55\1\0\1\56\7\0\1\56\5\0" - + "\5\21\3\0\2\21\1\76\10\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\5\21\3\0\13\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\1\77\2\21\1\0\1\21" - + "\1\0\1\21\5\0\5\21\3\0\11\21\1\100\1\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\6\21" - + "\1\101\4\21\1\0\4\21\1\0\1\21\1\0\1\21" - + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" - + "\3\0\6\21\1\102\4\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\11\0\1\64\21\0\1\64\4\0\1\64\7\0\1\64" - + "\25\0\1\103\30\0\5\21\3\0\4\21\1\104\6\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\13\21" - + "\1\0\3\21\1\105\1\0\1\21\1\0\1\21\1\0" - + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" - + "\10\21\1\106\2\21\1\0\4\21\1\0\1\21\1\0" - + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\11\0" - + "\1\74\21\0\1\74\4\0\1\74\7\0\1\74\5\0" - + "\5\21\3\0\3\21\1\107\7\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\5\21\3\0\12\21\1\110\1\0\4\21" - + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" - + "\1\0\1\21\5\0\5\21\3\0\3\21\1\111\7\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\7\21" - + "\1\112\3\21\1\0\4\21\1\0\1\21\1\0\1\21" - + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" - + "\3\0\6\21\1\113\4\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\21\0\1\114\34\0\5\21\3\0\12\21\1\115\1\0" - + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" - + "\1\21\1\0\1\21\5\0\5\21\3\0\7\21\1\116" - + "\3\21\1\0\4\21\1\0\1\21\1\0\1\21\1\0" - + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" - + "\7\21\1\117\3\21\1\0\4\21\1\0\1\21\1\0" - + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" - + "\5\21\3\0\4\21\1\120\6\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\5\21\3\0\3\21\1\121\7\21\1\0" - + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" - + "\1\21\1\0\1\21\27\0\1\122\26\0\5\21\3\0" - + "\10\21\1\123\2\21\1\0\4\21\1\0\1\21\1\0" - + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" - + "\5\21\3\0\1\124\12\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\5\0\5\21\3\0\1\125\12\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\5\21\3\0\12\21\1\126\1\0\4\21" - + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" - + "\1\0\1\21\25\0\1\127\30\0\5\21\3\0\12\21" - + "\1\130\1\0\4\21\1\0\1\21\1\0\1\21\1\0" - + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" - + "\5\21\1\131\5\21\1\0\4\21\1\0\1\21\1\0" - + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" - + "\5\21\3\0\3\21\1\132\7\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\5\21\3\0\10\21\1\133\2\21\1\0" - + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" - + "\1\21\1\0\1\21\27\0\1\134\26\0\5\21\3\0" - + "\1\135\12\21\1\0\4\21\1\0\1\21\1\0\1\21" - + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" - + "\3\0\10\21\1\136\2\21\1\0\4\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\5\0\5\21\3\0\1\21\1\137\11\21\1\0\4\21" - + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" - + "\1\0\1\21\5\0\5\21\3\0\3\21\1\140\7\21" - + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" - + "\1\0\1\21\1\0\1\21\15\0\1\141\40\0\5\21" - + "\3\0\13\21\1\0\1\21\1\105\2\21\1\0\1\21" - + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" - + "\5\0\5\21\3\0\1\142\12\21\1\0\4\21\1\0" - + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" - + "\1\21\5\0\4\21\1\143\3\0\13\21\1\0\2\21" - + "\1\144\1\21\1\0\1\21\1\0\1\143\1\0\3\21" - + "\1\0\1\21\1\0\1\143\5\0\5\21\3\0\11\21" - + "\1\145\1\21\1\0\4\21\1\0\1\21\1\0\1\21" - + "\1\0\3\21\1\0\1\21\1\0\1\21\32\0\1\146" - + "\23\0\4\21\1\147\3\0\13\21\1\0\2\21\1\150" - + "\1\21\1\0\1\21\1\0\1\147\1\0\3\21\1\0" - + "\1\21\1\0\1\147\5\0\4\21\1\143\3\0\13\21" - + "\1\0\2\21\1\143\1\21\1\0\1\21\1\0\1\143" - + "\1\0\3\21\1\0\1\21\1\0\1\143\5\0\4\21" - + "\1\147\3\0\13\21\1\0\2\21\1\147\1\21\1\0" - + "\1\21\1\0\1\147\1\0\3\21\1\0\1\21\1\0" - + "\1\147"; - - private static int[] zzUnpackTrans() { - int[] result = new int[3075]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 - = "\3\0\1\11\3\1\1\11\2\1\1\11\1\1\1\11" - + "\1\1\1\11\3\1\1\11\13\1\1\11\1\0\6\11" - + "\2\1\4\11\1\0\7\1\1\0\1\11\4\1\1\11" - + "\1\1\1\0\5\1\1\0\10\1\1\0\5\1\1\0" - + "\4\1\1\0\4\1\1\0\4\1\1\0\4\1\1\11" - + "\2\1"; - - private static int[] zzUnpackAttribute() { - int[] result = new int[104]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - /** - * the input device - */ - private java.io.Reader zzReader; - /** - * the current state of the DFA - */ - private int zzState; - /** - * the current lexical state - */ - private int zzLexicalState = YYINITIAL; - /** - * this buffer contains the current text to be matched and is the source of - * the yytext() string - */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - /** - * the textposition at the last accepting state - */ - private int zzMarkedPos; - /** - * the current text position in the buffer - */ - private int zzCurrentPos; - /** - * startRead marks the beginning of the yytext() string in the buffer - */ - private int zzStartRead; - /** - * endRead marks the last character in the buffer, that has been read from - * input - */ - private int zzEndRead; - /** - * number of newlines encountered up to the start of the matched text - */ - private int yyline; - /** - * the number of characters up to the start of the matched text - */ - private int yychar; - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; - /** - * zzAtEOF == true <=> the scanner is at the EOF - */ - private boolean zzAtEOF; - /** - * denotes if the user-EOF-code has already been executed - */ - private boolean zzEOFDone; - - /* user code: */ - StringBuffer string = new StringBuffer(); - - /** - * Create an empty lexer, yyrset will be called later to reset and assign - * the reader - */ - public FlasmLexer() { - } - - public int yychar() { - return yychar; - } - - public int yyline() { - return yyline + 1; - } - - /** - * Creates a new scanner There is also a java.io.InputStream version of this - * constructor. - * - * @param in the java.io.Reader to read input from. - */ - public FlasmLexer(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. There is also java.io.Reader version of this - * constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public FlasmLexer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char[] zzUnpackCMap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - - int j = 0; /* index in unpacked array */ - - while (i < 2206) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do { - map[j++] = value; - } while (--count > 0); - } - return map; - } - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead - zzStartRead); - - /* translate stored positions */ - zzEndRead -= zzStartRead; - zzCurrentPos -= zzStartRead; - zzMarkedPos -= zzStartRead; - zzStartRead = 0; - } - - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos * 2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length - zzEndRead); - - if (numRead > 0) { - zzEndRead += numRead; - return false; - } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { - int c = zzReader.read(); - if (c == -1) { - return true; - } else { - zzBuffer[zzEndRead++] = (char) c; - return false; - } - } - - // numRead < 0 - return true; - } - - /** - * Closes the input stream. - * - * @throws java.io.IOException - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) { - zzReader.close(); - } - } - - /** - * Resets the scanner to read from a new input stream. Does not close the - * old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). Lexical - * state is set to ZZ_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - } - - /** - * Returns the current lexical state. - * - * @return - */ - public final int yystate() { - return zzLexicalState; - } - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - /** - * Returns the text matched by the current regular expression. - * - * @return - */ - public final String yytext() { - return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); - } - - /** - * Returns the character at position pos from the matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. A value from 0 to - * yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead + pos]; - } - - /** - * Returns the length of the matched text region. - * - * @return - */ - public final int yylength() { - return zzMarkedPos - zzStartRead; - } - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of yypushback(int) and - * a match-all fallback rule) this method will only be called with things - * that "Can't Possibly Happen". If this method is called, something is - * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done in error - * fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. This number must - * not be greater than yylength()! - */ - public void yypushback(int number) { - if (number > yylength()) { - zzScanError(ZZ_PUSHBACK_2BIG); - } - - zzMarkedPos -= number; - } - - /** - * Resumes scanning until the next regular expression is matched, the end of - * input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - * @throws com.jpexs.decompiler.flash.action.parser.ParseException - */ - public ASMParsedSymbol yylex() throws java.io.IOException, ParseException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char[] zzBufferL = zzBuffer; - char[] zzCMapL = ZZ_CMAP; - - int[] zzTransL = ZZ_TRANS; - int[] zzRowMapL = ZZ_ROWMAP; - int[] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar += zzMarkedPosL - zzStartRead; - - boolean zzR = false; - for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; - zzCurrentPosL++) { - switch (zzBufferL[zzCurrentPosL]) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) { - zzR = false; - } else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn++; - } - } - - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } else if (zzAtEOF) { - zzPeek = false; - } else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) { - zzPeek = false; - } else { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } - } - if (zzPeek) { - yyline--; - } - } - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; - - zzForAction: - { - while (true) { - - if (zzCurrentPosL < zzEndReadL) { - zzInput = zzBufferL[zzCurrentPosL++]; - } else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; - if (zzNext == -1) { - break zzForAction; - } - zzState = zzNext; - - int zzAttributes = zzAttrL[zzState]; - if ((zzAttributes & 1) == 1) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ((zzAttributes & 8) == 8) { - break zzForAction; - } - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 23: { - string.append('\''); - } - case 31: - break; - case 25: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BOOLEAN, Boolean.TRUE); - } - case 32: - break; - case 19: { - char val = (char) Integer.parseInt(yytext().substring(1), 8); - string.append(val); - } - case 33: - break; - case 4: { - string.append(yytext()); - } - case 34: - break; - case 7: { - yybegin(YYINITIAL); - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_EOL); - } - case 35: - break; - case 16: { - string.append('\r'); - } - case 36: - break; - case 12: { - yybegin(STRING); - string.setLength(0); - } - case 37: - break; - case 26: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_NULL, new Null()); - } - case 38: - break; - case 3: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BLOCK_END); - } - case 39: - break; - case 30: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_CONSTANT, new ConstantIndex(Integer.parseInt(yytext().substring(8)))); - } - case 40: - break; - case 22: { - string.append('\b'); - } - case 41: - break; - case 9: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_IDENTIFIER, yytext()); - } - case 42: - break; - case 5: { - throw new ParseException("Unterminated string at end of line", yyline + 1); - } - case 43: - break; - case 27: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BOOLEAN, Boolean.FALSE); - } - case 44: - break; - case 24: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); - } - case 45: - break; - case 15: { - string.append('\t'); - } - case 46: - break; - case 6: { - yybegin(PARAMETERS); - // length also includes the trailing quote - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_STRING, string.toString()); - } - case 47: - break; - case 2: { - yybegin(PARAMETERS); - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); - } - case 48: - break; - case 28: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_REGISTER, new RegisterNumber(Integer.parseInt(yytext().substring(8)))); - } - case 49: - break; - case 13: { - String s = yytext(); - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); - } - case 50: - break; - case 20: { - string.append('\\'); - } - case 51: - break; - case 14: { - throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); - } - case 52: - break; - case 29: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_UNDEFINED, new Undefined()); - } - case 53: - break; - case 18: { - string.append('\n'); - } - case 54: - break; - case 10: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); - } - case 55: - break; - case 17: { - string.append('\f'); - } - case 56: - break; - case 8: { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_COMMENT, yytext().substring(1)); - } - case 57: - break; - case 11: { - yybegin(YYINITIAL); - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BLOCK_START); - } - case 58: - break; - case 21: { - string.append('\"'); - } - case 59: - break; - case 1: { - } - case 60: - break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ASMParsedSymbol(ASMParsedSymbol.TYPE_EOF); - } - } else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.pcode; + +import com.jpexs.decompiler.flash.action.parser.ParseException; +import com.jpexs.decompiler.flash.action.swf4.ConstantIndex; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.ecma.Null; +import com.jpexs.decompiler.flash.ecma.Undefined; + +/** + * This class is a scanner generated by + * JFlex 1.4.3 on 12.4.13 19:32 from the + * specification file + * D:/Dokumenty/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex + */ +public final class FlasmLexer { + + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + /** + * lexical states + */ + public static final int STRING = 2; + public static final int YYINITIAL = 0; + public static final int PARAMETERS = 4; + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2 + }; + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\6\1\4\1\2\1\0\1\4\1\1\16\6\4\0\1\4\1\0" + + "\1\45\1\0\1\5\2\0\1\47\3\0\1\37\1\0\1\30\1\35" + + "\1\0\1\33\3\50\4\40\2\11\1\12\1\3\5\0\4\7\1\36" + + "\3\7\1\31\4\7\1\34\14\7\1\0\1\41\2\0\1\10\1\0" + + "\1\22\1\46\1\43\1\26\1\20\1\21\1\42\1\7\1\27\2\7" + + "\1\23\1\7\1\25\1\44\2\7\1\16\1\24\1\15\1\17\3\7" + + "\1\32\1\7\1\13\1\0\1\14\1\0\41\6\2\0\4\5\4\0" + + "\1\5\2\0\1\6\7\0\1\5\4\0\1\5\5\0\27\5\1\0" + + "\37\5\1\0\u01ca\5\4\0\14\5\16\0\5\5\7\0\1\5\1\0" + + "\1\5\21\0\160\6\5\5\1\0\2\5\2\0\4\5\10\0\1\5" + + "\1\0\3\5\1\0\1\5\1\0\24\5\1\0\123\5\1\0\213\5" + + "\1\0\5\6\2\0\236\5\11\0\46\5\2\0\1\5\7\0\47\5" + + "\11\0\55\6\1\0\1\6\1\0\2\6\1\0\2\6\1\0\1\6" + + "\10\0\33\5\5\0\3\5\15\0\4\6\7\0\1\5\4\0\13\6" + + "\5\0\53\5\37\6\4\0\2\5\1\6\143\5\1\0\1\5\10\6" + + "\1\0\6\6\2\5\2\6\1\0\4\6\2\5\12\6\3\5\2\0" + + "\1\5\17\0\1\6\1\5\1\6\36\5\33\6\2\0\131\5\13\6" + + "\1\5\16\0\12\6\41\5\11\6\2\5\4\0\1\5\5\0\26\5" + + "\4\6\1\5\11\6\1\5\3\6\1\5\5\6\22\0\31\5\3\6" + + "\244\0\4\6\66\5\3\6\1\5\22\6\1\5\7\6\12\5\2\6" + + "\2\0\12\6\1\0\7\5\1\0\7\5\1\0\3\6\1\0\10\5" + + "\2\0\2\5\2\0\26\5\1\0\7\5\1\0\1\5\3\0\4\5" + + "\2\0\1\6\1\5\7\6\2\0\2\6\2\0\3\6\1\5\10\0" + + "\1\6\4\0\2\5\1\0\3\5\2\6\2\0\12\6\4\5\7\0" + + "\1\5\5\0\3\6\1\0\6\5\4\0\2\5\2\0\26\5\1\0" + + "\7\5\1\0\2\5\1\0\2\5\1\0\2\5\2\0\1\6\1\0" + + "\5\6\4\0\2\6\2\0\3\6\3\0\1\6\7\0\4\5\1\0" + + "\1\5\7\0\14\6\3\5\1\6\13\0\3\6\1\0\11\5\1\0" + + "\3\5\1\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5\2\0" + + "\1\6\1\5\10\6\1\0\3\6\1\0\3\6\2\0\1\5\17\0" + + "\2\5\2\6\2\0\12\6\1\0\1\5\17\0\3\6\1\0\10\5" + + "\2\0\2\5\2\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5" + + "\2\0\1\6\1\5\7\6\2\0\2\6\2\0\3\6\10\0\2\6" + + "\4\0\2\5\1\0\3\5\2\6\2\0\12\6\1\0\1\5\20\0" + + "\1\6\1\5\1\0\6\5\3\0\3\5\1\0\4\5\3\0\2\5" + + "\1\0\1\5\1\0\2\5\3\0\2\5\3\0\3\5\3\0\14\5" + + "\4\0\5\6\3\0\3\6\1\0\4\6\2\0\1\5\6\0\1\6" + + "\16\0\12\6\11\0\1\5\7\0\3\6\1\0\10\5\1\0\3\5" + + "\1\0\27\5\1\0\12\5\1\0\5\5\3\0\1\5\7\6\1\0" + + "\3\6\1\0\4\6\7\0\2\6\1\0\2\5\6\0\2\5\2\6" + + "\2\0\12\6\22\0\2\6\1\0\10\5\1\0\3\5\1\0\27\5" + + "\1\0\12\5\1\0\5\5\2\0\1\6\1\5\7\6\1\0\3\6" + + "\1\0\4\6\7\0\2\6\7\0\1\5\1\0\2\5\2\6\2\0" + + "\12\6\1\0\2\5\17\0\2\6\1\0\10\5\1\0\3\5\1\0" + + "\51\5\2\0\1\5\7\6\1\0\3\6\1\0\4\6\1\5\10\0" + + "\1\6\10\0\2\5\2\6\2\0\12\6\12\0\6\5\2\0\2\6" + + "\1\0\22\5\3\0\30\5\1\0\11\5\1\0\1\5\2\0\7\5" + + "\3\0\1\6\4\0\6\6\1\0\1\6\1\0\10\6\22\0\2\6" + + "\15\0\60\5\1\6\2\5\7\6\4\0\10\5\10\6\1\0\12\6" + + "\47\0\2\5\1\0\1\5\2\0\2\5\1\0\1\5\2\0\1\5" + + "\6\0\4\5\1\0\7\5\1\0\3\5\1\0\1\5\1\0\1\5" + + "\2\0\2\5\1\0\4\5\1\6\2\5\6\6\1\0\2\6\1\5" + + "\2\0\5\5\1\0\1\5\1\0\6\6\2\0\12\6\2\0\2\5" + + "\42\0\1\5\27\0\2\6\6\0\12\6\13\0\1\6\1\0\1\6" + + "\1\0\1\6\4\0\2\6\10\5\1\0\44\5\4\0\24\6\1\0" + + "\2\6\5\5\13\6\1\0\44\6\11\0\1\6\71\0\53\5\24\6" + + "\1\5\12\6\6\0\6\5\4\6\4\5\3\6\1\5\3\6\2\5" + + "\7\6\3\5\4\6\15\5\14\6\1\5\17\6\2\0\46\5\12\0" + + "\53\5\1\0\1\5\3\0\u0149\5\1\0\4\5\2\0\7\5\1\0" + + "\1\5\1\0\4\5\2\0\51\5\1\0\4\5\2\0\41\5\1\0" + + "\4\5\2\0\7\5\1\0\1\5\1\0\4\5\2\0\17\5\1\0" + + "\71\5\1\0\4\5\2\0\103\5\2\0\3\6\40\0\20\5\20\0" + + "\125\5\14\0\u026c\5\2\0\21\5\1\0\32\5\5\0\113\5\3\0" + + "\3\5\17\0\15\5\1\0\4\5\3\6\13\0\22\5\3\6\13\0" + + "\22\5\2\6\14\0\15\5\1\0\3\5\1\0\2\6\14\0\64\5" + + "\40\6\3\0\1\5\3\0\2\5\1\6\2\0\12\6\41\0\3\6" + + "\2\0\12\6\6\0\130\5\10\0\51\5\1\6\1\5\5\0\106\5" + + "\12\0\35\5\3\0\14\6\4\0\14\6\12\0\12\6\36\5\2\0" + + "\5\5\13\0\54\5\4\0\21\6\7\5\2\6\6\0\12\6\46\0" + + "\27\5\5\6\4\0\65\5\12\6\1\0\35\6\2\0\13\6\6\0" + + "\12\6\15\0\1\5\130\0\5\6\57\5\21\6\7\5\4\0\12\6" + + "\21\0\11\6\14\0\3\6\36\5\12\6\3\0\2\5\12\6\6\0" + + "\46\5\16\6\14\0\44\5\24\6\10\0\12\6\3\0\3\5\12\6" + + "\44\5\122\0\3\6\1\0\25\6\4\5\1\6\4\5\1\6\15\0" + + "\300\5\47\6\25\0\4\6\u0116\5\2\0\6\5\2\0\46\5\2\0" + + "\6\5\2\0\10\5\1\0\1\5\1\0\1\5\1\0\1\5\1\0" + + "\37\5\2\0\65\5\1\0\7\5\1\0\1\5\3\0\3\5\1\0" + + "\7\5\3\0\4\5\2\0\6\5\4\0\15\5\5\0\3\5\1\0" + + "\7\5\16\0\5\6\32\0\5\6\20\0\2\5\23\0\1\5\13\0" + + "\5\6\5\0\6\6\1\0\1\5\15\0\1\5\20\0\15\5\3\0" + + "\32\5\26\0\15\6\4\0\1\6\3\0\14\6\21\0\1\5\4\0" + + "\1\5\2\0\12\5\1\0\1\5\3\0\5\5\6\0\1\5\1\0" + + "\1\5\1\0\1\5\1\0\4\5\1\0\13\5\2\0\4\5\5\0" + + "\5\5\4\0\1\5\21\0\51\5\u0a77\0\57\5\1\0\57\5\1\0" + + "\205\5\6\0\4\5\3\6\16\0\46\5\12\0\66\5\11\0\1\5" + + "\17\0\1\6\27\5\11\0\7\5\1\0\7\5\1\0\7\5\1\0" + + "\7\5\1\0\7\5\1\0\7\5\1\0\7\5\1\0\7\5\1\0" + + "\40\6\57\0\1\5\u01d5\0\3\5\31\0\11\5\6\6\1\0\5\5" + + "\2\0\5\5\4\0\126\5\2\0\2\6\2\0\3\5\1\0\132\5" + + "\1\0\4\5\5\0\51\5\3\0\136\5\21\0\33\5\65\0\20\5" + + "\u0200\0\u19b6\5\112\0\u51cc\5\64\0\u048d\5\103\0\56\5\2\0\u010d\5" + + "\3\0\20\5\12\6\2\5\24\0\57\5\1\6\14\0\2\6\1\0" + + "\31\5\10\0\120\5\2\6\45\0\11\5\2\0\147\5\2\0\4\5" + + "\1\0\2\5\16\0\12\5\120\0\10\5\1\6\3\5\1\6\4\5" + + "\1\6\27\5\5\6\20\0\1\5\7\0\64\5\14\0\2\6\62\5" + + "\21\6\13\0\12\6\6\0\22\6\6\5\3\0\1\5\4\0\12\6" + + "\34\5\10\6\2\0\27\5\15\6\14\0\35\5\3\0\4\6\57\5" + + "\16\6\16\0\1\5\12\6\46\0\51\5\16\6\11\0\3\5\1\6" + + "\10\5\2\6\2\0\12\6\6\0\27\5\3\0\1\5\1\6\4\0" + + "\60\5\1\6\1\5\3\6\2\5\2\6\5\5\2\6\1\5\1\6" + + "\1\5\30\0\3\5\43\0\6\5\2\0\6\5\2\0\6\5\11\0" + + "\7\5\1\0\7\5\221\0\43\5\10\6\1\0\2\6\2\0\12\6" + + "\6\0\u2ba4\5\14\0\27\5\4\0\61\5\u2104\0\u012e\5\2\0\76\5" + + "\2\0\152\5\46\0\7\5\14\0\5\5\5\0\1\5\1\6\12\5" + + "\1\0\15\5\1\0\5\5\1\0\1\5\1\0\2\5\1\0\2\5" + + "\1\0\154\5\41\0\u016b\5\22\0\100\5\2\0\66\5\50\0\15\5" + + "\3\0\20\6\20\0\7\6\14\0\2\5\30\0\3\5\31\0\1\5" + + "\6\0\5\5\1\0\207\5\2\0\1\6\4\0\1\5\13\0\12\6" + + "\7\0\32\5\4\0\1\5\1\0\32\5\13\0\131\5\3\0\6\5" + + "\2\0\6\5\2\0\6\5\2\0\3\5\3\0\2\5\3\0\2\5" + + "\22\0\3\6\4\0"; + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\3\1\1\2\1\3\1\4\2\5\1\1\1\6" + + "\2\7\1\10\1\11\1\12\1\13\5\11\1\1\1\11" + + "\1\12\1\11\1\1\1\11\1\14\1\0\1\15\1\16" + + "\1\17\1\20\1\21\1\22\2\23\1\24\1\25\1\26" + + "\1\27\1\0\1\30\5\11\1\12\1\0\1\12\1\11" + + "\1\30\2\11\1\23\1\30\1\0\5\11\1\0\1\11" + + "\1\30\1\11\1\31\3\11\1\32\1\0\4\11\1\33" + + "\1\0\4\11\1\0\4\11\1\0\4\11\1\0\1\11" + + "\2\34\1\35\1\30\2\36"; + + private static int[] zzUnpackAction() { + int[] result = new int[104]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\51\0\122\0\173\0\244\0\315\0\366\0\173" + + "\0\u011f\0\u0148\0\173\0\u0171\0\173\0\u019a\0\173\0\u01c3" + + "\0\u01ec\0\u0215\0\173\0\u023e\0\u0267\0\u0290\0\u02b9\0\u02e2" + + "\0\u030b\0\u0334\0\u035d\0\u0386\0\u03af\0\u03d8\0\173\0\315" + + "\0\173\0\173\0\173\0\173\0\173\0\173\0\u0401\0\u042a" + + "\0\173\0\173\0\173\0\173\0\u0453\0\u047c\0\u04a5\0\u04ce" + + "\0\u04f7\0\u0520\0\u0549\0\u0572\0\u059b\0\173\0\u05c4\0\u035d" + + "\0\u05ed\0\u0616\0\173\0\u063f\0\u063f\0\u0668\0\u0691\0\u06ba" + + "\0\u06e3\0\u070c\0\u0735\0\u075e\0\u01ec\0\u0787\0\u01ec\0\u07b0" + + "\0\u07d9\0\u0802\0\u01ec\0\u082b\0\u0854\0\u087d\0\u08a6\0\u08cf" + + "\0\u01ec\0\u08f8\0\u0921\0\u094a\0\u0973\0\u099c\0\u09c5\0\u09ee" + + "\0\u0a17\0\u0a40\0\u0a69\0\u0a92\0\u0abb\0\u0ae4\0\u0b0d\0\u0b36" + + "\0\u0b5f\0\u0b88\0\u0bb1\0\u01ec\0\u01ec\0\173\0\u0bda\0\u01ec"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[104]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + private static final String ZZ_TRANS_PACKED_0 + = "\4\4\1\5\1\6\1\4\1\7\1\6\3\4\1\10" + + "\13\7\1\4\2\7\1\4\1\7\1\4\1\7\3\4" + + "\3\7\1\4\1\7\2\4\1\11\1\12\1\13\36\11" + + "\1\14\3\11\1\15\3\11\1\4\1\16\1\17\1\20" + + "\1\4\1\21\1\4\2\21\1\22\1\4\1\23\1\4" + + "\1\24\1\25\1\26\1\21\1\27\3\21\1\30\2\21" + + "\1\31\1\32\1\21\1\33\1\34\1\35\1\21\1\4" + + "\1\22\1\4\1\21\1\36\1\21\1\37\1\21\1\4" + + "\1\22\55\0\1\5\51\0\5\40\1\41\2\0\13\40" + + "\1\0\4\40\1\0\1\40\1\0\1\40\1\0\3\40" + + "\1\0\1\40\1\0\1\40\5\0\2\40\3\7\1\41" + + "\2\0\13\7\1\0\4\7\1\0\1\7\1\0\1\7" + + "\1\0\3\7\1\0\1\7\1\0\1\7\1\11\2\0" + + "\36\11\1\0\3\11\1\0\3\11\2\0\1\13\46\0" + + "\2\42\1\0\12\42\1\43\1\44\2\42\1\45\3\42" + + "\1\46\5\42\1\47\4\42\1\50\1\51\3\42\1\52" + + "\1\53\1\54\1\47\2\0\1\17\46\0\1\20\2\0" + + "\46\20\5\0\5\21\3\0\13\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\11\0\1\22\6\0\1\55\12\0\1\22\1\0" + + "\1\56\1\55\1\0\1\22\7\0\1\22\5\0\5\21" + + "\3\0\1\21\1\57\11\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\5\0\5\21\3\0\3\21\1\60\7\21\1\0\4\21" + + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" + + "\1\0\1\21\5\0\5\21\3\0\10\21\1\61\2\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\5\21" + + "\1\62\5\21\1\0\4\21\1\0\1\21\1\0\1\21" + + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" + + "\3\0\2\21\1\63\10\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\11\0\1\64\17\0\1\65\1\0\1\66\4\0\1\64" + + "\7\0\1\64\5\0\5\21\3\0\10\21\1\67\2\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\11\0\1\70\6\0\1\55" + + "\12\0\1\70\1\0\1\56\1\55\1\0\1\70\7\0" + + "\1\70\5\0\5\21\3\0\5\21\1\71\5\21\1\0" + + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" + + "\1\21\1\0\1\21\11\0\1\56\21\0\1\56\4\0" + + "\1\56\7\0\1\56\5\0\5\21\3\0\13\21\1\0" + + "\4\21\1\0\1\21\1\0\1\21\1\0\2\21\1\72" + + "\1\0\1\21\1\0\1\21\33\0\1\50\4\0\1\50" + + "\7\0\1\50\33\0\1\73\4\0\1\73\7\0\1\73" + + "\11\0\1\74\16\0\1\75\2\0\1\74\3\0\1\75" + + "\1\74\7\0\1\74\11\0\1\56\6\0\1\55\12\0" + + "\1\56\2\0\1\55\1\0\1\56\7\0\1\56\5\0" + + "\5\21\3\0\2\21\1\76\10\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\5\21\3\0\13\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\1\77\2\21\1\0\1\21" + + "\1\0\1\21\5\0\5\21\3\0\11\21\1\100\1\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\6\21" + + "\1\101\4\21\1\0\4\21\1\0\1\21\1\0\1\21" + + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" + + "\3\0\6\21\1\102\4\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\11\0\1\64\21\0\1\64\4\0\1\64\7\0\1\64" + + "\25\0\1\103\30\0\5\21\3\0\4\21\1\104\6\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\13\21" + + "\1\0\3\21\1\105\1\0\1\21\1\0\1\21\1\0" + + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" + + "\10\21\1\106\2\21\1\0\4\21\1\0\1\21\1\0" + + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\11\0" + + "\1\74\21\0\1\74\4\0\1\74\7\0\1\74\5\0" + + "\5\21\3\0\3\21\1\107\7\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\5\21\3\0\12\21\1\110\1\0\4\21" + + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" + + "\1\0\1\21\5\0\5\21\3\0\3\21\1\111\7\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\5\0\5\21\3\0\7\21" + + "\1\112\3\21\1\0\4\21\1\0\1\21\1\0\1\21" + + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" + + "\3\0\6\21\1\113\4\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\21\0\1\114\34\0\5\21\3\0\12\21\1\115\1\0" + + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" + + "\1\21\1\0\1\21\5\0\5\21\3\0\7\21\1\116" + + "\3\21\1\0\4\21\1\0\1\21\1\0\1\21\1\0" + + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" + + "\7\21\1\117\3\21\1\0\4\21\1\0\1\21\1\0" + + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" + + "\5\21\3\0\4\21\1\120\6\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\5\21\3\0\3\21\1\121\7\21\1\0" + + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" + + "\1\21\1\0\1\21\27\0\1\122\26\0\5\21\3\0" + + "\10\21\1\123\2\21\1\0\4\21\1\0\1\21\1\0" + + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" + + "\5\21\3\0\1\124\12\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\5\0\5\21\3\0\1\125\12\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\5\21\3\0\12\21\1\126\1\0\4\21" + + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" + + "\1\0\1\21\25\0\1\127\30\0\5\21\3\0\12\21" + + "\1\130\1\0\4\21\1\0\1\21\1\0\1\21\1\0" + + "\3\21\1\0\1\21\1\0\1\21\5\0\5\21\3\0" + + "\5\21\1\131\5\21\1\0\4\21\1\0\1\21\1\0" + + "\1\21\1\0\3\21\1\0\1\21\1\0\1\21\5\0" + + "\5\21\3\0\3\21\1\132\7\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\5\21\3\0\10\21\1\133\2\21\1\0" + + "\4\21\1\0\1\21\1\0\1\21\1\0\3\21\1\0" + + "\1\21\1\0\1\21\27\0\1\134\26\0\5\21\3\0" + + "\1\135\12\21\1\0\4\21\1\0\1\21\1\0\1\21" + + "\1\0\3\21\1\0\1\21\1\0\1\21\5\0\5\21" + + "\3\0\10\21\1\136\2\21\1\0\4\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\5\0\5\21\3\0\1\21\1\137\11\21\1\0\4\21" + + "\1\0\1\21\1\0\1\21\1\0\3\21\1\0\1\21" + + "\1\0\1\21\5\0\5\21\3\0\3\21\1\140\7\21" + + "\1\0\4\21\1\0\1\21\1\0\1\21\1\0\3\21" + + "\1\0\1\21\1\0\1\21\15\0\1\141\40\0\5\21" + + "\3\0\13\21\1\0\1\21\1\105\2\21\1\0\1\21" + + "\1\0\1\21\1\0\3\21\1\0\1\21\1\0\1\21" + + "\5\0\5\21\3\0\1\142\12\21\1\0\4\21\1\0" + + "\1\21\1\0\1\21\1\0\3\21\1\0\1\21\1\0" + + "\1\21\5\0\4\21\1\143\3\0\13\21\1\0\2\21" + + "\1\144\1\21\1\0\1\21\1\0\1\143\1\0\3\21" + + "\1\0\1\21\1\0\1\143\5\0\5\21\3\0\11\21" + + "\1\145\1\21\1\0\4\21\1\0\1\21\1\0\1\21" + + "\1\0\3\21\1\0\1\21\1\0\1\21\32\0\1\146" + + "\23\0\4\21\1\147\3\0\13\21\1\0\2\21\1\150" + + "\1\21\1\0\1\21\1\0\1\147\1\0\3\21\1\0" + + "\1\21\1\0\1\147\5\0\4\21\1\143\3\0\13\21" + + "\1\0\2\21\1\143\1\21\1\0\1\21\1\0\1\143" + + "\1\0\3\21\1\0\1\21\1\0\1\143\5\0\4\21" + + "\1\147\3\0\13\21\1\0\2\21\1\147\1\21\1\0" + + "\1\21\1\0\1\147\1\0\3\21\1\0\1\21\1\0" + + "\1\147"; + + private static int[] zzUnpackTrans() { + int[] result = new int[3075]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\1\11\3\1\1\11\2\1\1\11\1\1\1\11" + + "\1\1\1\11\3\1\1\11\13\1\1\11\1\0\6\11" + + "\2\1\4\11\1\0\7\1\1\0\1\11\4\1\1\11" + + "\1\1\1\0\5\1\1\0\10\1\1\0\5\1\1\0" + + "\4\1\1\0\4\1\1\0\4\1\1\0\4\1\1\11" + + "\2\1"; + + private static int[] zzUnpackAttribute() { + int[] result = new int[104]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * the input device + */ + private java.io.Reader zzReader; + /** + * the current state of the DFA + */ + private int zzState; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + StringBuffer string = new StringBuffer(); + + /** + * Create an empty lexer, yyrset will be called later to reset and assign + * the reader + */ + public FlasmLexer() { + } + + public int yychar() { + return yychar; + } + + public int yyline() { + return yyline + 1; + } + + /** + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. + * + * @param in the java.io.Reader to read input from. + */ + public FlasmLexer(java.io.Reader in) { + this.zzReader = in; + } + + /** + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public FlasmLexer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ + + int j = 0; /* index in unpacked array */ + + while (i < 2206) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); + } + return map; + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + + /* first: make room (if you can) */ + if (zzStartRead > 0) { + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); + + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[zzCurrentPos * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + } + + /* finally: fill the buffer with new input */ + int numRead = zzReader.read(zzBuffer, zzEndRead, + zzBuffer.length - zzEndRead); + + if (numRead > 0) { + zzEndRead += numRead; + return false; + } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 + return true; + } + + /** + * Closes the input stream. + * + * @throws java.io.IOException + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + + zzEndRead = zzStartRead; /* invalidate buffer */ + + if (zzReader != null) { + zzReader.close(); + } + } + + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + } + + /** + * Returns the current lexical state. + * + * @return + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + /** + * Returns the text matched by the current regular expression. + * + * @return + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } + + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } + + /** + * Returns the length of the matched text region. + * + * @return + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } + + zzMarkedPos -= number; + } + + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.action.parser.ParseException + */ + public ASMParsedSymbol yylex() throws java.io.IOException, ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + yychar += zzMarkedPosL - zzStartRead; + + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL[zzCurrentPosL]) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = zzBufferL[zzCurrentPosL++]; + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = zzBufferL[zzCurrentPosL++]; + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 23: { + string.append('\''); + } + case 31: + break; + case 25: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BOOLEAN, Boolean.TRUE); + } + case 32: + break; + case 19: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 33: + break; + case 4: { + string.append(yytext()); + } + case 34: + break; + case 7: { + yybegin(YYINITIAL); + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_EOL); + } + case 35: + break; + case 16: { + string.append('\r'); + } + case 36: + break; + case 12: { + yybegin(STRING); + string.setLength(0); + } + case 37: + break; + case 26: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_NULL, new Null()); + } + case 38: + break; + case 3: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BLOCK_END); + } + case 39: + break; + case 30: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_CONSTANT, new ConstantIndex(Integer.parseInt(yytext().substring(8)))); + } + case 40: + break; + case 22: { + string.append('\b'); + } + case 41: + break; + case 9: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_IDENTIFIER, yytext()); + } + case 42: + break; + case 5: { + throw new ParseException("Unterminated string at end of line", yyline + 1); + } + case 43: + break; + case 27: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BOOLEAN, Boolean.FALSE); + } + case 44: + break; + case 24: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); + } + case 45: + break; + case 15: { + string.append('\t'); + } + case 46: + break; + case 6: { + yybegin(PARAMETERS); + // length also includes the trailing quote + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_STRING, string.toString()); + } + case 47: + break; + case 2: { + yybegin(PARAMETERS); + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); + } + case 48: + break; + case 28: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_REGISTER, new RegisterNumber(Integer.parseInt(yytext().substring(8)))); + } + case 49: + break; + case 13: { + String s = yytext(); + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); + } + case 50: + break; + case 20: { + string.append('\\'); + } + case 51: + break; + case 14: { + throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 52: + break; + case 29: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_UNDEFINED, new Undefined()); + } + case 53: + break; + case 18: { + string.append('\n'); + } + case 54: + break; + case 10: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); + } + case 55: + break; + case 17: { + string.append('\f'); + } + case 56: + break; + case 8: { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_COMMENT, yytext().substring(1)); + } + case 57: + break; + case 11: { + yybegin(YYINITIAL); + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_BLOCK_START); + } + case 58: + break; + case 21: { + string.append('\"'); + } + case 59: + break; + case 1: { + } + case 60: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ASMParsedSymbol(ASMParsedSymbol.TYPE_EOF); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java new file mode 100644 index 000000000..ec2f80185 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.pcode; + +public class Label { + + public String name; + public long address; + + public Label(String name, long address) { + this.name = name; + this.address = address; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/flasm.flex diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java similarity index 99% rename from src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 8e19fdcf1..7ea698f9c 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -1,21 +1,18 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT */ - /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.parser.script; import com.jpexs.decompiler.flash.action.parser.ParseException; import java.util.Stack; diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java similarity index 99% rename from src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java index 5e34c9a1c..1c466a60d 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java similarity index 97% rename from src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index e9dd3e3fd..3b3ffe933 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.parser.script; import com.jpexs.decompiler.flash.SWF; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java new file mode 100644 index 000000000..4052d3cbc --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class LexBufferer implements LexListener { + + private final List items = new ArrayList<>(); + + @Override + public void onLex(ParsedSymbol s) { + items.add(s); + } + + @Override + public void onPushBack(ParsedSymbol s) { + if (items.get(items.size() - 1) == s) { + items.remove(items.size() - 1); + } + } + + public void pushAllBack(ActionScriptLexer lexer) { + for (int i = items.size() - 1; i >= 0; i--) { + lexer.pushback(items.get(i)); + } + items.clear(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java new file mode 100644 index 000000000..794630100 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +/** + * + * @author JPEXS + */ +public interface LexListener { + + public void onLex(ParsedSymbol s); + + public void onPushBack(ParsedSymbol s); +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java similarity index 59% rename from src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java index 37f0bedd1..4bf4eae98 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ParsedSymbol.java @@ -1,61 +1,60 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -/** - * - * @author JPEXS - */ -public class ParsedSymbol { - - public SymbolGroup group; - public Object value; - public SymbolType type; - - public ParsedSymbol(SymbolGroup group, SymbolType type) { - this.group = group; - this.type = type; - this.value = null; - } - - public ParsedSymbol(SymbolGroup group, SymbolType type, Object value) { - this.group = group; - this.type = type; - this.value = value; - } - - @Override - public String toString() { - return group.toString() + " " + type.toString() + " " + (value != null ? value.toString() : ""); - } - - public boolean isType(Object... types) { - for (Object t : types) { - if (t instanceof SymbolGroup) { - if (group == t) { - return true; - } - } - if (t instanceof SymbolType) { - if (type == t) { - return true; - } - } - } - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +/** + * + * @author JPEXS + */ +public class ParsedSymbol { + + public SymbolGroup group; + public Object value; + public SymbolType type; + + public ParsedSymbol(SymbolGroup group, SymbolType type) { + this.group = group; + this.type = type; + this.value = null; + } + + public ParsedSymbol(SymbolGroup group, SymbolType type, Object value) { + this.group = group; + this.type = type; + this.value = value; + } + + @Override + public String toString() { + return group.toString() + " " + type.toString() + " " + (value != null ? value.toString() : ""); + } + + public boolean isType(Object... types) { + for (Object t : types) { + if (t instanceof SymbolGroup) { + if (group == t) { + return true; + } + } + if (t instanceof SymbolType) { + if (type == t) { + return true; + } + } + } + return false; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java new file mode 100644 index 000000000..306b30c44 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +/** + * + * @author JPEXS + */ +public enum SymbolGroup { + + OPERATOR, + KEYWORD, + STRING, + COMMENT, + XML, + IDENTIFIER, + INTEGER, + DOUBLE, + TYPENAME, + EOF, + GLOBALFUNC, + GLOBALCONST +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java similarity index 73% rename from src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java index 695da2662..a0fdc0caa 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java @@ -1,187 +1,186 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -/** - * - * @author JPEXS - */ -public enum SymbolType { - //Keywords - - BREAK, - CASE, - CONTINUE, - DEFAULT, - DO, - WHILE, - ELSE, - FOR, - EACH, - IN, - IF, - RETURN, - SUPER, - SWITCH, - THROW, - TRY, - CATCH, - FINALLY, - WITH, - DYNAMIC, - INTERNAL, - OVERRIDE, - PRIVATE, - PROTECTED, - PUBLIC, - STATIC, - CLASS, - CONST, - EXTENDS, - FUNCTION, - GET, - IMPLEMENTS, - INTERFACE, - NAMESPACE, - PACKAGE, - SET, - VAR, - IMPORT, - USE, - FALSE, - NULL, - THIS, - TRUE, - //Operators - PARENT_OPEN, - PARENT_CLOSE, - CURLY_OPEN, - CURLY_CLOSE, - BRACKET_OPEN, - BRACKET_CLOSE, - SEMICOLON, - COMMA, - REST, - DOT, - ASSIGN, - GREATER_THAN, - LOWER_THAN, - NOT, - NEGATE, - TERNAR, - COLON, - EQUALS, - STRICT_EQUALS, - LOWER_EQUAL, - GREATER_EQUAL, - NOT_EQUAL, - STRICT_NOT_EQUAL, - AND, - OR, - FULLAND, - FULLOR, - INCREMENT, - DECREMENT, - PLUS, - MINUS, - MULTIPLY, - DIVIDE, - BITAND, - BITOR, - XOR, - MODULO, - SHIFT_LEFT, - SHIFT_RIGHT, - USHIFT_RIGHT, - ASSIGN_PLUS, - ASSIGN_MINUS, - ASSIGN_MULTIPLY, - ASSIGN_DIVIDE, - ASSIGN_BITAND, - ASSIGN_BITOR, - ASSIGN_XOR, - ASSIGN_MODULO, - ASSIGN_SHIFT_LEFT, - ASSIGN_SHIFT_RIGHT, - ASSIGN_USHIFT_RIGHT, - AS, - DELETE, - INSTANCEOF, - IS, - NAMESPACE_OP, - NEW, - TYPEOF, - VOID, - ATTRIBUTE, - //Other - STRING, - COMMENT, - XML, - IDENTIFIER, - INTEGER, - DOUBLE, - TYPENAME, - EOF, - TRACE, - GETURL, - GOTOANDSTOP, - NEXTFRAME, - PLAY, - PREVFRAME, - TELLTARGET, - STOP, - STOPALLSOUNDS, - TOGGLEHIGHQUALITY, - ORD, - CHR, - DUPLICATEMOVIECLIP, - STOPDRAG, - GETTIMER, - LOADVARIABLES, - LOADMOVIE, - GOTOANDPLAY, - MBORD, - MBCHR, - MBLENGTH, - MBSUBSTRING, - RANDOM, - REMOVEMOVIECLIP, - STARTDRAG, - SUBSTR, - LENGTH, //string.length - INT, - TARGETPATH, - NUMBER_OP, - STRING_OP, - IFFRAMELOADED, - INFINITY, - EVAL, - UNDEFINED, - NEWLINE, - NAN, - GETVERSION, - CALL, - LOADMOVIENUM, - LOADVARIABLESNUM, - PRINT, - PRINTNUM, - PRINTASBITMAP, - PRINTASBITMAPNUM, - UNLOADMOVIE, - UNLOADMOVIENUM, - FSCOMMAND -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +/** + * + * @author JPEXS + */ +public enum SymbolType { + //Keywords + + BREAK, + CASE, + CONTINUE, + DEFAULT, + DO, + WHILE, + ELSE, + FOR, + EACH, + IN, + IF, + RETURN, + SUPER, + SWITCH, + THROW, + TRY, + CATCH, + FINALLY, + WITH, + DYNAMIC, + INTERNAL, + OVERRIDE, + PRIVATE, + PROTECTED, + PUBLIC, + STATIC, + CLASS, + CONST, + EXTENDS, + FUNCTION, + GET, + IMPLEMENTS, + INTERFACE, + NAMESPACE, + PACKAGE, + SET, + VAR, + IMPORT, + USE, + FALSE, + NULL, + THIS, + TRUE, + //Operators + PARENT_OPEN, + PARENT_CLOSE, + CURLY_OPEN, + CURLY_CLOSE, + BRACKET_OPEN, + BRACKET_CLOSE, + SEMICOLON, + COMMA, + REST, + DOT, + ASSIGN, + GREATER_THAN, + LOWER_THAN, + NOT, + NEGATE, + TERNAR, + COLON, + EQUALS, + STRICT_EQUALS, + LOWER_EQUAL, + GREATER_EQUAL, + NOT_EQUAL, + STRICT_NOT_EQUAL, + AND, + OR, + FULLAND, + FULLOR, + INCREMENT, + DECREMENT, + PLUS, + MINUS, + MULTIPLY, + DIVIDE, + BITAND, + BITOR, + XOR, + MODULO, + SHIFT_LEFT, + SHIFT_RIGHT, + USHIFT_RIGHT, + ASSIGN_PLUS, + ASSIGN_MINUS, + ASSIGN_MULTIPLY, + ASSIGN_DIVIDE, + ASSIGN_BITAND, + ASSIGN_BITOR, + ASSIGN_XOR, + ASSIGN_MODULO, + ASSIGN_SHIFT_LEFT, + ASSIGN_SHIFT_RIGHT, + ASSIGN_USHIFT_RIGHT, + AS, + DELETE, + INSTANCEOF, + IS, + NAMESPACE_OP, + NEW, + TYPEOF, + VOID, + ATTRIBUTE, + //Other + STRING, + COMMENT, + XML, + IDENTIFIER, + INTEGER, + DOUBLE, + TYPENAME, + EOF, + TRACE, + GETURL, + GOTOANDSTOP, + NEXTFRAME, + PLAY, + PREVFRAME, + TELLTARGET, + STOP, + STOPALLSOUNDS, + TOGGLEHIGHQUALITY, + ORD, + CHR, + DUPLICATEMOVIECLIP, + STOPDRAG, + GETTIMER, + LOADVARIABLES, + LOADMOVIE, + GOTOANDPLAY, + MBORD, + MBCHR, + MBLENGTH, + MBSUBSTRING, + RANDOM, + REMOVEMOVIECLIP, + STARTDRAG, + SUBSTR, + LENGTH, //string.length + INT, + TARGETPATH, + NUMBER_OP, + STRING_OP, + IFFRAMELOADED, + INFINITY, + EVAL, + UNDEFINED, + NEWLINE, + NAN, + GETVERSION, + CALL, + LOADMOVIENUM, + LOADVARIABLESNUM, + PRINT, + PRINTNUM, + PRINTASBITMAP, + PRINTASBITMAPNUM, + UNLOADMOVIE, + UNLOADMOVIENUM, + FSCOMMAND +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java similarity index 81% rename from src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java index 884d44390..08793ecee 100644 --- a/src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/VariableActionItem.java @@ -1,119 +1,118 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.ActionItem; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class VariableActionItem extends ActionItem { - - private ActionItem it; - - private final String variableName; - private GraphTargetItem storeValue; - private boolean definition; - - public void setDefinition(boolean definition) { - this.definition = definition; - } - - public void setStoreValue(GraphTargetItem storeValue) { - this.storeValue = storeValue; - } - - public String getVariableName() { - return variableName; - } - - public VariableActionItem(String variableName, GraphTargetItem storeValue, boolean definition) { - this.variableName = variableName; - this.storeValue = storeValue; - this.definition = definition; - } - - public boolean isDefinition() { - return definition; - } - - public void setBoxedValue(ActionItem it) { - this.it = it; - if (it != null) { - this.precedence = it.getPrecedence(); - } - } - - public ActionItem getBoxedValue() { - return it; - } - - public GraphTargetItem getStoreValue() { - return storeValue; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (it == null) { - return writer; - } - return it.appendTo(writer, localData); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (it == null) { - return new ArrayList<>(); - } - return it.toSource(localData, generator); - } - - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - if (it == null) { - return new ArrayList<>(); - } - return it.toSourceIgnoreReturnValue(localData, generator); - } - - @Override - public boolean hasReturnValue() { - if (definition) { - return false; - } - return true; - } - - @Override - public boolean needsSemicolon() { - if (definition) { - return true; - } - return false; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.parser.script; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.ActionItem; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class VariableActionItem extends ActionItem { + + private ActionItem it; + + private final String variableName; + private GraphTargetItem storeValue; + private boolean definition; + + public void setDefinition(boolean definition) { + this.definition = definition; + } + + public void setStoreValue(GraphTargetItem storeValue) { + this.storeValue = storeValue; + } + + public String getVariableName() { + return variableName; + } + + public VariableActionItem(String variableName, GraphTargetItem storeValue, boolean definition) { + this.variableName = variableName; + this.storeValue = storeValue; + this.definition = definition; + } + + public boolean isDefinition() { + return definition; + } + + public void setBoxedValue(ActionItem it) { + this.it = it; + if (it != null) { + this.precedence = it.getPrecedence(); + } + } + + public ActionItem getBoxedValue() { + return it; + } + + public GraphTargetItem getStoreValue() { + return storeValue; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (it == null) { + return writer; + } + return it.appendTo(writer, localData); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (it == null) { + return new ArrayList<>(); + } + return it.toSource(localData, generator); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + if (it == null) { + return new ArrayList<>(); + } + return it.toSourceIgnoreReturnValue(localData, generator); + } + + @Override + public boolean hasReturnValue() { + if (definition) { + return false; + } + return true; + } + + @Override + public boolean needsSemicolon() { + if (definition) { + return true; + } + return false; + } + +} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/actionscript.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/actionscript.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/action/parser/script/actionscript.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/actionscript.flex diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java new file mode 100644 index 000000000..6bb17ded9 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.special; + +import com.jpexs.decompiler.flash.action.parser.ParseException; +import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; +import com.jpexs.decompiler.flash.action.swf4.ActionJump; +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public class ActionDeobfuscateJump extends ActionJump { + + public ActionDeobfuscateJump(int offset) { + super(2); + } + + public ActionDeobfuscateJump(FlasmLexer lexer) throws IOException, ParseException { + super(lexer); + } + + @Override + public String toString() { + return "FFDec_DeobfuscateJump " + getJumpOffset(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java index 712efd643..f81664d9d 100644 --- a/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscatePop.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.special; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/special/ActionEnd.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java index 09b57680b..ea24e393c 100644 --- a/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionEnd.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.special; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/special/ActionNop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java similarity index 52% rename from src/com/jpexs/decompiler/flash/action/special/ActionNop.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java index 27de9410c..7688a199b 100644 --- a/src/com/jpexs/decompiler/flash/action/special/ActionNop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionNop.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.special; import com.jpexs.decompiler.flash.action.Action; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionStore.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionStore.java new file mode 100644 index 000000000..885eba3c6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/special/ActionStore.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.special; + +import com.jpexs.decompiler.flash.action.Action; +import java.util.List; + +/** + * + * @author JPEXS + */ +public interface ActionStore { + + public int getStoreSize(); + + public void setStore(List store); +} diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java similarity index 85% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java index 9f1a91756..e56ebd4bf 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java similarity index 75% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java index d74fb1949..e8624f5f1 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java similarity index 74% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java index 3a591f7c5..c0b694bd4 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGotoFrame.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java index 9f24afce1..9ca3416e5 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionNextFrame.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java similarity index 66% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java index 1448852b3..36b0a5031 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPlay.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java index 1524e47ef..e4d3963de 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionPrevFrame.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java similarity index 76% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java index 03a0c6eb2..521fb840f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java similarity index 53% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java index a2e37aa1c..b2dcf26d1 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStop.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java index 9c0eae203..8b98ff85f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionStopSounds.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java index 4bfb54b04..9f406445d 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionToggleQuality.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java index a4789d903..bdeafd65a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionWaitForFrame.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf3; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java index 8a6734c43..2d18d04d4 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAdd.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java index 8581753d0..ccb789e2c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAnd.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java index f6c4af7b2..949f7825a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionAsciiToChar.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java index 513fc9274..65ad02e7c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCall.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java index 0835fe89e..81136533b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCharToAscii.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java similarity index 59% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java index 2527f7405..875a0e80b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionCloneSprite.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java index b409eadcf..8069c8182 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionDivide.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java index 40a539118..fa0bf8443 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEndDrag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java index 9c6197260..049f7598a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionEquals.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java similarity index 68% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java index c4a47524a..bc08f9a9b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetProperty.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java index c63c6f255..c33952aba 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetTime.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java similarity index 91% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java index 9c118c23b..04c00259a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetURL2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java similarity index 71% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java index a42838709..1965e689e 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGetVariable.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java index 5d1cc2d58..161880efe 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionGotoFrame2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java index 695a21451..8a28fa10e 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionIf.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java similarity index 82% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java index 77e26c96a..597611dca 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java index f3ef7b8a6..6570bd1b4 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionLess.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java index 4348d3c87..76a9a86bb 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBAsciiToChar.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java index 03c210027..59a41a72c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBCharToAscii.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java similarity index 59% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java index 58918e011..81f263439 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringExtract.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java index 640e3dff9..68c9f18d6 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMBStringLength.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java index 7d08fcdfe..b608e8fc1 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionMultiply.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java similarity index 54% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java index c67d70e3f..0b5648c86 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionNot.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java index c84369978..2d1f17dd7 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionOr.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java similarity index 58% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java index 4db559609..3ba30288a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPop.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java similarity index 95% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java index 04357730f..1ed8db20e 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.EndOfStreamException; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java index c3ea7ed07..bc259d1d8 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRandomNumber.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java index 819a852cc..496d6b1e1 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionRemoveSprite.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java similarity index 87% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java index 35a0ba9d7..4ab294736 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetProperty.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java index 708bc345e..e73146998 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetTarget2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java similarity index 88% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java index 1ecb1c441..3fbae9677 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSetVariable.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java similarity index 71% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java index 283140522..d66b9e0dc 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStartDrag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java index 784d75ced..cf53eebed 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringAdd.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java index 455553c51..829c4a1b9 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringEquals.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java similarity index 59% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java index 02a3f0339..260f11e5b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringExtract.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java index 065b14915..c4fcfe4e8 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLength.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java index 37fd08cde..01d7d3f7c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionStringLess.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java index a34a0ba2a..70875c612 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionSubtract.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java index fdb075fc8..8cbb5adde 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionToInteger.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java index 3f3bbd84e..a487df5c9 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionTrace.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java similarity index 86% rename from src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java index 2ce5825d8..3e46994a5 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ActionWaitForFrame2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf4; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java index 4925bede0..a7987ab27 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/ConstantIndex.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.swf4; - -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.helpers.Helper; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -public class ConstantIndex implements Serializable { - - public int index; - public List constantPool; - - public ConstantIndex(int index) { - this.index = index; - this.constantPool = new ArrayList<>(); - } - - public ConstantIndex(int index, List constantPool) { - this.index = index; - this.constantPool = constantPool; - } - - public String toStringNoQ() { - if (Configuration.resolveConstants.get()) { - if (constantPool != null) { - if (index < constantPool.size()) { - return constantPool.get(index); - } - } - } - return "constant" + index; - } - - @Override - public String toString() { - if (Configuration.resolveConstants.get()) { - if (constantPool != null) { - if (index < constantPool.size()) { - return "\"" + Helper.escapeString(constantPool.get(index)) + "\""; - } - } - } - return "constant" + index; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.swf4; + +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.helpers.Helper; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class ConstantIndex implements Serializable { + + public int index; + public List constantPool; + + public ConstantIndex(int index) { + this.index = index; + this.constantPool = new ArrayList<>(); + } + + public ConstantIndex(int index, List constantPool) { + this.index = index; + this.constantPool = constantPool; + } + + public String toStringNoQ() { + if (Configuration.resolveConstants.get()) { + if (constantPool != null) { + if (index < constantPool.size()) { + return constantPool.get(index); + } + } + } + return "constant" + index; + } + + @Override + public String toString() { + if (Configuration.resolveConstants.get()) { + if (constantPool != null) { + if (index < constantPool.size()) { + return "\"" + Helper.escapeString(constantPool.get(index)) + "\""; + } + } + } + return "constant" + index; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java similarity index 64% rename from src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java index 2289aaef4..5ff0b9118 100644 --- a/src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf4/RegisterNumber.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.swf4; - -import com.jpexs.decompiler.flash.configuration.Configuration; -import java.io.Serializable; - -public class RegisterNumber implements Serializable { - - public int number; - public String name = null; - - @Override - public int hashCode() { - int hash = 3; - hash = 47 * hash + this.number; - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final RegisterNumber other = (RegisterNumber) obj; - if (this.number != other.number) { - return false; - } - return true; - } - - public RegisterNumber(int number, String name) { - this.number = number; - this.name = name; - } - - public RegisterNumber(int number) { - this(number, null); - } - - @Override - public String toString() { - if (name == null || name.trim().isEmpty()) { - return toStringNoName(); - } - return name; - } - - public String toStringNoName() { - return "register" + number; - } - - public String translate() { - if (name == null || name.trim().isEmpty()) { - return String.format(Configuration.registerNameFormat.get(), number); - } - return name; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.action.swf4; + +import com.jpexs.decompiler.flash.configuration.Configuration; +import java.io.Serializable; + +public class RegisterNumber implements Serializable { + + public int number; + public String name = null; + + @Override + public int hashCode() { + int hash = 3; + hash = 47 * hash + this.number; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final RegisterNumber other = (RegisterNumber) obj; + if (this.number != other.number) { + return false; + } + return true; + } + + public RegisterNumber(int number, String name) { + this.number = number; + this.name = name; + } + + public RegisterNumber(int number) { + this(number, null); + } + + @Override + public String toString() { + if (name == null || name.trim().isEmpty()) { + return toStringNoName(); + } + return name; + } + + public String toStringNoName() { + return "register" + number; + } + + public String translate() { + if (name == null || name.trim().isEmpty()) { + return String.format(Configuration.registerNameFormat.get(), number); + } + return name; + } +} diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java index 5900adeea..e278d3823 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionAdd2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java index a86dea780..bb1e85283 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitAnd.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java index 7fc71b7fc..ef1f068e6 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitLShift.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java index 5c1e2e5b2..d71d46fab 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitOr.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java index 4d19de1a2..6abebc23f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitRShift.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java index 26e88dc59..b95faa165 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitURShift.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java index 87830f355..885b3e4f4 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionBitXor.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java similarity index 65% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java index ad5371f31..34867cd16 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallFunction.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java index 16d8deec5..9031110b4 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionCallMethod.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java similarity index 80% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java index de85d5d5f..8bf0ccfbb 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java index 5e320db5f..6cc57e663 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDecrement.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java similarity index 90% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java index 36cba2029..2280c7d9f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java similarity index 60% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java index 59151e6f4..1b04f6248 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java index 9351614db..094fb2864 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineLocal2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java index 2c0e0b18c..b98251943 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java index f1cf01c97..8dec4bbc3 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java index 632276698..178a1d17b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEnumerate.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java index c15e1fa8a..f639a82ce 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionEquals2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java similarity index 58% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java index 087aa4d1d..05b078c26 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionGetMember.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java index c03d78600..b9ef34634 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionIncrement.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java similarity index 60% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java index db3b0c987..03d80667c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitArray.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java index b18d3f19c..55852934f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionInitObject.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java index 7260dfdf9..224dd6dcb 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionLess2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java index c1d43a716..183248cec 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionModulo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java similarity index 63% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java index 5955d9935..4dc6ac593 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewMethod.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java similarity index 61% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java index be3d371cf..ea5b23d16 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionNewObject.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java index e73033c89..7e54153e2 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionPushDuplicate.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java index 61074d3b8..c4b598b1c 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionReturn.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java similarity index 88% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java index 73e4146f6..cbce432cf 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionSetMember.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java similarity index 59% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java index e3a144a63..96d7ace8b 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStackSwap.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java similarity index 88% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java index 1c268379c..bc870f2d8 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java index 93bdbcfb7..b213e4de5 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTargetPath.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java index 1e4fac05f..08405fdb0 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToNumber.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java index b1b5bc151..dffca2e25 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionToString.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java similarity index 55% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java index be8d5633d..abbf95c6d 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionTypeOf.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java similarity index 83% rename from src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java index 637154f3a..34519b189 100644 --- a/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf5/ActionWith.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java index f2a85d6f2..bd9eced60 100644 --- a/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionEnumerate2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf6; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java similarity index 56% rename from src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java index e0527901b..b64a844cb 100644 --- a/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionGreater.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf6; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java index fd0e5ec16..e600bc064 100644 --- a/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionInstanceOf.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf6; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java index be4829a70..1ca668e99 100644 --- a/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStrictEquals.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf6; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java index fd67280ba..5dd3e3ec3 100644 --- a/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf6/ActionStringGreater.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf6; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java index 66d267b21..a18403157 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionCastOp.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java similarity index 94% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java index 3cd3108a8..8f3523533 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java index 09ddcdf73..f3bf13c44 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionExtends.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java similarity index 62% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java index 61e36038a..d9970725f 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionImplementsOp.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java similarity index 57% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java index 28a1251bd..b3a38effd 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionThrow.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.action.Action; diff --git a/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java similarity index 93% rename from src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java index 7434a06e4..e11d7e95a 100644 --- a/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.action.swf7; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java similarity index 97% rename from src/com/jpexs/decompiler/flash/configuration/Configuration.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 14dc9985d..91d0b353c 100644 --- a/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.configuration; import com.jpexs.decompiler.flash.ApplicationInfo; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java new file mode 100644 index 000000000..e1fdf16af --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigurationCategory { + + String value(); + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java new file mode 100644 index 000000000..3b67193cb --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigurationDefaultBoolean { + + boolean value(); + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java new file mode 100644 index 000000000..16964d5ed --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigurationDefaultInt { + + int value(); + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java new file mode 100644 index 000000000..b5c927dab --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigurationDefaultString { + + String value(); + +} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java similarity index 64% rename from src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java index 9a4d8faed..3b4dbdb41 100644 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java @@ -1,91 +1,90 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -/** - * - * @author JPEXS - * @param - */ -public class ConfigurationItem { - - private final String name; - protected boolean hasValue; - - private T value; - private T defaultValue; - private boolean modified; - - public ConfigurationItem(String name) { - this.name = name; - } - - public ConfigurationItem(String name, T defaultValue) { - this.name = name; - this.defaultValue = defaultValue; - } - - public ConfigurationItem(String name, T defaultValue, T value) { - this.name = name; - hasValue = true; - this.defaultValue = defaultValue; - this.value = value; - } - - public String getName() { - return name; - } - - public T get() { - if (!hasValue) { - return defaultValue; - } - return value; - } - - public T get(T defaultValue) { - if (!hasValue) { - return defaultValue; - } - return value; - } - - public void set(T value) { - hasValue = true; - modified = true; - this.value = value; - } - - public void unset() { - hasValue = false; - modified = true; - this.value = null; - } - - public boolean hasValue() { - return hasValue; - } - - public boolean isModified() { - return modified; - } - - @Override - public String toString() { - return name; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +/** + * + * @author JPEXS + * @param + */ +public class ConfigurationItem { + + private final String name; + protected boolean hasValue; + + private T value; + private T defaultValue; + private boolean modified; + + public ConfigurationItem(String name) { + this.name = name; + } + + public ConfigurationItem(String name, T defaultValue) { + this.name = name; + this.defaultValue = defaultValue; + } + + public ConfigurationItem(String name, T defaultValue, T value) { + this.name = name; + hasValue = true; + this.defaultValue = defaultValue; + this.value = value; + } + + public String getName() { + return name; + } + + public T get() { + if (!hasValue) { + return defaultValue; + } + return value; + } + + public T get(T defaultValue) { + if (!hasValue) { + return defaultValue; + } + return value; + } + + public void set(T value) { + hasValue = true; + modified = true; + this.value = value; + } + + public void unset() { + hasValue = false; + modified = true; + this.value = null; + } + + public boolean hasValue() { + return hasValue; + } + + public boolean isModified() { + return modified; + } + + @Override + public String toString() { + return name; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java new file mode 100644 index 000000000..8d6c5c7f2 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.configuration; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigurationName { + + String value(); + +} diff --git a/src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java similarity index 74% rename from src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java index 379890ce1..786c9fff2 100644 --- a/src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.dumpview; import com.jpexs.decompiler.flash.tags.TagStub; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java new file mode 100644 index 000000000..134591219 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.dumpview; + +import com.jpexs.decompiler.flash.SWF; + +/** + * + * @author JPEXS + */ +public class DumpInfoSwfNode extends DumpInfo { + + private final SWF swf; + + public DumpInfoSwfNode(SWF swf, String name, String type, Object value, long startByte, long lengthBytes) { + super(name, type, value, startByte, lengthBytes); + this.swf = swf; + } + + public SWF getSwf() { + return swf; + } + + public static DumpInfoSwfNode getSwfNode(DumpInfo dumpInfo) { + while (!(dumpInfo instanceof DumpInfoSwfNode)) { + dumpInfo = dumpInfo.parent; + } + return (DumpInfoSwfNode) dumpInfo; + } +} diff --git a/src/com/jpexs/decompiler/flash/ecma/EcmaScript.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaScript.java similarity index 89% rename from src/com/jpexs/decompiler/flash/ecma/EcmaScript.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaScript.java index 918bce0da..9106ae6e1 100644 --- a/src/com/jpexs/decompiler/flash/ecma/EcmaScript.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaScript.java @@ -1,295 +1,294 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.ecma; - -/** - * - * @author JPEXS - */ -public class EcmaScript { - - public static Double toNumber(Object o) { - if (o == null) { - return 0.0; - } - if (o instanceof Undefined) { - return Double.NaN; - } - if (o instanceof Null) { - return 0.0; - } - if (o instanceof Boolean) { - return (Boolean) o ? 1.0 : 0.0; - } - if (o instanceof Double) { - return (Double) o; - } - if (o instanceof Long) { - return (double) (long) (Long) o; - } - if (o instanceof Integer) { - return (double) (int) (Integer) o; - } - if (o instanceof String) { - try { - return Double.parseDouble((String) o); - } catch (NumberFormatException nfe) { - return Double.NaN; - } - } - //TODO:ToPrimitive - return 0.0; - } - - public static EcmaType type(Object o) { - if (o == null) { - return EcmaType.NULL; - } - if (o.getClass() == String.class) { - return EcmaType.STRING; - } - if (o.getClass() == Integer.class) { - return EcmaType.NUMBER; - } - if (o.getClass() == Double.class) { - return EcmaType.NUMBER; - } - if (o.getClass() == Long.class) { - return EcmaType.NUMBER; - } - - if (o.getClass() == Null.class) { - return EcmaType.NULL; - } - if (o.getClass() == Undefined.class) { - return EcmaType.UNDEFINED; - } - return EcmaType.OBJECT; - } - - public static Object compare(Object x, Object y) { - Object px = x; - Object py = y; - /*if (leftFirst) { - px = x; //toPrimitive - py = y; //toPrimitive - } else { - py = y; //toPrimitive - px = x; //toPrimitive - }*/ - if (type(px) != EcmaType.STRING || type(py) != EcmaType.STRING) { - Double nx = toNumber(px); - Double ny = toNumber(py); - if (nx.isNaN()) { - return new Undefined(); - } - if (ny.isNaN()) { - return new Undefined(); - } - if ((nx).compareTo(ny) == 0) { - return false; - } - if ((Double.compare(nx, -0.0) == 0) && (Double.compare(ny, 0.0) == 0)) { - return false; - } - if ((Double.compare(nx, 0.0) == 0) && (Double.compare(ny, -0.0) == 0)) { - return false; - } - if (nx.isInfinite() && nx > 0) { - return false; - } - if (ny.isInfinite() && ny > 0) { - return true; - } - if (nx.isInfinite() && nx < 0) { - return false; - } - if (ny.isInfinite() && ny < 0) { - return true; - } - if (nx.compareTo(ny) < 0) { - return true; - } - return false; - } else {//Both are STRING - String sx = (String) px; - String sy = (String) py; - - if (sx.startsWith(sy)) { - return false; - } - if (sy.startsWith(sx)) { - return true; - } - int len = sx.length() > sy.length() ? sx.length() : sy.length(); - for (int k = 0; k < len; k++) { - int m = 0; - int n = 0; - if (sx.length() > k) { - m = sx.charAt(k); - } - if (sy.length() > k) { - n = sy.charAt(k); - } - if (m != n) { - if (m < n) { - return true; - } else { - return false; - } - } - } - return false; - } - } - - public static boolean equals(Object x, Object y) { - EcmaType typeX = type(x); - EcmaType typeY = type(y); - if (typeX == typeY) { - if (typeX == null) { - return true; - } - if (typeX == EcmaType.NULL) { - return true; - } - if (typeX == EcmaType.UNDEFINED) { - return true; - } - if (typeX == EcmaType.NUMBER) { - if (x instanceof Integer) { - x = Double.valueOf((Integer) x); - } - if (x instanceof Long) { - x = Double.valueOf((Long) x); - } - if (y instanceof Integer) { - y = Double.valueOf((Integer) y); - } - if (y instanceof Long) { - y = Double.valueOf((Long) y); - } - if (((Double) x).isNaN()) { - return false; - } - if (((Double) y).isNaN()) { - return false; - } - if (((Double) x).compareTo((Double) y) == 0) { - return true; - } - if ((Double.compare((Double) x, -0.0) == 0) && (Double.compare((Double) y, 0.0) == 0)) { - return true; - } - if ((Double.compare((Double) x, 0.0) == 0) && (Double.compare((Double) y, -0.0) == 0)) { - return true; - } - return false; - } - if (typeX == EcmaType.STRING) { - return ((String) x).equals((String) y); - } - if (typeX == EcmaType.BOOLEAN) { - return x == y; - } - return x == y; - } - if ((typeX == EcmaType.NULL) && (typeY == EcmaType.UNDEFINED)) { - return true; - } - if ((typeX == EcmaType.UNDEFINED) && (typeY == EcmaType.NULL)) { - return true; - } - - if ((typeX == EcmaType.NUMBER) && (typeY == EcmaType.STRING)) { - return equals(x, toNumber(y)); - } - if ((typeX == EcmaType.STRING) && (typeY == EcmaType.NUMBER)) { - return equals(toNumber(x), y); - } - if (typeX == EcmaType.BOOLEAN) { - return equals(toNumber(x), y); - } - if (typeY == EcmaType.BOOLEAN) { - return equals(x, toNumber(y)); - } - if (typeX == EcmaType.STRING || typeX == EcmaType.NUMBER) { - //y is object - //return ecmaEquals(ecmaToPrimitive(x), y); - } - if (typeY == EcmaType.STRING || typeY == EcmaType.NUMBER) { - //x is object - //return ecmaEquals(x, ecmaToPrimitive(y)); - } - return false; - } - - public static boolean toBoolean(Object o) { - if (o == null) { - return false; - } - if (o instanceof Undefined) { - return false; - } - if (o instanceof Null) { - return false; - } - if (o instanceof Boolean) { - return (Boolean) o; - } - if (o instanceof Long) { - return ((Long) o) != 0; - } - if (o instanceof Integer) { - return ((Integer) o) != 0; - } - if (o instanceof Double) { - Double d = (Double) o; - if (d.isNaN()) { - return false; - } - if (Double.compare(d, 0) == 0) { - return false; - } - return true; - } - if (o instanceof String) { - String s = (String) o; - return !s.isEmpty(); - } - return true; //other Object - } - - public static Long toUint32(Object o) { - Double n = toNumber(o); - if (n.isNaN()) { - return 0L; - } - if (Double.compare(n, 0.0) == 0) { - return 0L; - } - if (Double.compare(n, -0.0) == 0) { - return 0L; - } - if (Double.isInfinite(n)) { - return 0L; - } - Long posInt = (long) (double) (Math.signum(n) * Math.floor(Math.abs(n))); - posInt %= (1 << 32); - return posInt; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.ecma; + +/** + * + * @author JPEXS + */ +public class EcmaScript { + + public static Double toNumber(Object o) { + if (o == null) { + return 0.0; + } + if (o instanceof Undefined) { + return Double.NaN; + } + if (o instanceof Null) { + return 0.0; + } + if (o instanceof Boolean) { + return (Boolean) o ? 1.0 : 0.0; + } + if (o instanceof Double) { + return (Double) o; + } + if (o instanceof Long) { + return (double) (long) (Long) o; + } + if (o instanceof Integer) { + return (double) (int) (Integer) o; + } + if (o instanceof String) { + try { + return Double.parseDouble((String) o); + } catch (NumberFormatException nfe) { + return Double.NaN; + } + } + //TODO:ToPrimitive + return 0.0; + } + + public static EcmaType type(Object o) { + if (o == null) { + return EcmaType.NULL; + } + if (o.getClass() == String.class) { + return EcmaType.STRING; + } + if (o.getClass() == Integer.class) { + return EcmaType.NUMBER; + } + if (o.getClass() == Double.class) { + return EcmaType.NUMBER; + } + if (o.getClass() == Long.class) { + return EcmaType.NUMBER; + } + + if (o.getClass() == Null.class) { + return EcmaType.NULL; + } + if (o.getClass() == Undefined.class) { + return EcmaType.UNDEFINED; + } + return EcmaType.OBJECT; + } + + public static Object compare(Object x, Object y) { + Object px = x; + Object py = y; + /*if (leftFirst) { + px = x; //toPrimitive + py = y; //toPrimitive + } else { + py = y; //toPrimitive + px = x; //toPrimitive + }*/ + if (type(px) != EcmaType.STRING || type(py) != EcmaType.STRING) { + Double nx = toNumber(px); + Double ny = toNumber(py); + if (nx.isNaN()) { + return new Undefined(); + } + if (ny.isNaN()) { + return new Undefined(); + } + if ((nx).compareTo(ny) == 0) { + return false; + } + if ((Double.compare(nx, -0.0) == 0) && (Double.compare(ny, 0.0) == 0)) { + return false; + } + if ((Double.compare(nx, 0.0) == 0) && (Double.compare(ny, -0.0) == 0)) { + return false; + } + if (nx.isInfinite() && nx > 0) { + return false; + } + if (ny.isInfinite() && ny > 0) { + return true; + } + if (nx.isInfinite() && nx < 0) { + return false; + } + if (ny.isInfinite() && ny < 0) { + return true; + } + if (nx.compareTo(ny) < 0) { + return true; + } + return false; + } else {//Both are STRING + String sx = (String) px; + String sy = (String) py; + + if (sx.startsWith(sy)) { + return false; + } + if (sy.startsWith(sx)) { + return true; + } + int len = sx.length() > sy.length() ? sx.length() : sy.length(); + for (int k = 0; k < len; k++) { + int m = 0; + int n = 0; + if (sx.length() > k) { + m = sx.charAt(k); + } + if (sy.length() > k) { + n = sy.charAt(k); + } + if (m != n) { + if (m < n) { + return true; + } else { + return false; + } + } + } + return false; + } + } + + public static boolean equals(Object x, Object y) { + EcmaType typeX = type(x); + EcmaType typeY = type(y); + if (typeX == typeY) { + if (typeX == null) { + return true; + } + if (typeX == EcmaType.NULL) { + return true; + } + if (typeX == EcmaType.UNDEFINED) { + return true; + } + if (typeX == EcmaType.NUMBER) { + if (x instanceof Integer) { + x = Double.valueOf((Integer) x); + } + if (x instanceof Long) { + x = Double.valueOf((Long) x); + } + if (y instanceof Integer) { + y = Double.valueOf((Integer) y); + } + if (y instanceof Long) { + y = Double.valueOf((Long) y); + } + if (((Double) x).isNaN()) { + return false; + } + if (((Double) y).isNaN()) { + return false; + } + if (((Double) x).compareTo((Double) y) == 0) { + return true; + } + if ((Double.compare((Double) x, -0.0) == 0) && (Double.compare((Double) y, 0.0) == 0)) { + return true; + } + if ((Double.compare((Double) x, 0.0) == 0) && (Double.compare((Double) y, -0.0) == 0)) { + return true; + } + return false; + } + if (typeX == EcmaType.STRING) { + return ((String) x).equals((String) y); + } + if (typeX == EcmaType.BOOLEAN) { + return x == y; + } + return x == y; + } + if ((typeX == EcmaType.NULL) && (typeY == EcmaType.UNDEFINED)) { + return true; + } + if ((typeX == EcmaType.UNDEFINED) && (typeY == EcmaType.NULL)) { + return true; + } + + if ((typeX == EcmaType.NUMBER) && (typeY == EcmaType.STRING)) { + return equals(x, toNumber(y)); + } + if ((typeX == EcmaType.STRING) && (typeY == EcmaType.NUMBER)) { + return equals(toNumber(x), y); + } + if (typeX == EcmaType.BOOLEAN) { + return equals(toNumber(x), y); + } + if (typeY == EcmaType.BOOLEAN) { + return equals(x, toNumber(y)); + } + if (typeX == EcmaType.STRING || typeX == EcmaType.NUMBER) { + //y is object + //return ecmaEquals(ecmaToPrimitive(x), y); + } + if (typeY == EcmaType.STRING || typeY == EcmaType.NUMBER) { + //x is object + //return ecmaEquals(x, ecmaToPrimitive(y)); + } + return false; + } + + public static boolean toBoolean(Object o) { + if (o == null) { + return false; + } + if (o instanceof Undefined) { + return false; + } + if (o instanceof Null) { + return false; + } + if (o instanceof Boolean) { + return (Boolean) o; + } + if (o instanceof Long) { + return ((Long) o) != 0; + } + if (o instanceof Integer) { + return ((Integer) o) != 0; + } + if (o instanceof Double) { + Double d = (Double) o; + if (d.isNaN()) { + return false; + } + if (Double.compare(d, 0) == 0) { + return false; + } + return true; + } + if (o instanceof String) { + String s = (String) o; + return !s.isEmpty(); + } + return true; //other Object + } + + public static Long toUint32(Object o) { + Double n = toNumber(o); + if (n.isNaN()) { + return 0L; + } + if (Double.compare(n, 0.0) == 0) { + return 0L; + } + if (Double.compare(n, -0.0) == 0) { + return 0L; + } + if (Double.isInfinite(n)) { + return 0L; + } + Long posInt = (long) (double) (Math.signum(n) * Math.floor(Math.abs(n))); + posInt %= (1 << 32); + return posInt; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaType.java new file mode 100644 index 000000000..edad4d298 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/EcmaType.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.ecma; + +/** + * + * @author JPEXS + */ +public enum EcmaType { + + NULL, + STRING, + NUMBER, + UNDEFINED, + OBJECT, + BOOLEAN +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Null.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Null.java new file mode 100644 index 000000000..928f0741e --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Null.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.ecma; + +import java.io.Serializable; + +public class Null implements Serializable { + + @Override + public String toString() { + return "null"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Undefined.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Undefined.java new file mode 100644 index 000000000..177c66fd4 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ecma/Undefined.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.ecma; + +import java.io.Serializable; + +public class Undefined implements Serializable { + + @Override + public String toString() { + return "undefined"; + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java similarity index 76% rename from src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java index cd125603f..40b0f1399 100644 --- a/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/BinaryDataExporter.java @@ -1,69 +1,68 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters; - -import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; -import com.jpexs.decompiler.flash.RetryTask; -import com.jpexs.decompiler.flash.RunnableIOEx; -import com.jpexs.decompiler.flash.exporters.settings.BinaryDataExportSettings; -import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; -import com.jpexs.decompiler.flash.tags.Tag; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class BinaryDataExporter { - - public List exportBinaryData(AbortRetryIgnoreHandler handler, String outdir, List tags, BinaryDataExportSettings settings) throws IOException { - List ret = new ArrayList<>(); - if (tags.isEmpty()) { - return ret; - } - File foutdir = new File(outdir); - if (!foutdir.exists()) { - if (!foutdir.mkdirs()) { - if (!foutdir.exists()) { - throw new IOException("Cannot create directory " + outdir); - } - } - } - - for (final Tag t : tags) { - if (t instanceof DefineBinaryDataTag) { - int characterID = ((DefineBinaryDataTag) t).getCharacterId(); - final File file = new File(outdir + File.separator + characterID + ".bin"); - new RetryTask(new RunnableIOEx() { - @Override - public void run() throws IOException { - try (FileOutputStream fos = new FileOutputStream(file)) { - fos.write(((DefineBinaryDataTag) t).binaryData); - } - } - }, handler).run(); - ret.add(file); - } - } - return ret; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters; + +import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; +import com.jpexs.decompiler.flash.RetryTask; +import com.jpexs.decompiler.flash.RunnableIOEx; +import com.jpexs.decompiler.flash.exporters.settings.BinaryDataExportSettings; +import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; +import com.jpexs.decompiler.flash.tags.Tag; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class BinaryDataExporter { + + public List exportBinaryData(AbortRetryIgnoreHandler handler, String outdir, List tags, BinaryDataExportSettings settings) throws IOException { + List ret = new ArrayList<>(); + if (tags.isEmpty()) { + return ret; + } + File foutdir = new File(outdir); + if (!foutdir.exists()) { + if (!foutdir.mkdirs()) { + if (!foutdir.exists()) { + throw new IOException("Cannot create directory " + outdir); + } + } + } + + for (final Tag t : tags) { + if (t instanceof DefineBinaryDataTag) { + int characterID = ((DefineBinaryDataTag) t).getCharacterId(); + final File file = new File(outdir + File.separator + characterID + ".bin"); + new RetryTask(new RunnableIOEx() { + @Override + public void run() throws IOException { + try (FileOutputStream fos = new FileOutputStream(file)) { + fos.write(((DefineBinaryDataTag) t).binaryData); + } + } + }, handler).run(); + ret.add(file); + } + } + return ret; + } + +} diff --git a/src/com/jpexs/decompiler/flash/exporters/FontExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java similarity index 92% rename from src/com/jpexs/decompiler/flash/exporters/FontExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java index 3a8064700..af6b56378 100644 --- a/src/com/jpexs/decompiler/flash/exporters/FontExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.google.typography.font.sfntly.Font; diff --git a/src/com/jpexs/decompiler/flash/exporters/ImageExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ImageExporter.java similarity index 81% rename from src/com/jpexs/decompiler/flash/exporters/ImageExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ImageExporter.java index c1fa43564..1d876ada4 100644 --- a/src/com/jpexs/decompiler/flash/exporters/ImageExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ImageExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java similarity index 90% rename from src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java index c41c2cfe7..8331ee0aa 100644 --- a/src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MorphShapeExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java similarity index 92% rename from src/com/jpexs/decompiler/flash/exporters/MovieExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java index 6c24a99cc..de2d27238 100644 --- a/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java similarity index 91% rename from src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java index ba49a03e6..11c75acca 100644 --- a/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/ShapeExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java similarity index 90% rename from src/com/jpexs/decompiler/flash/exporters/SoundExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java index b118290c1..1accd9114 100644 --- a/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/TextExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/TextExporter.java similarity index 91% rename from src/com/jpexs/decompiler/flash/exporters/TextExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/TextExporter.java index ade7811fd..867b67b70 100644 --- a/src/com/jpexs/decompiler/flash/exporters/TextExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/TextExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java similarity index 67% rename from src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java index 531441052..285ff2ff3 100644 --- a/src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/ExportRectangle.java @@ -1,79 +1,78 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.commonshape; - -import com.jpexs.decompiler.flash.types.RECT; -import java.awt.geom.Rectangle2D; - -/** - * - * @author JPEXS - */ -public class ExportRectangle { - - public double xMin; - public double yMin; - public double xMax; - public double yMax; - - public ExportRectangle(double xMin, double yMin, double xMax, double yMax) { - this.xMin = xMin; - this.yMin = yMin; - this.xMax = xMax; - this.yMax = yMax; - } - - public ExportRectangle(RECT rect) { - this.xMin = rect.Xmin; - this.yMin = rect.Ymin; - this.xMax = rect.Xmax; - this.yMax = rect.Ymax; - } - - public ExportRectangle(Rectangle2D rect) { - this.xMin = rect.getMinX(); - this.yMin = rect.getMinY(); - this.xMax = rect.getMaxX(); - this.yMax = rect.getMaxY(); - } - - public double getWidth() { - return xMax - xMin; - } - - public double getHeight() { - return yMax - yMin; - } - - @Override - public int hashCode() { - long bits = Double.doubleToLongBits(xMin); - bits += Double.doubleToLongBits(yMin) * 37; - bits += Double.doubleToLongBits(xMax) * 43; - bits += Double.doubleToLongBits(yMax) * 47; - return (((int) bits) ^ ((int) (bits >> 32))); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof ExportRectangle) { - ExportRectangle r = (ExportRectangle) obj; - return (xMin == r.xMin) && (yMin == r.yMin) && (xMax == r.xMax) && (yMax == r.yMax); - } - return super.equals(obj); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.commonshape; + +import com.jpexs.decompiler.flash.types.RECT; +import java.awt.geom.Rectangle2D; + +/** + * + * @author JPEXS + */ +public class ExportRectangle { + + public double xMin; + public double yMin; + public double xMax; + public double yMax; + + public ExportRectangle(double xMin, double yMin, double xMax, double yMax) { + this.xMin = xMin; + this.yMin = yMin; + this.xMax = xMax; + this.yMax = yMax; + } + + public ExportRectangle(RECT rect) { + this.xMin = rect.Xmin; + this.yMin = rect.Ymin; + this.xMax = rect.Xmax; + this.yMax = rect.Ymax; + } + + public ExportRectangle(Rectangle2D rect) { + this.xMin = rect.getMinX(); + this.yMin = rect.getMinY(); + this.xMax = rect.getMaxX(); + this.yMax = rect.getMaxY(); + } + + public double getWidth() { + return xMax - xMin; + } + + public double getHeight() { + return yMax - yMin; + } + + @Override + public int hashCode() { + long bits = Double.doubleToLongBits(xMin); + bits += Double.doubleToLongBits(yMin) * 37; + bits += Double.doubleToLongBits(xMax) * 43; + bits += Double.doubleToLongBits(yMax) * 47; + return (((int) bits) ^ ((int) (bits >> 32))); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof ExportRectangle) { + ExportRectangle r = (ExportRectangle) obj; + return (xMin == r.xMin) && (yMin == r.yMin) && (xMax == r.xMax) && (yMax == r.yMax); + } + return super.equals(obj); + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java similarity index 88% rename from src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java index 677b0417d..957378c81 100644 --- a/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Matrix.java @@ -1,232 +1,231 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.commonshape; - -import com.jpexs.decompiler.flash.types.MATRIX; -import java.awt.geom.AffineTransform; - -/** - * - * @author JPEXS - */ -public class Matrix { - - public double scaleX = 1; - public double scaleY = 1; - public double rotateSkew0; - public double rotateSkew1; - public double translateX; - public double translateY; - - public static Matrix getScaleInstance(double scale) { - Matrix mat = new Matrix(); - mat.scale(scale); - return mat; - } - - public static Matrix getTranslateInstance(double x, double y) { - Matrix mat = new Matrix(); - mat.translate(x, y); - return mat; - } - - public Matrix() { - scaleX = 1; - scaleY = 1; - } - - public Matrix(MATRIX matrix) { - if (matrix == null) { - matrix = new MATRIX(); - } - translateX = matrix.translateX; - translateY = matrix.translateY; - if (matrix.hasScale) { - scaleX = matrix.getScaleXFloat(); - scaleY = matrix.getScaleYFloat(); - } else { - scaleX = 1; - scaleY = 1; - } - if (matrix.hasRotate) { - rotateSkew0 = matrix.getRotateSkew0Float(); - rotateSkew1 = matrix.getRotateSkew1Float(); - } - } - - public Matrix(AffineTransform transform) { - this(); - if (transform != null) { - scaleX = transform.getScaleX(); - rotateSkew1 = transform.getShearX(); - translateX = transform.getTranslateX(); - rotateSkew0 = transform.getShearY(); - scaleY = transform.getScaleY(); - translateY = transform.getTranslateY(); - } - } - - @Override - public Matrix clone() { - Matrix mat = new Matrix(); - mat.translateX = translateX; - mat.translateY = translateY; - mat.scaleX = scaleX; - mat.scaleY = scaleY; - mat.rotateSkew0 = rotateSkew0; - mat.rotateSkew1 = rotateSkew1; - return mat; - } - - public Point transform(double x, double y) { - Point result = new Point( - scaleX * x + rotateSkew1 * y + translateX, - rotateSkew0 * x + scaleY * y + translateY); - return result; - } - - public Point transform(Point point) { - return transform(point.x, point.y); - } - - public java.awt.Point transform(java.awt.Point point) { - Point p = transform(point.x, point.y); - return new java.awt.Point((int) p.x, (int) p.y); - } - - public ExportRectangle transform(ExportRectangle rect) { - double minX = Double.MAX_VALUE; - double minY = Double.MAX_VALUE; - double maxX = Double.MIN_VALUE; - double maxY = Double.MIN_VALUE; - Point point; - point = transform(rect.xMin, rect.yMin); - if (point.x < minX) { - minX = point.x; - } - if (point.x > maxX) { - maxX = point.x; - } - if (point.y < minY) { - minY = point.y; - } - if (point.y > maxY) { - maxY = point.y; - } - point = transform(rect.xMax, rect.yMin); - if (point.x < minX) { - minX = point.x; - } - if (point.x > maxX) { - maxX = point.x; - } - if (point.y < minY) { - minY = point.y; - } - if (point.y > maxY) { - maxY = point.y; - } - point = transform(rect.xMin, rect.yMax); - if (point.x < minX) { - minX = point.x; - } - if (point.x > maxX) { - maxX = point.x; - } - if (point.y < minY) { - minY = point.y; - } - if (point.y > maxY) { - maxY = point.y; - } - point = transform(rect.xMax, rect.yMax); - if (point.x < minX) { - minX = point.x; - } - if (point.x > maxX) { - maxX = point.x; - } - if (point.y < minY) { - minY = point.y; - } - if (point.y > maxY) { - maxY = point.y; - } - return new ExportRectangle(minX, minY, maxX, maxY); - } - - public void translate(double x, double y) { - translateX += x; - translateY += y; - } - - public void scale(double factor) { - scaleX *= factor; - scaleY *= factor; - rotateSkew0 *= factor; - rotateSkew1 *= factor; - } - - public Matrix concatenate(Matrix m) { - Matrix result = new Matrix(); - result.scaleX = scaleX * m.scaleX + rotateSkew1 * m.rotateSkew0; - result.rotateSkew0 = rotateSkew0 * m.scaleX + scaleY * m.rotateSkew0; - result.rotateSkew1 = scaleX * m.rotateSkew1 + rotateSkew1 * m.scaleY; - result.scaleY = rotateSkew0 * m.rotateSkew1 + scaleY * m.scaleY; - result.translateX = scaleX * m.translateX + rotateSkew1 * m.translateY + translateX; - result.translateY = rotateSkew0 * m.translateX + scaleY * m.translateY + translateY; - return result; - } - - public Matrix preConcatenate(Matrix m) { - Matrix result = new Matrix(); - result.scaleX = m.scaleX * scaleX + m.rotateSkew1 * rotateSkew0; - result.rotateSkew0 = m.rotateSkew0 * scaleX + m.scaleY * rotateSkew0; - result.rotateSkew1 = m.scaleX * rotateSkew1 + m.rotateSkew1 * scaleY; - result.scaleY = m.rotateSkew0 * rotateSkew1 + m.scaleY * scaleY; - result.translateX = m.scaleX * translateX + m.rotateSkew1 * translateY + m.translateX; - result.translateY = m.rotateSkew0 * translateX + m.scaleY * translateY + m.translateY; - return result; - } - - public AffineTransform toTransform() { - AffineTransform transform = new AffineTransform(scaleX, rotateSkew0, - rotateSkew1, scaleY, - translateX, translateY); - return transform; - } - - public String getTransformationString(double translateDivisor, double unitDivisor) { - double translateX = roundPixels400(this.translateX / translateDivisor); - double translateY = roundPixels400(this.translateY / translateDivisor); - double rotateSkew0 = roundPixels400(this.rotateSkew0 / unitDivisor); - double rotateSkew1 = roundPixels400(this.rotateSkew1 / unitDivisor); - double scaleX = roundPixels400(this.scaleX / unitDivisor); - double scaleY = roundPixels400(this.scaleY / unitDivisor); - return "matrix(" + scaleX + ", " + rotateSkew0 + ", " - + rotateSkew1 + ", " + scaleY + ", " + translateX + ", " + translateY + ")"; - } - - private double roundPixels400(double pixels) { - return Math.round(pixels * 10000) / 10000.0; - } - - @Override - public String toString() { - return "[Matrix scale:" + scaleX + "," + scaleY + ", rotate:" + rotateSkew0 + "," + rotateSkew1 + ", translate:" + translateX + "," + translateY + "]"; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.commonshape; + +import com.jpexs.decompiler.flash.types.MATRIX; +import java.awt.geom.AffineTransform; + +/** + * + * @author JPEXS + */ +public class Matrix { + + public double scaleX = 1; + public double scaleY = 1; + public double rotateSkew0; + public double rotateSkew1; + public double translateX; + public double translateY; + + public static Matrix getScaleInstance(double scale) { + Matrix mat = new Matrix(); + mat.scale(scale); + return mat; + } + + public static Matrix getTranslateInstance(double x, double y) { + Matrix mat = new Matrix(); + mat.translate(x, y); + return mat; + } + + public Matrix() { + scaleX = 1; + scaleY = 1; + } + + public Matrix(MATRIX matrix) { + if (matrix == null) { + matrix = new MATRIX(); + } + translateX = matrix.translateX; + translateY = matrix.translateY; + if (matrix.hasScale) { + scaleX = matrix.getScaleXFloat(); + scaleY = matrix.getScaleYFloat(); + } else { + scaleX = 1; + scaleY = 1; + } + if (matrix.hasRotate) { + rotateSkew0 = matrix.getRotateSkew0Float(); + rotateSkew1 = matrix.getRotateSkew1Float(); + } + } + + public Matrix(AffineTransform transform) { + this(); + if (transform != null) { + scaleX = transform.getScaleX(); + rotateSkew1 = transform.getShearX(); + translateX = transform.getTranslateX(); + rotateSkew0 = transform.getShearY(); + scaleY = transform.getScaleY(); + translateY = transform.getTranslateY(); + } + } + + @Override + public Matrix clone() { + Matrix mat = new Matrix(); + mat.translateX = translateX; + mat.translateY = translateY; + mat.scaleX = scaleX; + mat.scaleY = scaleY; + mat.rotateSkew0 = rotateSkew0; + mat.rotateSkew1 = rotateSkew1; + return mat; + } + + public Point transform(double x, double y) { + Point result = new Point( + scaleX * x + rotateSkew1 * y + translateX, + rotateSkew0 * x + scaleY * y + translateY); + return result; + } + + public Point transform(Point point) { + return transform(point.x, point.y); + } + + public java.awt.Point transform(java.awt.Point point) { + Point p = transform(point.x, point.y); + return new java.awt.Point((int) p.x, (int) p.y); + } + + public ExportRectangle transform(ExportRectangle rect) { + double minX = Double.MAX_VALUE; + double minY = Double.MAX_VALUE; + double maxX = Double.MIN_VALUE; + double maxY = Double.MIN_VALUE; + Point point; + point = transform(rect.xMin, rect.yMin); + if (point.x < minX) { + minX = point.x; + } + if (point.x > maxX) { + maxX = point.x; + } + if (point.y < minY) { + minY = point.y; + } + if (point.y > maxY) { + maxY = point.y; + } + point = transform(rect.xMax, rect.yMin); + if (point.x < minX) { + minX = point.x; + } + if (point.x > maxX) { + maxX = point.x; + } + if (point.y < minY) { + minY = point.y; + } + if (point.y > maxY) { + maxY = point.y; + } + point = transform(rect.xMin, rect.yMax); + if (point.x < minX) { + minX = point.x; + } + if (point.x > maxX) { + maxX = point.x; + } + if (point.y < minY) { + minY = point.y; + } + if (point.y > maxY) { + maxY = point.y; + } + point = transform(rect.xMax, rect.yMax); + if (point.x < minX) { + minX = point.x; + } + if (point.x > maxX) { + maxX = point.x; + } + if (point.y < minY) { + minY = point.y; + } + if (point.y > maxY) { + maxY = point.y; + } + return new ExportRectangle(minX, minY, maxX, maxY); + } + + public void translate(double x, double y) { + translateX += x; + translateY += y; + } + + public void scale(double factor) { + scaleX *= factor; + scaleY *= factor; + rotateSkew0 *= factor; + rotateSkew1 *= factor; + } + + public Matrix concatenate(Matrix m) { + Matrix result = new Matrix(); + result.scaleX = scaleX * m.scaleX + rotateSkew1 * m.rotateSkew0; + result.rotateSkew0 = rotateSkew0 * m.scaleX + scaleY * m.rotateSkew0; + result.rotateSkew1 = scaleX * m.rotateSkew1 + rotateSkew1 * m.scaleY; + result.scaleY = rotateSkew0 * m.rotateSkew1 + scaleY * m.scaleY; + result.translateX = scaleX * m.translateX + rotateSkew1 * m.translateY + translateX; + result.translateY = rotateSkew0 * m.translateX + scaleY * m.translateY + translateY; + return result; + } + + public Matrix preConcatenate(Matrix m) { + Matrix result = new Matrix(); + result.scaleX = m.scaleX * scaleX + m.rotateSkew1 * rotateSkew0; + result.rotateSkew0 = m.rotateSkew0 * scaleX + m.scaleY * rotateSkew0; + result.rotateSkew1 = m.scaleX * rotateSkew1 + m.rotateSkew1 * scaleY; + result.scaleY = m.rotateSkew0 * rotateSkew1 + m.scaleY * scaleY; + result.translateX = m.scaleX * translateX + m.rotateSkew1 * translateY + m.translateX; + result.translateY = m.rotateSkew0 * translateX + m.scaleY * translateY + m.translateY; + return result; + } + + public AffineTransform toTransform() { + AffineTransform transform = new AffineTransform(scaleX, rotateSkew0, + rotateSkew1, scaleY, + translateX, translateY); + return transform; + } + + public String getTransformationString(double translateDivisor, double unitDivisor) { + double translateX = roundPixels400(this.translateX / translateDivisor); + double translateY = roundPixels400(this.translateY / translateDivisor); + double rotateSkew0 = roundPixels400(this.rotateSkew0 / unitDivisor); + double rotateSkew1 = roundPixels400(this.rotateSkew1 / unitDivisor); + double scaleX = roundPixels400(this.scaleX / unitDivisor); + double scaleY = roundPixels400(this.scaleY / unitDivisor); + return "matrix(" + scaleX + ", " + rotateSkew0 + ", " + + rotateSkew1 + ", " + scaleY + ", " + translateX + ", " + translateY + ")"; + } + + private double roundPixels400(double pixels) { + return Math.round(pixels * 10000) / 10000.0; + } + + @Override + public String toString() { + return "[Matrix scale:" + scaleX + "," + scaleY + ", rotate:" + rotateSkew0 + "," + rotateSkew1 + ", translate:" + translateX + "," + translateY + "]"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java new file mode 100644 index 000000000..5ccc72be7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.commonshape; + +/** + * + * @author JPEXS + */ +public class Point { + + public double x; + public double y; + + public Point(double x, double y) { + this.x = x; + this.y = y; + } + + @Override + public int hashCode() { + long bits = Double.doubleToLongBits(x); + bits ^= Double.doubleToLongBits(y) * 31; + return (((int) bits) ^ ((int) (bits >> 32))); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Point) { + Point pt = (Point) obj; + return (x == pt.x) && (y == pt.y); + } + return super.equals(obj); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java new file mode 100644 index 000000000..06ee81a9a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.commonshape; + +/** + * + * @author JPEXS + */ +public class PointInt { + + public int x; + public int y; + + public PointInt(int x, int y) { + this.x = x; + this.y = y; + } + + @Override + public int hashCode() { + long bits = Double.doubleToLongBits(x); + bits ^= Double.doubleToLongBits(y) * 31; + return (((int) bits) ^ ((int) (bits >> 32))); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof PointInt) { + PointInt pt = (PointInt) obj; + return (x == pt.x) && (y == pt.y); + } + return super.equals(obj); + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java similarity index 90% rename from src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java index 73e3fba5e..d05dc17d9 100644 --- a/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java @@ -1,257 +1,256 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.commonshape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.types.RECT; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.helpers.Helper; -import java.awt.Color; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Stack; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.xml.bind.DatatypeConverter; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import org.w3c.dom.Attr; -import org.w3c.dom.CDATASection; -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentType; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * - * @author JPEXS - */ -public class SVGExporter { - - protected static final String sNamespace = "http://www.w3.org/2000/svg"; - protected static final String xlinkNamespace = "http://www.w3.org/1999/xlink"; - - protected Document _svg; - protected Element _svgDefs; - protected CDATASection _svgStyle; - protected Stack _svgGs = new Stack<>(); - public List gradients; - protected int lastPatternId; - public Map exportedTags = new HashMap<>(); - public Map> exportedChars = new HashMap<>(); - private final Map lastIds = new HashMap<>(); - private final HashSet fontFaces = new HashSet<>(); - private String clip; - public boolean useTextTag = Configuration.textExportExportFontFace.get(); - - public SVGExporter(ExportRectangle bounds) { - - DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); - try { - DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); - DOMImplementation impl = docBuilder.getDOMImplementation(); - DocumentType svgDocType = impl.createDocumentType("svg", "-//W3C//DTD SVG 1.0//EN", - "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"); - _svg = impl.createDocument(sNamespace, "svg", svgDocType); - Element svgRoot = _svg.getDocumentElement(); - svgRoot.setAttribute("xmlns:xlink", xlinkNamespace); - if (bounds != null) { - svgRoot.setAttribute("width", (bounds.getWidth() / SWF.unitDivisor) + "px"); - svgRoot.setAttribute("height", (bounds.getHeight() / SWF.unitDivisor) + "px"); - createDefGroup(bounds, null); - } - } catch (ParserConfigurationException ex) { - Logger.getLogger(SVGExporter.class.getName()).log(Level.SEVERE, null, ex); - } - gradients = new ArrayList<>(); - } - - private Element getDefs() { - if (_svgDefs == null) { - _svgDefs = _svg.createElement("defs"); - _svg.getDocumentElement().appendChild(_svgDefs); - } - return _svgDefs; - } - - private CDATASection getStyle() { - if (_svgStyle == null) { - Element style = _svg.createElement("style"); - _svgStyle = _svg.createCDATASection(""); - style.appendChild(_svgStyle); - getDefs().appendChild(style); - } - return _svgStyle; - } - - public final void createDefGroup(ExportRectangle bounds, String id) { - Element g = _svg.createElement("g"); - if (bounds != null) { - g.setAttribute("transform", "matrix(1, 0, 0, 1, " - + roundPixels20(-bounds.xMin / (double) SWF.unitDivisor) + ", " + roundPixels20(-bounds.yMin / (double) SWF.unitDivisor) + ")"); - } - if (id != null) { - g.setAttribute("id", id); - } - if (_svgGs.size() == 0) { - _svg.getDocumentElement().appendChild(g); - } else { - getDefs().appendChild(g); - } - _svgGs.add(g); - } - - public void endGroup() { - Element g = _svgGs.pop(); - if (g.getChildNodes().getLength() == 0) { - g.getParentNode().removeChild(g); - } - } - - public final Element createSubGroup(Matrix transform, String id) { - Element group = createSubGroup(transform, id, "g"); - group.setAttribute("transform", transform.getTransformationString(SWF.unitDivisor, 1)); - return group; - } - - public final Element createClipPath(Matrix transform, String id) { - Element group = createSubGroup(transform, id, "clipPath"); - Node parent = group.getParentNode(); - if (parent instanceof Element) { - Element parentElement = (Element) parent; - group.setAttribute("transform", parentElement.getAttribute("transform")); - } - return group; - } - - private Element createSubGroup(Matrix transform, String id, String tagName) { - Element group = _svg.createElement(tagName); - if (id != null) { - group.setAttribute("id", id); - } - _svgGs.peek().appendChild(group); - _svgGs.add(group); - return group; - } - - public void addToGroup(Node newChild) { - _svgGs.peek().appendChild(newChild); - } - - public void addToDefs(Node newChild) { - getDefs().appendChild(newChild); - } - - public Element createElement(String tagName) { - return _svg.createElement(tagName); - } - - public String getSVG() { - TransformerFactory transformerFactory = TransformerFactory.newInstance(); - StringWriter writer = new StringWriter(); - try { - Transformer transformer = transformerFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); - DOMSource source = new DOMSource(_svg); - StreamResult result = new StreamResult(writer); - transformer.transform(source, result); - } catch (TransformerException ex) { - Logger.getLogger(SVGExporter.class.getName()).log(Level.SEVERE, null, ex); - } - return writer.toString(); - } - - public void setBackGroundColor(Color backGroundColor) { - Attr attr = _svg.createAttribute("style"); - attr.setValue("background: " + new RGBA(backGroundColor).toHexARGB()); - } - - public Element addUse(Matrix transform, RECT boundRect, String href) { - Element image = _svg.createElement("use"); - if (transform != null) { - image.setAttribute("transform", transform.getTransformationString(SWF.unitDivisor, 1)); - image.setAttribute("width", Double.toString(boundRect.getWidth() / (double) SWF.unitDivisor)); - image.setAttribute("height", Double.toString(boundRect.getHeight() / (double) SWF.unitDivisor)); - } - image.setAttribute("xlink:href", "#" + href); - if (clip != null) { - image.setAttribute("clip-path", "url(#" + clip + ")"); - } - _svgGs.peek().appendChild(image); - return image; - } - - public void addStyle(String fontFace, byte[] data, FontExportMode mode) { - if (!fontFaces.contains(fontFace)) { - fontFaces.add(fontFace); - String base64Data = DatatypeConverter.printBase64Binary(data); - String value = getStyle().getTextContent(); - value += Helper.newLine; - value += " @font-face {" + Helper.newLine; - value += " font-family: \"" + fontFace + "\";" + Helper.newLine; - switch (mode) { - case TTF: - value += " src: url('data:font/truetype;base64," + base64Data + "') format(\"truetype\");" + Helper.newLine; - break; - case WOFF: - value += " src: url('data:font/woff;base64," + base64Data + "') format(\"woff\");" + Helper.newLine; - break; - } - value += " }" + Helper.newLine; - getStyle().setTextContent(value); - } - } - - public String getUniqueId(String prefix) { - Integer lastId = lastIds.get(prefix); - if (lastId == null) { - lastId = 0; - } else { - lastId++; - } - lastIds.put(prefix, lastId); - return prefix + lastId; - } - - public void setClip(String clip) { - this.clip = clip; - } - - public String getClip() { - return clip; - } - - protected static double roundPixels20(double pixels) { - return Math.round(pixels * 100) / 100.0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.commonshape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.helpers.Helper; +import java.awt.Color; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Stack; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.xml.bind.DatatypeConverter; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentType; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +/** + * + * @author JPEXS + */ +public class SVGExporter { + + protected static final String sNamespace = "http://www.w3.org/2000/svg"; + protected static final String xlinkNamespace = "http://www.w3.org/1999/xlink"; + + protected Document _svg; + protected Element _svgDefs; + protected CDATASection _svgStyle; + protected Stack _svgGs = new Stack<>(); + public List gradients; + protected int lastPatternId; + public Map exportedTags = new HashMap<>(); + public Map> exportedChars = new HashMap<>(); + private final Map lastIds = new HashMap<>(); + private final HashSet fontFaces = new HashSet<>(); + private String clip; + public boolean useTextTag = Configuration.textExportExportFontFace.get(); + + public SVGExporter(ExportRectangle bounds) { + + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + try { + DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); + DOMImplementation impl = docBuilder.getDOMImplementation(); + DocumentType svgDocType = impl.createDocumentType("svg", "-//W3C//DTD SVG 1.0//EN", + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"); + _svg = impl.createDocument(sNamespace, "svg", svgDocType); + Element svgRoot = _svg.getDocumentElement(); + svgRoot.setAttribute("xmlns:xlink", xlinkNamespace); + if (bounds != null) { + svgRoot.setAttribute("width", (bounds.getWidth() / SWF.unitDivisor) + "px"); + svgRoot.setAttribute("height", (bounds.getHeight() / SWF.unitDivisor) + "px"); + createDefGroup(bounds, null); + } + } catch (ParserConfigurationException ex) { + Logger.getLogger(SVGExporter.class.getName()).log(Level.SEVERE, null, ex); + } + gradients = new ArrayList<>(); + } + + private Element getDefs() { + if (_svgDefs == null) { + _svgDefs = _svg.createElement("defs"); + _svg.getDocumentElement().appendChild(_svgDefs); + } + return _svgDefs; + } + + private CDATASection getStyle() { + if (_svgStyle == null) { + Element style = _svg.createElement("style"); + _svgStyle = _svg.createCDATASection(""); + style.appendChild(_svgStyle); + getDefs().appendChild(style); + } + return _svgStyle; + } + + public final void createDefGroup(ExportRectangle bounds, String id) { + Element g = _svg.createElement("g"); + if (bounds != null) { + g.setAttribute("transform", "matrix(1, 0, 0, 1, " + + roundPixels20(-bounds.xMin / (double) SWF.unitDivisor) + ", " + roundPixels20(-bounds.yMin / (double) SWF.unitDivisor) + ")"); + } + if (id != null) { + g.setAttribute("id", id); + } + if (_svgGs.size() == 0) { + _svg.getDocumentElement().appendChild(g); + } else { + getDefs().appendChild(g); + } + _svgGs.add(g); + } + + public void endGroup() { + Element g = _svgGs.pop(); + if (g.getChildNodes().getLength() == 0) { + g.getParentNode().removeChild(g); + } + } + + public final Element createSubGroup(Matrix transform, String id) { + Element group = createSubGroup(transform, id, "g"); + group.setAttribute("transform", transform.getTransformationString(SWF.unitDivisor, 1)); + return group; + } + + public final Element createClipPath(Matrix transform, String id) { + Element group = createSubGroup(transform, id, "clipPath"); + Node parent = group.getParentNode(); + if (parent instanceof Element) { + Element parentElement = (Element) parent; + group.setAttribute("transform", parentElement.getAttribute("transform")); + } + return group; + } + + private Element createSubGroup(Matrix transform, String id, String tagName) { + Element group = _svg.createElement(tagName); + if (id != null) { + group.setAttribute("id", id); + } + _svgGs.peek().appendChild(group); + _svgGs.add(group); + return group; + } + + public void addToGroup(Node newChild) { + _svgGs.peek().appendChild(newChild); + } + + public void addToDefs(Node newChild) { + getDefs().appendChild(newChild); + } + + public Element createElement(String tagName) { + return _svg.createElement(tagName); + } + + public String getSVG() { + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + StringWriter writer = new StringWriter(); + try { + Transformer transformer = transformerFactory.newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); + DOMSource source = new DOMSource(_svg); + StreamResult result = new StreamResult(writer); + transformer.transform(source, result); + } catch (TransformerException ex) { + Logger.getLogger(SVGExporter.class.getName()).log(Level.SEVERE, null, ex); + } + return writer.toString(); + } + + public void setBackGroundColor(Color backGroundColor) { + Attr attr = _svg.createAttribute("style"); + attr.setValue("background: " + new RGBA(backGroundColor).toHexARGB()); + } + + public Element addUse(Matrix transform, RECT boundRect, String href) { + Element image = _svg.createElement("use"); + if (transform != null) { + image.setAttribute("transform", transform.getTransformationString(SWF.unitDivisor, 1)); + image.setAttribute("width", Double.toString(boundRect.getWidth() / (double) SWF.unitDivisor)); + image.setAttribute("height", Double.toString(boundRect.getHeight() / (double) SWF.unitDivisor)); + } + image.setAttribute("xlink:href", "#" + href); + if (clip != null) { + image.setAttribute("clip-path", "url(#" + clip + ")"); + } + _svgGs.peek().appendChild(image); + return image; + } + + public void addStyle(String fontFace, byte[] data, FontExportMode mode) { + if (!fontFaces.contains(fontFace)) { + fontFaces.add(fontFace); + String base64Data = DatatypeConverter.printBase64Binary(data); + String value = getStyle().getTextContent(); + value += Helper.newLine; + value += " @font-face {" + Helper.newLine; + value += " font-family: \"" + fontFace + "\";" + Helper.newLine; + switch (mode) { + case TTF: + value += " src: url('data:font/truetype;base64," + base64Data + "') format(\"truetype\");" + Helper.newLine; + break; + case WOFF: + value += " src: url('data:font/woff;base64," + base64Data + "') format(\"woff\");" + Helper.newLine; + break; + } + value += " }" + Helper.newLine; + getStyle().setTextContent(value); + } + } + + public String getUniqueId(String prefix) { + Integer lastId = lastIds.get(prefix); + if (lastId == null) { + lastId = 0; + } else { + lastId++; + } + lastIds.put(prefix, lastId); + return prefix + lastId; + } + + public void setClip(String clip) { + this.clip = clip; + } + + public String getClip() { + return clip; + } + + protected static double roundPixels20(double pixels) { + return Math.round(pixels * 100) / 100.0; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java new file mode 100644 index 000000000..8e295c9c7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum BinaryDataExportMode { + + RAW +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java new file mode 100644 index 000000000..7d971d8fa --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum FontExportMode { + + TTF, + WOFF +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java new file mode 100644 index 000000000..b1813c53b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum FramesExportMode { + + PNG, + GIF, + AVI, + SVG, + CANVAS, + PDF +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java new file mode 100644 index 000000000..d4421fb84 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum ImageExportMode { + + PNG_JPEG, PNG, JPEG +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java new file mode 100644 index 000000000..a10a659e7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum MorphShapeExportMode { + + //TODO: implement other morphshape export modes + SVG, + CANVAS + //PNG, + //GIF, + //AVI +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java new file mode 100644 index 000000000..a962a1a29 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum MovieExportMode { + + FLV +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java new file mode 100644 index 000000000..4b1aa89dd --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum ScriptExportMode { + + AS, PCODE, PCODE_HEX, HEX; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java new file mode 100644 index 000000000..3faae7068 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum ShapeExportMode { + + SVG, + PNG, + CANVAS +} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java similarity index 55% rename from src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java index ca36d4f05..f9157ff23 100644 --- a/src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/SoundExportMode.java @@ -1,46 +1,45 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum SoundExportMode { - - MP3_WAV_FLV(true, true, true), FLV(false, false, true), MP3_WAV(true, true, false), WAV(false, true, false); - - private final boolean mp3, wav, flv; - - private SoundExportMode(boolean mp3, boolean wav, boolean flv) { - this.mp3 = mp3; - this.wav = wav; - this.flv = flv; - } - - public boolean hasMP3() { - return mp3; - } - - public boolean hasWav() { - return wav; - } - - public boolean hasFlv() { - return flv; - } -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum SoundExportMode { + + MP3_WAV_FLV(true, true, true), FLV(false, false, true), MP3_WAV(true, true, false), WAV(false, true, false); + + private final boolean mp3, wav, flv; + + private SoundExportMode(boolean mp3, boolean wav, boolean flv) { + this.mp3 = mp3; + this.wav = wav; + this.flv = flv; + } + + public boolean hasMP3() { + return mp3; + } + + public boolean hasWav() { + return wav; + } + + public boolean hasFlv() { + return flv; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java new file mode 100644 index 000000000..246785ce0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.modes; + +/** + * + * @author JPEXS + */ +public enum TextExportMode { + + PLAIN, + FORMATTED, + SVG +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java similarity index 97% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java index 192280df9..db62ffde4 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CanvasMorphShapeExporter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.exporters.morphshape; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java similarity index 57% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java index 322ee75c5..228aab0de 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/CurvedMorphEdge.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public class CurvedMorphEdge extends StraightMorphEdge implements IMorphEdge { - - private final PointInt control; - private final PointInt controlEnd; - - CurvedMorphEdge(PointInt from, PointInt control, PointInt to, - PointInt fromEnd, PointInt controlEnd, PointInt toEnd, int lineStyleIdx, int fillStyleIdx) { - super(from, to, fromEnd, toEnd, lineStyleIdx, fillStyleIdx); - this.control = control; - this.controlEnd = controlEnd; - } - - public PointInt getControl() { - return control; - } - - public PointInt getControlEnd() { - return controlEnd; - } - - @Override - public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx) { - return new CurvedMorphEdge(to, control, from, toEnd, controlEnd, fromEnd, lineStyleIdx, newFillStyleIdx); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public class CurvedMorphEdge extends StraightMorphEdge implements IMorphEdge { + + private final PointInt control; + private final PointInt controlEnd; + + CurvedMorphEdge(PointInt from, PointInt control, PointInt to, + PointInt fromEnd, PointInt controlEnd, PointInt toEnd, int lineStyleIdx, int fillStyleIdx) { + super(from, to, fromEnd, toEnd, lineStyleIdx, fillStyleIdx); + this.control = control; + this.controlEnd = controlEnd; + } + + public PointInt getControl() { + return control; + } + + public PointInt getControlEnd() { + return controlEnd; + } + + @Override + public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx) { + return new CurvedMorphEdge(to, control, from, toEnd, controlEnd, fromEnd, lineStyleIdx, newFillStyleIdx); + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java similarity index 84% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java index 0c7b71969..178115b04 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/DefaultSVGMorphShapeExporter.java @@ -1,147 +1,146 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public abstract class DefaultSVGMorphShapeExporter extends MorphShapeExporterBase { - - protected static final String DRAW_COMMAND_L = "L"; - protected static final String DRAW_COMMAND_Q = "Q"; - - protected String currentDrawCommand = ""; - protected String pathData; - protected String pathDataEnd; - - public DefaultSVGMorphShapeExporter(SHAPE shape, SHAPE endShape, ColorTransform colorTransform) { - super(shape, endShape, colorTransform); - } - - @Override - public void beginShape() { - } - - @Override - public void endShape() { - } - - @Override - public void beginFills() { - } - - @Override - public void endFills() { - } - - @Override - public void beginLines() { - } - - @Override - public void endLines() { - finalizePath(); - } - - @Override - public void beginFill(RGB color, RGB colorEnd) { - finalizePath(); - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { - finalizePath(); - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - } - - @Override - public void endFill() { - finalizePath(); - } - - @Override - public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { - } - - @Override - public void moveTo(double x, double y, double x2, double y2) { - currentDrawCommand = ""; - pathData += "M" - + roundPixels20(x / SWF.unitDivisor) + " " - + roundPixels20(y / SWF.unitDivisor) + " "; - pathDataEnd += "M" - + roundPixels20(x2 / SWF.unitDivisor) + " " - + roundPixels20(y2 / SWF.unitDivisor) + " "; - } - - @Override - public void lineTo(double x, double y, double x2, double y2) { - if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { - currentDrawCommand = DRAW_COMMAND_L; - pathData += "L"; - pathDataEnd += "L"; - } - pathData += roundPixels20(x / SWF.unitDivisor) + " " - + roundPixels20(y / SWF.unitDivisor) + " "; - pathDataEnd += roundPixels20(x2 / SWF.unitDivisor) + " " - + roundPixels20(y2 / SWF.unitDivisor) + " "; - } - - @Override - public void curveTo(double controlX, double controlY, double anchorX, double anchorY, double controlX2, double controlY2, double anchorX2, double anchorY2) { - if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { - currentDrawCommand = DRAW_COMMAND_Q; - pathData += "Q"; - pathDataEnd += "Q"; - } - pathData += roundPixels20(controlX / SWF.unitDivisor) + " " - + roundPixels20(controlY / SWF.unitDivisor) + " " - + roundPixels20(anchorX / SWF.unitDivisor) + " " - + roundPixels20(anchorY / SWF.unitDivisor) + " "; - pathDataEnd += roundPixels20(controlX2 / SWF.unitDivisor) + " " - + roundPixels20(controlY2 / SWF.unitDivisor) + " " - + roundPixels20(anchorX2 / SWF.unitDivisor) + " " - + roundPixels20(anchorY2 / SWF.unitDivisor) + " "; - } - - protected void finalizePath() { - pathData = ""; - pathDataEnd = ""; - currentDrawCommand = ""; - } - - protected double roundPixels20(double pixels) { - return Math.round(pixels * 100) / 100.0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public abstract class DefaultSVGMorphShapeExporter extends MorphShapeExporterBase { + + protected static final String DRAW_COMMAND_L = "L"; + protected static final String DRAW_COMMAND_Q = "Q"; + + protected String currentDrawCommand = ""; + protected String pathData; + protected String pathDataEnd; + + public DefaultSVGMorphShapeExporter(SHAPE shape, SHAPE endShape, ColorTransform colorTransform) { + super(shape, endShape, colorTransform); + } + + @Override + public void beginShape() { + } + + @Override + public void endShape() { + } + + @Override + public void beginFills() { + } + + @Override + public void endFills() { + } + + @Override + public void beginLines() { + } + + @Override + public void endLines() { + finalizePath(); + } + + @Override + public void beginFill(RGB color, RGB colorEnd) { + finalizePath(); + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { + finalizePath(); + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + } + + @Override + public void endFill() { + finalizePath(); + } + + @Override + public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { + } + + @Override + public void moveTo(double x, double y, double x2, double y2) { + currentDrawCommand = ""; + pathData += "M" + + roundPixels20(x / SWF.unitDivisor) + " " + + roundPixels20(y / SWF.unitDivisor) + " "; + pathDataEnd += "M" + + roundPixels20(x2 / SWF.unitDivisor) + " " + + roundPixels20(y2 / SWF.unitDivisor) + " "; + } + + @Override + public void lineTo(double x, double y, double x2, double y2) { + if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { + currentDrawCommand = DRAW_COMMAND_L; + pathData += "L"; + pathDataEnd += "L"; + } + pathData += roundPixels20(x / SWF.unitDivisor) + " " + + roundPixels20(y / SWF.unitDivisor) + " "; + pathDataEnd += roundPixels20(x2 / SWF.unitDivisor) + " " + + roundPixels20(y2 / SWF.unitDivisor) + " "; + } + + @Override + public void curveTo(double controlX, double controlY, double anchorX, double anchorY, double controlX2, double controlY2, double anchorX2, double anchorY2) { + if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { + currentDrawCommand = DRAW_COMMAND_Q; + pathData += "Q"; + pathDataEnd += "Q"; + } + pathData += roundPixels20(controlX / SWF.unitDivisor) + " " + + roundPixels20(controlY / SWF.unitDivisor) + " " + + roundPixels20(anchorX / SWF.unitDivisor) + " " + + roundPixels20(anchorY / SWF.unitDivisor) + " "; + pathDataEnd += roundPixels20(controlX2 / SWF.unitDivisor) + " " + + roundPixels20(controlY2 / SWF.unitDivisor) + " " + + roundPixels20(anchorX2 / SWF.unitDivisor) + " " + + roundPixels20(anchorY2 / SWF.unitDivisor) + " "; + } + + protected void finalizePath() { + pathData = ""; + pathDataEnd = ""; + currentDrawCommand = ""; + } + + protected double roundPixels20(double pixels) { + return Math.round(pixels * 100) / 100.0; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java new file mode 100644 index 000000000..da7061152 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public interface IMorphEdge { + + public PointInt getFrom(); + + public PointInt getTo(); + + public PointInt getFromEnd(); + + public PointInt getToEnd(); + + public int getLineStyleIdx(); + + public int getFillStyleIdx(); + + public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx); +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java similarity index 69% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java index d8ab72d11..d674c51b5 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphShapeExporter.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.RGB; - -/** - * - * @author JPEXS - */ -public interface IMorphShapeExporter { - - public void beginShape(); - - public void endShape(); - - public void beginFills(); - - public void endFills(); - - public void beginLines(); - - public void endLines(); - - public void beginFill(RGB color, RGB colorEnd); - - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd); - - public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform); - - public void endFill(); - - public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit); - - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd); - - public void moveTo(double x, double y, double x2, double y2); - - public void lineTo(double x, double y, double x2, double y2); - - public void curveTo(double controlX, double controlY, double anchorX, double anchorY, double controlX2, double controlY2, double anchorX2, double anchorY2); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.RGB; + +/** + * + * @author JPEXS + */ +public interface IMorphShapeExporter { + + public void beginShape(); + + public void endShape(); + + public void beginFills(); + + public void endFills(); + + public void beginLines(); + + public void endLines(); + + public void beginFill(RGB color, RGB colorEnd); + + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd); + + public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform); + + public void endFill(); + + public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit); + + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd); + + public void moveTo(double x, double y, double x2, double y2); + + public void lineTo(double x, double y, double x2, double y2); + + public void curveTo(double controlX, double controlY, double anchorX, double anchorY, double controlX2, double controlY2, double anchorX2, double anchorY2); +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java similarity index 95% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java index a87b52549..46bc07041 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/MorphShapeExporterBase.java @@ -1,568 +1,567 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.FOCALGRADIENT; -import com.jpexs.decompiler.flash.types.LINESTYLE; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; -import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; -import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; -import java.awt.Color; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public abstract class MorphShapeExporterBase implements IMorphShapeExporter { - - protected final SHAPE shape; - protected final SHAPE shapeEnd; - - protected List _fillStyles; - protected List _lineStyles; - - protected List _fillStylesEnd; - protected List _lineStylesEnd; - - protected List>> _fillEdgeMaps; - protected List>> _lineEdgeMaps; - - private boolean edgeMapsCreated; - protected ColorTransform colorTransform; - - public MorphShapeExporterBase(SHAPE shape, SHAPE endShape, ColorTransform colorTransform) { - this.shape = shape; - this.shapeEnd = endShape; - this.colorTransform = colorTransform; - _fillStyles = new ArrayList<>(); - _lineStyles = new ArrayList<>(); - if (shape instanceof SHAPEWITHSTYLE) { - SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) shape; - _fillStyles.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); - _lineStyles.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); - } - _fillStylesEnd = new ArrayList<>(); - _lineStylesEnd = new ArrayList<>(); - if (endShape instanceof SHAPEWITHSTYLE) { - SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) endShape; - _fillStylesEnd.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); - _lineStylesEnd.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); - } - } - - public void export() { - // Create edge maps - _fillEdgeMaps = new ArrayList<>(); - _lineEdgeMaps = new ArrayList<>(); - createEdgeMaps(_fillStyles, _lineStyles, _fillStylesEnd, _lineStylesEnd, _fillEdgeMaps, _lineEdgeMaps); - - // Let the doc handler know that a shape export starts - beginShape(); - // Export fills and strokes for each group separately - for (int i = 0; i < _lineEdgeMaps.size(); i++) { - // Export fills first - exportFillPath(i); - // Export strokes last - exportLinePath(i); - } - // Let the doc handler know that we're done exporting a shape - endShape(); - } - - protected void createEdgeMaps(List fillStyles, List lineStyles, - List fillStylesEnd, List lineStylesEnd, - List>> fillEdgeMaps, List>> lineEdgeMaps) { - if (!edgeMapsCreated) { - int xPos = 0; - int yPos = 0; - int xPosEnd = 0; - int yPosEnd = 0; - int fillStyleIdxOffset = 0; - int lineStyleIdxOffset = 0; - int currentFillStyleIdx0 = 0; - int currentFillStyleIdx1 = 0; - int currentLineStyleIdx = 0; - List subPath = new ArrayList<>(); - Map> currentFillEdgeMap = new HashMap<>(); - Map> currentLineEdgeMap = new HashMap<>(); - List records = shape.shapeRecords; - List recordsEnd = shapeEnd.shapeRecords; - if (records.size() != recordsEnd.size()) { - throw new Error("Begin and end shaperecord list length should be the same."); - } - for (int i = 0; i < records.size(); i++) { - SHAPERECORD shapeRecord = records.get(i); - SHAPERECORD shapeRecordEnd = recordsEnd.get(i); - if ((shapeRecord instanceof StyleChangeRecord && !(shapeRecordEnd instanceof StyleChangeRecord)) - || (shapeRecord instanceof StraightEdgeRecord && !(shapeRecordEnd instanceof StraightEdgeRecord)) - || (shapeRecord instanceof CurvedEdgeRecord && !(shapeRecordEnd instanceof CurvedEdgeRecord)) - || (shapeRecord instanceof EndShapeRecord && !(shapeRecordEnd instanceof EndShapeRecord))) { - throw new Error("Begin and end shaperecord should have the same type."); - } - if (shapeRecord instanceof StyleChangeRecord) { - StyleChangeRecord styleChangeRecord = (StyleChangeRecord) shapeRecord; - if (styleChangeRecord.stateLineStyle || styleChangeRecord.stateFillStyle0 || styleChangeRecord.stateFillStyle1) { - processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); - subPath = new ArrayList<>(); - } - if (styleChangeRecord.stateNewStyles) { - fillStyleIdxOffset = fillStyles.size(); - lineStyleIdxOffset = lineStyles.size(); - appendFillStyles(fillStyles, styleChangeRecord.fillStyles.fillStyles); - appendLineStyles(lineStyles, styleChangeRecord.lineStyles.lineStyles); - appendFillStyles(fillStylesEnd, styleChangeRecord.fillStyles.fillStyles); - appendLineStyles(lineStylesEnd, styleChangeRecord.lineStyles.lineStyles); - } - // Check if all styles are reset to 0. - // This (probably) means that a new group starts with the next record - if (styleChangeRecord.stateLineStyle && styleChangeRecord.lineStyle == 0 - && styleChangeRecord.stateFillStyle0 && styleChangeRecord.fillStyle0 == 0 - && styleChangeRecord.stateFillStyle1 && styleChangeRecord.fillStyle1 == 0) { - // do not clean the edges for morphshapes - //cleanEdgeMap(currentFillEdgeMap); - //cleanEdgeMap(currentLineEdgeMap); - fillEdgeMaps.add(currentFillEdgeMap); - lineEdgeMaps.add(currentLineEdgeMap); - currentFillEdgeMap = new HashMap<>(); - currentLineEdgeMap = new HashMap<>(); - currentLineStyleIdx = 0; - currentFillStyleIdx0 = 0; - currentFillStyleIdx1 = 0; - } else { - if (styleChangeRecord.stateLineStyle) { - currentLineStyleIdx = styleChangeRecord.lineStyle; - if (currentLineStyleIdx > 0) { - currentLineStyleIdx += lineStyleIdxOffset; - } - } - if (styleChangeRecord.stateFillStyle0) { - currentFillStyleIdx0 = styleChangeRecord.fillStyle0; - if (currentFillStyleIdx0 > 0) { - currentFillStyleIdx0 += fillStyleIdxOffset; - } - } - if (styleChangeRecord.stateFillStyle1) { - currentFillStyleIdx1 = styleChangeRecord.fillStyle1; - if (currentFillStyleIdx1 > 0) { - currentFillStyleIdx1 += fillStyleIdxOffset; - } - } - } - if (styleChangeRecord.stateMoveTo) { - xPos = styleChangeRecord.moveDeltaX; - yPos = styleChangeRecord.moveDeltaY; - } - - StyleChangeRecord styleChangeRecordEnd = (StyleChangeRecord) shapeRecordEnd; - if (styleChangeRecordEnd.stateMoveTo) { - xPosEnd = styleChangeRecordEnd.moveDeltaX; - yPosEnd = styleChangeRecordEnd.moveDeltaY; - } - } else if (shapeRecord instanceof StraightEdgeRecord) { - StraightEdgeRecord straightEdgeRecord = (StraightEdgeRecord) shapeRecord; - PointInt from = new PointInt(xPos, yPos); - if (straightEdgeRecord.generalLineFlag) { - xPos += straightEdgeRecord.deltaX; - yPos += straightEdgeRecord.deltaY; - } else { - if (straightEdgeRecord.vertLineFlag) { - yPos += straightEdgeRecord.deltaY; - } else { - xPos += straightEdgeRecord.deltaX; - } - } - PointInt to = new PointInt(xPos, yPos); - - StraightEdgeRecord straightEdgeRecordEnd = (StraightEdgeRecord) shapeRecordEnd; - PointInt fromEnd = new PointInt(xPosEnd, yPosEnd); - if (straightEdgeRecordEnd.generalLineFlag) { - xPosEnd += straightEdgeRecordEnd.deltaX; - yPosEnd += straightEdgeRecordEnd.deltaY; - } else { - if (straightEdgeRecordEnd.vertLineFlag) { - yPosEnd += straightEdgeRecordEnd.deltaY; - } else { - xPosEnd += straightEdgeRecordEnd.deltaX; - } - } - PointInt toEnd = new PointInt(xPosEnd, yPosEnd); - - subPath.add(new StraightMorphEdge(from, to, fromEnd, toEnd, currentLineStyleIdx, currentFillStyleIdx1)); - } else if (shapeRecord instanceof CurvedEdgeRecord) { - CurvedEdgeRecord curvedEdgeRecord = (CurvedEdgeRecord) shapeRecord; - PointInt from = new PointInt(xPos, yPos); - int xPosControl = xPos + curvedEdgeRecord.controlDeltaX; - int yPosControl = yPos + curvedEdgeRecord.controlDeltaY; - xPos = xPosControl + curvedEdgeRecord.anchorDeltaX; - yPos = yPosControl + curvedEdgeRecord.anchorDeltaY; - PointInt control = new PointInt(xPosControl, yPosControl); - PointInt to = new PointInt(xPos, yPos); - - CurvedEdgeRecord curvedEdgeRecordEnd = (CurvedEdgeRecord) shapeRecordEnd; - PointInt fromEnd = new PointInt(xPosEnd, yPosEnd); - int xPosControlEnd = xPosEnd + curvedEdgeRecordEnd.controlDeltaX; - int yPosControlEnd = yPosEnd + curvedEdgeRecordEnd.controlDeltaY; - xPosEnd = xPosControlEnd + curvedEdgeRecordEnd.anchorDeltaX; - yPosEnd = yPosControlEnd + curvedEdgeRecordEnd.anchorDeltaY; - PointInt controlEnd = new PointInt(xPosControlEnd, yPosControlEnd); - PointInt toEnd = new PointInt(xPosEnd, yPosEnd); - - subPath.add(new CurvedMorphEdge(from, control, to, fromEnd, controlEnd, toEnd, currentLineStyleIdx, currentFillStyleIdx1)); - } else if (shapeRecord instanceof EndShapeRecord) { - // We're done. Process the last subpath, if any - processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); - // do not clean the edges for morphshapes - //cleanEdgeMap(currentFillEdgeMap); - //cleanEdgeMap(currentLineEdgeMap); - fillEdgeMaps.add(currentFillEdgeMap); - lineEdgeMaps.add(currentLineEdgeMap); - } - } - edgeMapsCreated = true; - } - } - - protected void processSubPath(List subPath, int lineStyleIdx, int fillStyleIdx0, int fillStyleIdx1, - Map> currentFillEdgeMap, Map> currentLineEdgeMap) { - List path; - if (fillStyleIdx0 != 0) { - path = currentFillEdgeMap.get(fillStyleIdx0); - if (path == null) { - path = new ArrayList<>(); - currentFillEdgeMap.put(fillStyleIdx0, path); - } - for (int j = subPath.size() - 1; j >= 0; j--) { - path.add(subPath.get(j).reverseWithNewFillStyle(fillStyleIdx0)); - } - } - if (fillStyleIdx1 != 0) { - path = currentFillEdgeMap.get(fillStyleIdx1); - if (path == null) { - path = new ArrayList<>(); - currentFillEdgeMap.put(fillStyleIdx1, path); - } - appendEdges(path, subPath); - } - if (lineStyleIdx != 0) { - path = currentLineEdgeMap.get(lineStyleIdx); - if (path == null) { - path = new ArrayList<>(); - currentLineEdgeMap.put(lineStyleIdx, path); - } - appendEdges(path, subPath); - } - } - - protected void exportFillPath(int groupIndex) { - List path = createPathFromEdgeMap(_fillEdgeMaps.get(groupIndex)); - PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - int fillStyleIdx = Integer.MAX_VALUE; - if (path.size() > 0) { - beginFills(); - for (int i = 0; i < path.size(); i++) { - IMorphEdge e = path.get(i); - if (fillStyleIdx != e.getFillStyleIdx()) { - if (fillStyleIdx != Integer.MAX_VALUE) { - endFill(); - } - fillStyleIdx = e.getFillStyleIdx(); - pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - try { - Matrix matrix; - Matrix matrixEnd; - FILLSTYLE fillStyle = _fillStyles.get(fillStyleIdx - 1); - FILLSTYLE fillStyleEnd = _fillStylesEnd.get(fillStyleIdx - 1); - switch (fillStyle.fillStyleType) { - case FILLSTYLE.SOLID: - // Solid fill - beginFill(colorTransform.apply(fillStyle.color), colorTransform.apply(fillStyleEnd.color)); - break; - case FILLSTYLE.LINEAR_GRADIENT: - case FILLSTYLE.RADIAL_GRADIENT: - case FILLSTYLE.FOCAL_RADIAL_GRADIENT: - // Gradient fill - matrix = new Matrix(fillStyle.gradientMatrix); - matrixEnd = new Matrix(fillStyleEnd.gradientMatrix); - beginGradientFill( - fillStyle.fillStyleType, - colorTransform.apply(fillStyle.gradient.gradientRecords), - colorTransform.apply(fillStyleEnd.gradient.gradientRecords), - matrix, - matrixEnd, - fillStyle.gradient.spreadMode, - fillStyle.gradient.interpolationMode, - (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0, - (fillStyleEnd.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyleEnd.gradient).focalPoint : 0 - ); - break; - case FILLSTYLE.REPEATING_BITMAP: - case FILLSTYLE.CLIPPED_BITMAP: - case FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP: - case FILLSTYLE.NON_SMOOTHED_CLIPPED_BITMAP: - // Bitmap fill - matrix = new Matrix(fillStyle.bitmapMatrix); - matrixEnd = new Matrix(fillStyleEnd.bitmapMatrix); - beginBitmapFill( - fillStyle.bitmapId, - matrix, - matrixEnd, - (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP), - (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.CLIPPED_BITMAP), - colorTransform - ); - break; - } - } catch (Exception ex) { - // Font shapes define no fillstyles per se, but do reference fillstyle index 1, - // which represents the font color. We just report null in this case. - beginFill(null, null); - } - } - if (!pos.equals(e.getFrom())) { - moveTo(e.getFrom().x, e.getFrom().y, e.getFromEnd().x, e.getFromEnd().y); - } - if (e instanceof CurvedMorphEdge) { - CurvedMorphEdge c = (CurvedMorphEdge) e; - curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y, c.getControlEnd().x, c.getControlEnd().y, c.toEnd.x, c.toEnd.y); - } else { - lineTo(e.getTo().x, e.getTo().y, e.getToEnd().x, e.getToEnd().y); - } - pos = e.getTo(); - } - if (fillStyleIdx != Integer.MAX_VALUE) { - endFill(); - } - endFills(); - } - } - - protected void exportLinePath(int groupIndex) { - List path = createPathFromEdgeMap(_lineEdgeMaps.get(groupIndex)); - PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - int lineStyleIdx = Integer.MAX_VALUE; - if (path.size() > 0) { - beginLines(); - for (int i = 0; i < path.size(); i++) { - IMorphEdge e = path.get(i); - if (lineStyleIdx != e.getLineStyleIdx()) { - lineStyleIdx = e.getLineStyleIdx(); - pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - LINESTYLE lineStyle = null; - LINESTYLE lineStyleEnd = null; - try { - lineStyle = _lineStyles.get(lineStyleIdx - 1); - lineStyleEnd = _lineStylesEnd.get(lineStyleIdx - 1); - } catch (Exception ex) { - } - if (lineStyle != null) { - String scaleMode = "NORMAL"; - boolean pixelHintingFlag = false; - int startCapStyle = LINESTYLE2.ROUND_CAP; - int endCapStyle = LINESTYLE2.ROUND_CAP; - int joinStyle = LINESTYLE2.ROUND_JOIN; - int miterLimitFactor = 3; - boolean hasFillFlag = false; - if (lineStyle instanceof LINESTYLE2) { - LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; - if (lineStyle2.noHScaleFlag && lineStyle2.noVScaleFlag) { - scaleMode = "NONE"; - } else if (lineStyle2.noHScaleFlag) { - scaleMode = "HORIZONTAL"; - } else if (lineStyle2.noVScaleFlag) { - scaleMode = "VERTICAL"; - } - pixelHintingFlag = lineStyle2.pixelHintingFlag; - startCapStyle = lineStyle2.startCapStyle; - endCapStyle = lineStyle2.endCapStyle; - joinStyle = lineStyle2.joinStyle; - miterLimitFactor = lineStyle2.miterLimitFactor; - hasFillFlag = lineStyle2.hasFillFlag; - } - lineStyle( - lineStyle.width, - lineStyleEnd.width, - colorTransform.apply(lineStyle.color), - colorTransform.apply(lineStyleEnd.color), - pixelHintingFlag, - scaleMode, - startCapStyle, - endCapStyle, - joinStyle, - miterLimitFactor); - - if (hasFillFlag) { - LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; - FILLSTYLE fillStyle = lineStyle2.fillType; - LINESTYLE2 lineStyle2End = (LINESTYLE2) lineStyleEnd; - FILLSTYLE fillStyleEnd = lineStyle2End.fillType; - switch (fillStyle.fillStyleType) { - case FILLSTYLE.LINEAR_GRADIENT: - case FILLSTYLE.RADIAL_GRADIENT: - case FILLSTYLE.FOCAL_RADIAL_GRADIENT: - // Gradient fill - Matrix matrix = new Matrix(fillStyle.gradientMatrix); - Matrix matrixEnd = new Matrix(fillStyleEnd.gradientMatrix); - lineGradientStyle( - fillStyle.fillStyleType, - fillStyle.gradient.gradientRecords, - fillStyleEnd.gradient.gradientRecords, - matrix, - matrixEnd, - fillStyle.gradient.spreadMode, - fillStyle.gradient.interpolationMode, - (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0, - (fillStyleEnd.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyleEnd.gradient).focalPoint : 0 - ); - break; - } - } - } else { - // We should never get here - lineStyle(1, 1, new RGB(Color.BLACK), new RGB(Color.BLACK), false, "NORMAL", 0, 0, 0, 3); - } - } - if (!e.getFrom().equals(pos)) { - moveTo(e.getFrom().x, e.getFrom().y, e.getFromEnd().x, e.getFromEnd().y); - } - if (e instanceof CurvedMorphEdge) { - CurvedMorphEdge c = (CurvedMorphEdge) e; - curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y, c.getControlEnd().x, c.getControlEnd().y, c.toEnd.x, c.toEnd.y); - } else { - lineTo(e.getTo().x, e.getTo().y, e.getToEnd().x, e.getToEnd().y); - } - pos = e.getTo(); - } - endLines(); - } - } - - protected List createPathFromEdgeMap(Map> edgeMap) { - List newPath = new ArrayList<>(); - List styleIdxArray = new ArrayList<>(); - for (Integer styleIdx : edgeMap.keySet()) { - styleIdxArray.add(styleIdx); - } - Collections.sort(styleIdxArray); - for (int i = 0; i < styleIdxArray.size(); i++) { - appendEdges(newPath, edgeMap.get(styleIdxArray.get(i))); - } - return newPath; - } - - protected void cleanEdgeMap(Map> edgeMap) { - for (Integer styleIdx : edgeMap.keySet()) { - List subPath = edgeMap.get(styleIdx); - if (subPath != null && subPath.size() > 0) { - int idx; - IMorphEdge prevEdge = null; - List tmpPath = new ArrayList<>(); - Map> coordMap = createCoordMap(subPath); - while (subPath.size() > 0) { - idx = 0; - while (idx < subPath.size()) { - if (prevEdge == null || prevEdge.getTo().equals(subPath.get(idx).getFrom())) { - IMorphEdge edge = subPath.remove(idx); - tmpPath.add(edge); - removeEdgeFromCoordMap(coordMap, edge); - prevEdge = edge; - } else { - IMorphEdge edge = findNextEdgeInCoordMap(coordMap, prevEdge); - if (edge != null) { - idx = subPath.indexOf(edge); - } else { - idx = 0; - prevEdge = null; - } - } - } - } - edgeMap.put(styleIdx, tmpPath); - } - } - } - - protected Map> createCoordMap(List path) { - Map> coordMap = new HashMap<>(); - for (int i = 0; i < path.size(); i++) { - PointInt from = path.get(i).getFrom(); - String key = from.x + "_" + from.y; - List coordMapArray = coordMap.get(key); - if (coordMapArray == null) { - List list = new ArrayList<>(); - list.add(path.get(i)); - coordMap.put(key, list); - } else { - coordMapArray.add(path.get(i)); - } - } - return coordMap; - } - - protected void removeEdgeFromCoordMap(Map> coordMap, IMorphEdge edge) { - String key = edge.getFrom().x + "_" + edge.getFrom().y; - List coordMapArray = coordMap.get(key); - if (coordMapArray != null) { - if (coordMapArray.size() == 1) { - coordMap.remove(key); - } else { - int i = coordMapArray.indexOf(edge); - if (i > -1) { - coordMapArray.remove(i); - } - } - } - } - - protected IMorphEdge findNextEdgeInCoordMap(Map> coordMap, IMorphEdge edge) { - String key = edge.getTo().x + "_" + edge.getTo().y; - List coordMapArray = coordMap.get(key); - if (coordMapArray != null && coordMapArray.size() > 0) { - return coordMapArray.get(0); - } - return null; - } - - protected void appendFillStyles(List v1, FILLSTYLE[] v2) { - v1.addAll(Arrays.asList(v2)); - } - - protected void appendLineStyles(List v1, LINESTYLE[] v2) { - v1.addAll(Arrays.asList(v2)); - } - - protected void appendEdges(List v1, List v2) { - for (int i = 0; i < v2.size(); i++) { - v1.add(v2.get(i)); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.FOCALGRADIENT; +import com.jpexs.decompiler.flash.types.LINESTYLE; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; +import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; +import java.awt.Color; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public abstract class MorphShapeExporterBase implements IMorphShapeExporter { + + protected final SHAPE shape; + protected final SHAPE shapeEnd; + + protected List _fillStyles; + protected List _lineStyles; + + protected List _fillStylesEnd; + protected List _lineStylesEnd; + + protected List>> _fillEdgeMaps; + protected List>> _lineEdgeMaps; + + private boolean edgeMapsCreated; + protected ColorTransform colorTransform; + + public MorphShapeExporterBase(SHAPE shape, SHAPE endShape, ColorTransform colorTransform) { + this.shape = shape; + this.shapeEnd = endShape; + this.colorTransform = colorTransform; + _fillStyles = new ArrayList<>(); + _lineStyles = new ArrayList<>(); + if (shape instanceof SHAPEWITHSTYLE) { + SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) shape; + _fillStyles.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); + _lineStyles.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); + } + _fillStylesEnd = new ArrayList<>(); + _lineStylesEnd = new ArrayList<>(); + if (endShape instanceof SHAPEWITHSTYLE) { + SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) endShape; + _fillStylesEnd.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); + _lineStylesEnd.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); + } + } + + public void export() { + // Create edge maps + _fillEdgeMaps = new ArrayList<>(); + _lineEdgeMaps = new ArrayList<>(); + createEdgeMaps(_fillStyles, _lineStyles, _fillStylesEnd, _lineStylesEnd, _fillEdgeMaps, _lineEdgeMaps); + + // Let the doc handler know that a shape export starts + beginShape(); + // Export fills and strokes for each group separately + for (int i = 0; i < _lineEdgeMaps.size(); i++) { + // Export fills first + exportFillPath(i); + // Export strokes last + exportLinePath(i); + } + // Let the doc handler know that we're done exporting a shape + endShape(); + } + + protected void createEdgeMaps(List fillStyles, List lineStyles, + List fillStylesEnd, List lineStylesEnd, + List>> fillEdgeMaps, List>> lineEdgeMaps) { + if (!edgeMapsCreated) { + int xPos = 0; + int yPos = 0; + int xPosEnd = 0; + int yPosEnd = 0; + int fillStyleIdxOffset = 0; + int lineStyleIdxOffset = 0; + int currentFillStyleIdx0 = 0; + int currentFillStyleIdx1 = 0; + int currentLineStyleIdx = 0; + List subPath = new ArrayList<>(); + Map> currentFillEdgeMap = new HashMap<>(); + Map> currentLineEdgeMap = new HashMap<>(); + List records = shape.shapeRecords; + List recordsEnd = shapeEnd.shapeRecords; + if (records.size() != recordsEnd.size()) { + throw new Error("Begin and end shaperecord list length should be the same."); + } + for (int i = 0; i < records.size(); i++) { + SHAPERECORD shapeRecord = records.get(i); + SHAPERECORD shapeRecordEnd = recordsEnd.get(i); + if ((shapeRecord instanceof StyleChangeRecord && !(shapeRecordEnd instanceof StyleChangeRecord)) + || (shapeRecord instanceof StraightEdgeRecord && !(shapeRecordEnd instanceof StraightEdgeRecord)) + || (shapeRecord instanceof CurvedEdgeRecord && !(shapeRecordEnd instanceof CurvedEdgeRecord)) + || (shapeRecord instanceof EndShapeRecord && !(shapeRecordEnd instanceof EndShapeRecord))) { + throw new Error("Begin and end shaperecord should have the same type."); + } + if (shapeRecord instanceof StyleChangeRecord) { + StyleChangeRecord styleChangeRecord = (StyleChangeRecord) shapeRecord; + if (styleChangeRecord.stateLineStyle || styleChangeRecord.stateFillStyle0 || styleChangeRecord.stateFillStyle1) { + processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); + subPath = new ArrayList<>(); + } + if (styleChangeRecord.stateNewStyles) { + fillStyleIdxOffset = fillStyles.size(); + lineStyleIdxOffset = lineStyles.size(); + appendFillStyles(fillStyles, styleChangeRecord.fillStyles.fillStyles); + appendLineStyles(lineStyles, styleChangeRecord.lineStyles.lineStyles); + appendFillStyles(fillStylesEnd, styleChangeRecord.fillStyles.fillStyles); + appendLineStyles(lineStylesEnd, styleChangeRecord.lineStyles.lineStyles); + } + // Check if all styles are reset to 0. + // This (probably) means that a new group starts with the next record + if (styleChangeRecord.stateLineStyle && styleChangeRecord.lineStyle == 0 + && styleChangeRecord.stateFillStyle0 && styleChangeRecord.fillStyle0 == 0 + && styleChangeRecord.stateFillStyle1 && styleChangeRecord.fillStyle1 == 0) { + // do not clean the edges for morphshapes + //cleanEdgeMap(currentFillEdgeMap); + //cleanEdgeMap(currentLineEdgeMap); + fillEdgeMaps.add(currentFillEdgeMap); + lineEdgeMaps.add(currentLineEdgeMap); + currentFillEdgeMap = new HashMap<>(); + currentLineEdgeMap = new HashMap<>(); + currentLineStyleIdx = 0; + currentFillStyleIdx0 = 0; + currentFillStyleIdx1 = 0; + } else { + if (styleChangeRecord.stateLineStyle) { + currentLineStyleIdx = styleChangeRecord.lineStyle; + if (currentLineStyleIdx > 0) { + currentLineStyleIdx += lineStyleIdxOffset; + } + } + if (styleChangeRecord.stateFillStyle0) { + currentFillStyleIdx0 = styleChangeRecord.fillStyle0; + if (currentFillStyleIdx0 > 0) { + currentFillStyleIdx0 += fillStyleIdxOffset; + } + } + if (styleChangeRecord.stateFillStyle1) { + currentFillStyleIdx1 = styleChangeRecord.fillStyle1; + if (currentFillStyleIdx1 > 0) { + currentFillStyleIdx1 += fillStyleIdxOffset; + } + } + } + if (styleChangeRecord.stateMoveTo) { + xPos = styleChangeRecord.moveDeltaX; + yPos = styleChangeRecord.moveDeltaY; + } + + StyleChangeRecord styleChangeRecordEnd = (StyleChangeRecord) shapeRecordEnd; + if (styleChangeRecordEnd.stateMoveTo) { + xPosEnd = styleChangeRecordEnd.moveDeltaX; + yPosEnd = styleChangeRecordEnd.moveDeltaY; + } + } else if (shapeRecord instanceof StraightEdgeRecord) { + StraightEdgeRecord straightEdgeRecord = (StraightEdgeRecord) shapeRecord; + PointInt from = new PointInt(xPos, yPos); + if (straightEdgeRecord.generalLineFlag) { + xPos += straightEdgeRecord.deltaX; + yPos += straightEdgeRecord.deltaY; + } else { + if (straightEdgeRecord.vertLineFlag) { + yPos += straightEdgeRecord.deltaY; + } else { + xPos += straightEdgeRecord.deltaX; + } + } + PointInt to = new PointInt(xPos, yPos); + + StraightEdgeRecord straightEdgeRecordEnd = (StraightEdgeRecord) shapeRecordEnd; + PointInt fromEnd = new PointInt(xPosEnd, yPosEnd); + if (straightEdgeRecordEnd.generalLineFlag) { + xPosEnd += straightEdgeRecordEnd.deltaX; + yPosEnd += straightEdgeRecordEnd.deltaY; + } else { + if (straightEdgeRecordEnd.vertLineFlag) { + yPosEnd += straightEdgeRecordEnd.deltaY; + } else { + xPosEnd += straightEdgeRecordEnd.deltaX; + } + } + PointInt toEnd = new PointInt(xPosEnd, yPosEnd); + + subPath.add(new StraightMorphEdge(from, to, fromEnd, toEnd, currentLineStyleIdx, currentFillStyleIdx1)); + } else if (shapeRecord instanceof CurvedEdgeRecord) { + CurvedEdgeRecord curvedEdgeRecord = (CurvedEdgeRecord) shapeRecord; + PointInt from = new PointInt(xPos, yPos); + int xPosControl = xPos + curvedEdgeRecord.controlDeltaX; + int yPosControl = yPos + curvedEdgeRecord.controlDeltaY; + xPos = xPosControl + curvedEdgeRecord.anchorDeltaX; + yPos = yPosControl + curvedEdgeRecord.anchorDeltaY; + PointInt control = new PointInt(xPosControl, yPosControl); + PointInt to = new PointInt(xPos, yPos); + + CurvedEdgeRecord curvedEdgeRecordEnd = (CurvedEdgeRecord) shapeRecordEnd; + PointInt fromEnd = new PointInt(xPosEnd, yPosEnd); + int xPosControlEnd = xPosEnd + curvedEdgeRecordEnd.controlDeltaX; + int yPosControlEnd = yPosEnd + curvedEdgeRecordEnd.controlDeltaY; + xPosEnd = xPosControlEnd + curvedEdgeRecordEnd.anchorDeltaX; + yPosEnd = yPosControlEnd + curvedEdgeRecordEnd.anchorDeltaY; + PointInt controlEnd = new PointInt(xPosControlEnd, yPosControlEnd); + PointInt toEnd = new PointInt(xPosEnd, yPosEnd); + + subPath.add(new CurvedMorphEdge(from, control, to, fromEnd, controlEnd, toEnd, currentLineStyleIdx, currentFillStyleIdx1)); + } else if (shapeRecord instanceof EndShapeRecord) { + // We're done. Process the last subpath, if any + processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); + // do not clean the edges for morphshapes + //cleanEdgeMap(currentFillEdgeMap); + //cleanEdgeMap(currentLineEdgeMap); + fillEdgeMaps.add(currentFillEdgeMap); + lineEdgeMaps.add(currentLineEdgeMap); + } + } + edgeMapsCreated = true; + } + } + + protected void processSubPath(List subPath, int lineStyleIdx, int fillStyleIdx0, int fillStyleIdx1, + Map> currentFillEdgeMap, Map> currentLineEdgeMap) { + List path; + if (fillStyleIdx0 != 0) { + path = currentFillEdgeMap.get(fillStyleIdx0); + if (path == null) { + path = new ArrayList<>(); + currentFillEdgeMap.put(fillStyleIdx0, path); + } + for (int j = subPath.size() - 1; j >= 0; j--) { + path.add(subPath.get(j).reverseWithNewFillStyle(fillStyleIdx0)); + } + } + if (fillStyleIdx1 != 0) { + path = currentFillEdgeMap.get(fillStyleIdx1); + if (path == null) { + path = new ArrayList<>(); + currentFillEdgeMap.put(fillStyleIdx1, path); + } + appendEdges(path, subPath); + } + if (lineStyleIdx != 0) { + path = currentLineEdgeMap.get(lineStyleIdx); + if (path == null) { + path = new ArrayList<>(); + currentLineEdgeMap.put(lineStyleIdx, path); + } + appendEdges(path, subPath); + } + } + + protected void exportFillPath(int groupIndex) { + List path = createPathFromEdgeMap(_fillEdgeMaps.get(groupIndex)); + PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + int fillStyleIdx = Integer.MAX_VALUE; + if (path.size() > 0) { + beginFills(); + for (int i = 0; i < path.size(); i++) { + IMorphEdge e = path.get(i); + if (fillStyleIdx != e.getFillStyleIdx()) { + if (fillStyleIdx != Integer.MAX_VALUE) { + endFill(); + } + fillStyleIdx = e.getFillStyleIdx(); + pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + try { + Matrix matrix; + Matrix matrixEnd; + FILLSTYLE fillStyle = _fillStyles.get(fillStyleIdx - 1); + FILLSTYLE fillStyleEnd = _fillStylesEnd.get(fillStyleIdx - 1); + switch (fillStyle.fillStyleType) { + case FILLSTYLE.SOLID: + // Solid fill + beginFill(colorTransform.apply(fillStyle.color), colorTransform.apply(fillStyleEnd.color)); + break; + case FILLSTYLE.LINEAR_GRADIENT: + case FILLSTYLE.RADIAL_GRADIENT: + case FILLSTYLE.FOCAL_RADIAL_GRADIENT: + // Gradient fill + matrix = new Matrix(fillStyle.gradientMatrix); + matrixEnd = new Matrix(fillStyleEnd.gradientMatrix); + beginGradientFill( + fillStyle.fillStyleType, + colorTransform.apply(fillStyle.gradient.gradientRecords), + colorTransform.apply(fillStyleEnd.gradient.gradientRecords), + matrix, + matrixEnd, + fillStyle.gradient.spreadMode, + fillStyle.gradient.interpolationMode, + (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0, + (fillStyleEnd.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyleEnd.gradient).focalPoint : 0 + ); + break; + case FILLSTYLE.REPEATING_BITMAP: + case FILLSTYLE.CLIPPED_BITMAP: + case FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP: + case FILLSTYLE.NON_SMOOTHED_CLIPPED_BITMAP: + // Bitmap fill + matrix = new Matrix(fillStyle.bitmapMatrix); + matrixEnd = new Matrix(fillStyleEnd.bitmapMatrix); + beginBitmapFill( + fillStyle.bitmapId, + matrix, + matrixEnd, + (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP), + (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.CLIPPED_BITMAP), + colorTransform + ); + break; + } + } catch (Exception ex) { + // Font shapes define no fillstyles per se, but do reference fillstyle index 1, + // which represents the font color. We just report null in this case. + beginFill(null, null); + } + } + if (!pos.equals(e.getFrom())) { + moveTo(e.getFrom().x, e.getFrom().y, e.getFromEnd().x, e.getFromEnd().y); + } + if (e instanceof CurvedMorphEdge) { + CurvedMorphEdge c = (CurvedMorphEdge) e; + curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y, c.getControlEnd().x, c.getControlEnd().y, c.toEnd.x, c.toEnd.y); + } else { + lineTo(e.getTo().x, e.getTo().y, e.getToEnd().x, e.getToEnd().y); + } + pos = e.getTo(); + } + if (fillStyleIdx != Integer.MAX_VALUE) { + endFill(); + } + endFills(); + } + } + + protected void exportLinePath(int groupIndex) { + List path = createPathFromEdgeMap(_lineEdgeMaps.get(groupIndex)); + PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + int lineStyleIdx = Integer.MAX_VALUE; + if (path.size() > 0) { + beginLines(); + for (int i = 0; i < path.size(); i++) { + IMorphEdge e = path.get(i); + if (lineStyleIdx != e.getLineStyleIdx()) { + lineStyleIdx = e.getLineStyleIdx(); + pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + LINESTYLE lineStyle = null; + LINESTYLE lineStyleEnd = null; + try { + lineStyle = _lineStyles.get(lineStyleIdx - 1); + lineStyleEnd = _lineStylesEnd.get(lineStyleIdx - 1); + } catch (Exception ex) { + } + if (lineStyle != null) { + String scaleMode = "NORMAL"; + boolean pixelHintingFlag = false; + int startCapStyle = LINESTYLE2.ROUND_CAP; + int endCapStyle = LINESTYLE2.ROUND_CAP; + int joinStyle = LINESTYLE2.ROUND_JOIN; + int miterLimitFactor = 3; + boolean hasFillFlag = false; + if (lineStyle instanceof LINESTYLE2) { + LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; + if (lineStyle2.noHScaleFlag && lineStyle2.noVScaleFlag) { + scaleMode = "NONE"; + } else if (lineStyle2.noHScaleFlag) { + scaleMode = "HORIZONTAL"; + } else if (lineStyle2.noVScaleFlag) { + scaleMode = "VERTICAL"; + } + pixelHintingFlag = lineStyle2.pixelHintingFlag; + startCapStyle = lineStyle2.startCapStyle; + endCapStyle = lineStyle2.endCapStyle; + joinStyle = lineStyle2.joinStyle; + miterLimitFactor = lineStyle2.miterLimitFactor; + hasFillFlag = lineStyle2.hasFillFlag; + } + lineStyle( + lineStyle.width, + lineStyleEnd.width, + colorTransform.apply(lineStyle.color), + colorTransform.apply(lineStyleEnd.color), + pixelHintingFlag, + scaleMode, + startCapStyle, + endCapStyle, + joinStyle, + miterLimitFactor); + + if (hasFillFlag) { + LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; + FILLSTYLE fillStyle = lineStyle2.fillType; + LINESTYLE2 lineStyle2End = (LINESTYLE2) lineStyleEnd; + FILLSTYLE fillStyleEnd = lineStyle2End.fillType; + switch (fillStyle.fillStyleType) { + case FILLSTYLE.LINEAR_GRADIENT: + case FILLSTYLE.RADIAL_GRADIENT: + case FILLSTYLE.FOCAL_RADIAL_GRADIENT: + // Gradient fill + Matrix matrix = new Matrix(fillStyle.gradientMatrix); + Matrix matrixEnd = new Matrix(fillStyleEnd.gradientMatrix); + lineGradientStyle( + fillStyle.fillStyleType, + fillStyle.gradient.gradientRecords, + fillStyleEnd.gradient.gradientRecords, + matrix, + matrixEnd, + fillStyle.gradient.spreadMode, + fillStyle.gradient.interpolationMode, + (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0, + (fillStyleEnd.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyleEnd.gradient).focalPoint : 0 + ); + break; + } + } + } else { + // We should never get here + lineStyle(1, 1, new RGB(Color.BLACK), new RGB(Color.BLACK), false, "NORMAL", 0, 0, 0, 3); + } + } + if (!e.getFrom().equals(pos)) { + moveTo(e.getFrom().x, e.getFrom().y, e.getFromEnd().x, e.getFromEnd().y); + } + if (e instanceof CurvedMorphEdge) { + CurvedMorphEdge c = (CurvedMorphEdge) e; + curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y, c.getControlEnd().x, c.getControlEnd().y, c.toEnd.x, c.toEnd.y); + } else { + lineTo(e.getTo().x, e.getTo().y, e.getToEnd().x, e.getToEnd().y); + } + pos = e.getTo(); + } + endLines(); + } + } + + protected List createPathFromEdgeMap(Map> edgeMap) { + List newPath = new ArrayList<>(); + List styleIdxArray = new ArrayList<>(); + for (Integer styleIdx : edgeMap.keySet()) { + styleIdxArray.add(styleIdx); + } + Collections.sort(styleIdxArray); + for (int i = 0; i < styleIdxArray.size(); i++) { + appendEdges(newPath, edgeMap.get(styleIdxArray.get(i))); + } + return newPath; + } + + protected void cleanEdgeMap(Map> edgeMap) { + for (Integer styleIdx : edgeMap.keySet()) { + List subPath = edgeMap.get(styleIdx); + if (subPath != null && subPath.size() > 0) { + int idx; + IMorphEdge prevEdge = null; + List tmpPath = new ArrayList<>(); + Map> coordMap = createCoordMap(subPath); + while (subPath.size() > 0) { + idx = 0; + while (idx < subPath.size()) { + if (prevEdge == null || prevEdge.getTo().equals(subPath.get(idx).getFrom())) { + IMorphEdge edge = subPath.remove(idx); + tmpPath.add(edge); + removeEdgeFromCoordMap(coordMap, edge); + prevEdge = edge; + } else { + IMorphEdge edge = findNextEdgeInCoordMap(coordMap, prevEdge); + if (edge != null) { + idx = subPath.indexOf(edge); + } else { + idx = 0; + prevEdge = null; + } + } + } + } + edgeMap.put(styleIdx, tmpPath); + } + } + } + + protected Map> createCoordMap(List path) { + Map> coordMap = new HashMap<>(); + for (int i = 0; i < path.size(); i++) { + PointInt from = path.get(i).getFrom(); + String key = from.x + "_" + from.y; + List coordMapArray = coordMap.get(key); + if (coordMapArray == null) { + List list = new ArrayList<>(); + list.add(path.get(i)); + coordMap.put(key, list); + } else { + coordMapArray.add(path.get(i)); + } + } + return coordMap; + } + + protected void removeEdgeFromCoordMap(Map> coordMap, IMorphEdge edge) { + String key = edge.getFrom().x + "_" + edge.getFrom().y; + List coordMapArray = coordMap.get(key); + if (coordMapArray != null) { + if (coordMapArray.size() == 1) { + coordMap.remove(key); + } else { + int i = coordMapArray.indexOf(edge); + if (i > -1) { + coordMapArray.remove(i); + } + } + } + } + + protected IMorphEdge findNextEdgeInCoordMap(Map> coordMap, IMorphEdge edge) { + String key = edge.getTo().x + "_" + edge.getTo().y; + List coordMapArray = coordMap.get(key); + if (coordMapArray != null && coordMapArray.size() > 0) { + return coordMapArray.get(0); + } + return null; + } + + protected void appendFillStyles(List v1, FILLSTYLE[] v2) { + v1.addAll(Arrays.asList(v2)); + } + + protected void appendLineStyles(List v1, LINESTYLE[] v2) { + v1.addAll(Arrays.asList(v2)); + } + + protected void appendEdges(List v1, List v2) { + for (int i = 0; i < v2.size(); i++) { + v1.add(v2.get(i)); + } + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java similarity index 95% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java index 431c50e91..fe8206f9d 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/SVGMorphShapeExporter.java @@ -1,475 +1,474 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.tags.base.ImageTag; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.GRADIENT; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.helpers.Helper; -import com.jpexs.helpers.SerializableImage; -import java.awt.Color; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Locale; -import javax.imageio.ImageIO; -import javax.xml.bind.DatatypeConverter; -import org.w3c.dom.Element; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public class SVGMorphShapeExporter extends DefaultSVGMorphShapeExporter { - - protected Element path; - protected int lastPatternId; - private final Color defaultColor; - private final SWF swf; - private final SVGExporter exporter; - - public SVGMorphShapeExporter(SWF swf, SHAPE shape, SHAPE endShape, SVGExporter exporter, Color defaultColor, ColorTransform colorTransform) { - super(shape, endShape, colorTransform); - this.swf = swf; - this.defaultColor = defaultColor; - this.exporter = exporter; - } - - @Override - public void beginFill(RGB color, RGB colorEnd) { - if (color == null) { - color = new RGB(defaultColor == null ? Color.BLACK : defaultColor); - } - if (colorEnd == null) { - colorEnd = new RGB(defaultColor == null ? Color.BLACK : defaultColor); - } - finalizePath(); - path.setAttribute("stroke", "none"); - path.setAttribute("fill", color.toHexRGB()); - path.setAttribute("fill-rule", "evenodd"); - path.appendChild(createAnimateElement("fill", color.toHexRGB(), colorEnd.toHexRGB())); - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - path.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); - } - RGBA colorAEnd = (RGBA) colorEnd; - path.appendChild(createAnimateElement("fill-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); - } - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { - finalizePath(); - Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) - ? exporter.createElement("linearGradient") - : exporter.createElement("radialGradient"); - populateGradientElement(gradient, type, gradientRecords, gradientRecordsEnd, matrix, matrixEnd, spreadMethod, interpolationMethod, focalPointRatio); - int id = exporter.gradients.indexOf(gradient); - if (id < 0) { - // todo: filter same gradients - id = exporter.gradients.size(); - exporter.gradients.add(gradient); - } - gradient.setAttribute("id", "gradient" + id); - path.setAttribute("stroke", "none"); - path.setAttribute("fill", "url(#gradient" + id + ")"); - path.setAttribute("fill-rule", "evenodd"); - exporter.addToDefs(gradient); - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - ImageTag image = null; - for (Tag t : swf.tags) { - if (t instanceof ImageTag) { - ImageTag i = (ImageTag) t; - if (i.getCharacterId() == bitmapId) { - image = i; - break; - } - } - } - if (image != null) { - SerializableImage img = image.getImage(); - if (img != null) { - colorTransform.apply(img); - int width = img.getWidth(); - int height = img.getHeight(); - lastPatternId++; - String patternId = "PatternID_" + lastPatternId; - String format = image.getImageFormat(); - InputStream imageStream = image.getImageData(); - byte[] imageData; - if (imageStream != null) { - imageData = Helper.readStream(image.getImageData()); - } else { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try { - ImageIO.write(img.getBufferedImage(), format.toUpperCase(Locale.ENGLISH), baos); - } catch (IOException ex) { - } - imageData = baos.toByteArray(); - } - String base64ImgData = DatatypeConverter.printBase64Binary(imageData); - path.setAttribute("style", "fill:url(#" + patternId + ")"); - Element pattern = exporter.createElement("pattern"); - pattern.setAttribute("id", patternId); - pattern.setAttribute("patternUnits", "userSpaceOnUse"); - pattern.setAttribute("overflow", "visible"); - pattern.setAttribute("width", "" + width); - pattern.setAttribute("height", "" + height); - pattern.setAttribute("viewBox", "0 0 " + width + " " + height); - if (matrix != null) { - matrix.rotateSkew0 /= SWF.unitDivisor; - matrix.rotateSkew1 /= SWF.unitDivisor; - matrix.scaleX /= SWF.unitDivisor; - matrix.scaleY /= SWF.unitDivisor; - matrixEnd.rotateSkew0 /= SWF.unitDivisor; - matrixEnd.rotateSkew1 /= SWF.unitDivisor; - matrixEnd.scaleX /= SWF.unitDivisor; - matrixEnd.scaleY /= SWF.unitDivisor; - addMatrixAnimation(pattern, "patternTransform", matrix, matrixEnd); - } - Element imageElement = exporter.createElement("image"); - imageElement.setAttribute("width", "" + width); - imageElement.setAttribute("height", "" + height); - imageElement.setAttribute("xlink:href", "data:image/" + format + ";base64," + base64ImgData); - pattern.appendChild(imageElement); - exporter.addToGroup(pattern); - } - } - } - - @Override - public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - thickness /= SWF.unitDivisor; - thicknessEnd /= SWF.unitDivisor; - path.setAttribute("fill", "none"); - path.setAttribute("stroke", color.toHexRGB()); - path.appendChild(createAnimateElement("stroke", color.toHexRGB(), colorEnd.toHexRGB())); - path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness)); - path.appendChild(createAnimateElement("stroke-width", thickness, thicknessEnd)); - - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - path.setAttribute("stroke-opacity", Float.toString(colorA.getAlphaFloat())); - } - RGBA colorAEnd = (RGBA) colorEnd; - path.appendChild(createAnimateElement("fill-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); - } - switch (startCaps) { - case LINESTYLE2.NO_CAP: - path.setAttribute("stroke-linecap", "butt"); - break; - case LINESTYLE2.SQUARE_CAP: - path.setAttribute("stroke-linecap", "square"); - break; - default: - path.setAttribute("stroke-linecap", "round"); - break; - } - switch (joints) { - case LINESTYLE2.BEVEL_JOIN: - path.setAttribute("stroke-linejoin", "bevel"); - break; - case LINESTYLE2.ROUND_JOIN: - path.setAttribute("stroke-linejoin", "round"); - break; - default: - path.setAttribute("stroke-linejoin", "miter"); - if (miterLimit >= 1 && miterLimit != 4) { - path.setAttribute("stroke-miterlimit", Integer.toString(miterLimit)); - } - break; - } - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { - path.removeAttribute("stroke-opacity"); - Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) - ? exporter.createElement("linearGradient") - : exporter.createElement("radialGradient"); - populateGradientElement(gradient, type, gradientRecords, gradientRecordsEnd, matrix, matrixEnd, spreadMethod, interpolationMethod, focalPointRatio); - int id = exporter.gradients.indexOf(gradient); - if (id < 0) { - // todo: filter same gradients - id = exporter.gradients.size(); - exporter.gradients.add(gradient); - } - gradient.setAttribute("id", "gradient" + id); - path.setAttribute("stroke", "url(#gradient" + id + ")"); - path.setAttribute("fill", "none"); - exporter.addToDefs(gradient); - } - - private Element createAnimateElement(String attributeName, Object startValue, Object endValue) { - Element animate = exporter.createElement("animate"); - animate.setAttribute("dur", "2s"); // todo - animate.setAttribute("repeatCount", "indefinite"); - animate.setAttribute("attributeName", attributeName); - animate.setAttribute("values", startValue + ";" + endValue); - return animate; - } - - @Override - protected void finalizePath() { - if (path != null && !"".equals(pathData)) { - path.setAttribute("d", pathData.trim()); - path.appendChild(createAnimateElement("d", pathData.trim(), pathDataEnd.trim())); - exporter.addToGroup(path); - } - path = exporter.createElement("path"); - super.finalizePath(); - } - - private void addMatrixAnimation(Element element, String attribute, Matrix matrix, Matrix matrixEnd) { - final int animationLength = 2; // todo - final String animationLengthStr = animationLength + "s"; - - element.setAttribute(attribute, matrix.getTransformationString(SWF.unitDivisor, 1)); - - // QR decomposition - double translateX = roundPixels400(matrix.translateX / SWF.unitDivisor); - double translateY = roundPixels400(matrix.translateY / SWF.unitDivisor); - double a = matrix.scaleX; - double b = matrix.rotateSkew0; - double c = matrix.rotateSkew1; - double d = matrix.scaleY; - double r = Math.sqrt(a * a + b * b); - double det = a * d - b * c; - double rotate = roundPixels400(Math.signum(b) * Math.acos(a / r) * 180 / Math.PI); - double scaleX = roundPixels400(r); - double scaleY = roundPixels400(det / r); - double skewX = roundPixels400(Math.atan((a * c + b * d) / (r * r)) * 180 / Math.PI); - - double translateXEnd = roundPixels400(matrixEnd.translateX / SWF.unitDivisor); - double translateYEnd = roundPixels400(matrixEnd.translateY / SWF.unitDivisor); - a = matrixEnd.scaleX; - b = matrixEnd.rotateSkew0; - c = matrixEnd.rotateSkew1; - d = matrixEnd.scaleY; - double rEnd = Math.sqrt(a * a + b * b); - double detEnd = a * d - b * c; - double rotateEnd = roundPixels400(Math.signum(b) * Math.acos(a / rEnd) * 180 / Math.PI); - double scaleXEnd = roundPixels400(rEnd); - double scaleYEnd = roundPixels400(detEnd / rEnd); - double skewXEnd = roundPixels400(Math.atan((a * c + b * d) / (rEnd * rEnd)) * 180 / Math.PI); - - Element animateClear = exporter.createElement("animateTransform"); - animateClear.setAttribute("dur", animationLengthStr); - animateClear.setAttribute("repeatCount", "indefinite"); - animateClear.setAttribute("attributeName", attribute); - animateClear.setAttribute("type", "scale"); - animateClear.setAttribute("additive", "replace"); - animateClear.setAttribute("from", "1"); - animateClear.setAttribute("to", "1"); - - Element animateTranslate = exporter.createElement("animateTransform"); - animateTranslate.setAttribute("dur", animationLengthStr); - animateTranslate.setAttribute("repeatCount", "indefinite"); - animateTranslate.setAttribute("attributeName", attribute); - animateTranslate.setAttribute("type", "translate"); - animateTranslate.setAttribute("additive", "sum"); - animateTranslate.setAttribute("from", translateX + " " + translateY); - animateTranslate.setAttribute("to", translateXEnd + " " + translateYEnd); - - Element animateRotate = exporter.createElement("animateTransform"); - animateRotate.setAttribute("dur", animationLengthStr); - animateRotate.setAttribute("repeatCount", "indefinite"); - animateRotate.setAttribute("attributeName", attribute); - animateRotate.setAttribute("type", "rotate"); - animateRotate.setAttribute("additive", "sum"); - animateRotate.setAttribute("from", Double.toString(rotate)); - animateRotate.setAttribute("to", Double.toString(rotateEnd)); - - Element animateScale = exporter.createElement("animateTransform"); - animateScale.setAttribute("dur", animationLengthStr); - animateScale.setAttribute("repeatCount", "indefinite"); - animateScale.setAttribute("attributeName", attribute); - animateScale.setAttribute("type", "scale"); - animateScale.setAttribute("additive", "sum"); - animateScale.setAttribute("from", scaleX + " " + scaleY); - animateScale.setAttribute("to", scaleXEnd + " " + scaleYEnd); - - Element animateSkewX = exporter.createElement("animateTransform"); - animateSkewX.setAttribute("dur", animationLengthStr); - animateSkewX.setAttribute("repeatCount", "indefinite"); - animateSkewX.setAttribute("attributeName", attribute); - animateSkewX.setAttribute("type", "skewX"); - animateSkewX.setAttribute("additive", "sum"); - animateSkewX.setAttribute("from", Double.toString(skewX)); - animateSkewX.setAttribute("to", Double.toString(skewXEnd)); - - element.appendChild(animateClear); - element.appendChild(animateTranslate); - element.appendChild(animateRotate); - element.appendChild(animateScale); - element.appendChild(animateSkewX); - - /* - // LDU decomposition - - double translateX = roundPixels400(matrix.translateX / SWF.unitDivisor); - double translateY = roundPixels400(matrix.translateY / SWF.unitDivisor); - double a = matrix.scaleX; - double b = matrix.rotateSkew0; - double c = matrix.rotateSkew1; - double d = matrix.scaleY; - double det = a * d - b * c; - double skewY = roundPixels400(Math.atan2(b, a) * 180 / Math.PI); - double scaleX = roundPixels400(a); - double scaleY = roundPixels400(det / a); - double skewX = roundPixels400(Math.atan2(c, a) * 180 / Math.PI); - - double translateXEnd = roundPixels400(matrixEnd.translateX / SWF.unitDivisor); - double translateYEnd = roundPixels400(matrixEnd.translateY / SWF.unitDivisor); - a = matrixEnd.scaleX; - b = matrixEnd.rotateSkew0; - c = matrixEnd.rotateSkew1; - d = matrixEnd.scaleY; - double detEnd = a * d - b * c; - double skewYEnd = roundPixels400(Math.atan2(b, a) * 180 / Math.PI); - double scaleXEnd = roundPixels400(a); - double scaleYEnd = roundPixels400(detEnd / a); - double skewXEnd = roundPixels400(Math.atan2(c, a) * 180 / Math.PI); - - Element animateClear = exporter.createElement("animateTransform"); - animateClear.setAttribute("dur", animationLengthStr); - animateClear.setAttribute("repeatCount", "indefinite"); - animateClear.setAttribute("attributeName", attribute); - animateClear.setAttribute("type", "scale"); - animateClear.setAttribute("additive", "replace"); - animateClear.setAttribute("from", "1"); - animateClear.setAttribute("to", "1"); - - Element animateTranslate = exporter.createElement("animateTransform"); - animateTranslate.setAttribute("dur", animationLengthStr); - animateTranslate.setAttribute("repeatCount", "indefinite"); - animateTranslate.setAttribute("attributeName", attribute); - animateTranslate.setAttribute("type", "translate"); - animateTranslate.setAttribute("additive", "sum"); - animateTranslate.setAttribute("from", translateX + " " + translateY); - animateTranslate.setAttribute("to", translateXEnd + " " + translateYEnd); - - Element animateSkewY = exporter.createElement("animateTransform"); - animateSkewY.setAttribute("dur", animationLengthStr); - animateSkewY.setAttribute("repeatCount", "indefinite"); - animateSkewY.setAttribute("attributeName", attribute); - animateSkewY.setAttribute("type", "skewY"); - animateSkewY.setAttribute("additive", "sum"); - animateSkewY.setAttribute("from", Double.toString(skewY)); - animateSkewY.setAttribute("to", Double.toString(skewYEnd)); - - Element animateScale = exporter.createElement("animateTransform"); - animateScale.setAttribute("dur", animationLengthStr); - animateScale.setAttribute("repeatCount", "indefinite"); - animateScale.setAttribute("attributeName", attribute); - animateScale.setAttribute("type", "scale"); - animateScale.setAttribute("additive", "sum"); - animateScale.setAttribute("from", scaleX + " " + scaleY); - animateScale.setAttribute("to", scaleXEnd + " " + scaleYEnd); - - Element animateSkewX = exporter.createElement("animateTransform"); - animateSkewX.setAttribute("dur", animationLengthStr); - animateSkewX.setAttribute("repeatCount", "indefinite"); - animateSkewX.setAttribute("attributeName", attribute); - animateSkewX.setAttribute("type", "skewX"); - animateSkewX.setAttribute("additive", "sum"); - animateSkewX.setAttribute("from", Double.toString(skewX)); - animateSkewX.setAttribute("to", Double.toString(skewXEnd)); - - element.appendChild(animateClear); - element.appendChild(animateTranslate); - element.appendChild(animateSkewY); - element.appendChild(animateScale); - element.appendChild(animateSkewX);*/ - } - - protected void populateGradientElement(Element gradient, int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio) { - gradient.setAttribute("gradientUnits", "userSpaceOnUse"); - if (type == FILLSTYLE.LINEAR_GRADIENT) { - gradient.setAttribute("x1", "-819.2"); - gradient.setAttribute("x2", "819.2"); - } else { - gradient.setAttribute("r", "819.2"); - gradient.setAttribute("cx", "0"); - gradient.setAttribute("cy", "0"); - if (focalPointRatio != 0) { - gradient.setAttribute("fx", Double.toString(819.2 * focalPointRatio)); - gradient.setAttribute("fy", "0"); - } - } - switch (spreadMethod) { - case GRADIENT.SPREAD_PAD_MODE: - gradient.setAttribute("spreadMethod", "pad"); - break; - case GRADIENT.SPREAD_REFLECT_MODE: - gradient.setAttribute("spreadMethod", "reflect"); - break; - case GRADIENT.SPREAD_REPEAT_MODE: - gradient.setAttribute("spreadMethod", "repeat"); - break; - } - if (interpolationMethod == GRADIENT.INTERPOLATION_LINEAR_RGB_MODE) { - gradient.setAttribute("color-interpolation", "linearRGB"); - } - if (matrix != null) { - addMatrixAnimation(gradient, "gradientTransform", matrix, matrixEnd); - } - for (int i = 0; i < gradientRecords.length; i++) { - GRADRECORD record = gradientRecords[i]; - GRADRECORD recordEnd = gradientRecordsEnd[i]; - Element gradientEntry = exporter.createElement("stop"); - gradientEntry.setAttribute("offset", Double.toString(record.ratio / 255.0)); - gradientEntry.appendChild(createAnimateElement("offset", record.ratio / 255.0, recordEnd.ratio / 255.0)); - RGB color = record.color; - RGB colorEnd = recordEnd.color; - //if(colors.get(i) != 0) { - gradientEntry.setAttribute("stop-color", color.toHexRGB()); - gradientEntry.appendChild(createAnimateElement("stop-color", color.toHexRGB(), colorEnd.toHexRGB())); - //} - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - gradientEntry.setAttribute("stop-opacity", Float.toString(colorA.getAlphaFloat())); - } - RGBA colorAEnd = (RGBA) colorEnd; - gradientEntry.appendChild(createAnimateElement("stop-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); - } - gradient.appendChild(gradientEntry); - } - } - - protected double roundPixels400(double pixels) { - return Math.round(pixels * 10000) / 10000.0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.base.ImageTag; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.SerializableImage; +import java.awt.Color; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Locale; +import javax.imageio.ImageIO; +import javax.xml.bind.DatatypeConverter; +import org.w3c.dom.Element; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public class SVGMorphShapeExporter extends DefaultSVGMorphShapeExporter { + + protected Element path; + protected int lastPatternId; + private final Color defaultColor; + private final SWF swf; + private final SVGExporter exporter; + + public SVGMorphShapeExporter(SWF swf, SHAPE shape, SHAPE endShape, SVGExporter exporter, Color defaultColor, ColorTransform colorTransform) { + super(shape, endShape, colorTransform); + this.swf = swf; + this.defaultColor = defaultColor; + this.exporter = exporter; + } + + @Override + public void beginFill(RGB color, RGB colorEnd) { + if (color == null) { + color = new RGB(defaultColor == null ? Color.BLACK : defaultColor); + } + if (colorEnd == null) { + colorEnd = new RGB(defaultColor == null ? Color.BLACK : defaultColor); + } + finalizePath(); + path.setAttribute("stroke", "none"); + path.setAttribute("fill", color.toHexRGB()); + path.setAttribute("fill-rule", "evenodd"); + path.appendChild(createAnimateElement("fill", color.toHexRGB(), colorEnd.toHexRGB())); + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + path.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); + } + RGBA colorAEnd = (RGBA) colorEnd; + path.appendChild(createAnimateElement("fill-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); + } + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { + finalizePath(); + Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) + ? exporter.createElement("linearGradient") + : exporter.createElement("radialGradient"); + populateGradientElement(gradient, type, gradientRecords, gradientRecordsEnd, matrix, matrixEnd, spreadMethod, interpolationMethod, focalPointRatio); + int id = exporter.gradients.indexOf(gradient); + if (id < 0) { + // todo: filter same gradients + id = exporter.gradients.size(); + exporter.gradients.add(gradient); + } + gradient.setAttribute("id", "gradient" + id); + path.setAttribute("stroke", "none"); + path.setAttribute("fill", "url(#gradient" + id + ")"); + path.setAttribute("fill-rule", "evenodd"); + exporter.addToDefs(gradient); + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, Matrix matrixEnd, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + ImageTag image = null; + for (Tag t : swf.tags) { + if (t instanceof ImageTag) { + ImageTag i = (ImageTag) t; + if (i.getCharacterId() == bitmapId) { + image = i; + break; + } + } + } + if (image != null) { + SerializableImage img = image.getImage(); + if (img != null) { + colorTransform.apply(img); + int width = img.getWidth(); + int height = img.getHeight(); + lastPatternId++; + String patternId = "PatternID_" + lastPatternId; + String format = image.getImageFormat(); + InputStream imageStream = image.getImageData(); + byte[] imageData; + if (imageStream != null) { + imageData = Helper.readStream(image.getImageData()); + } else { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + ImageIO.write(img.getBufferedImage(), format.toUpperCase(Locale.ENGLISH), baos); + } catch (IOException ex) { + } + imageData = baos.toByteArray(); + } + String base64ImgData = DatatypeConverter.printBase64Binary(imageData); + path.setAttribute("style", "fill:url(#" + patternId + ")"); + Element pattern = exporter.createElement("pattern"); + pattern.setAttribute("id", patternId); + pattern.setAttribute("patternUnits", "userSpaceOnUse"); + pattern.setAttribute("overflow", "visible"); + pattern.setAttribute("width", "" + width); + pattern.setAttribute("height", "" + height); + pattern.setAttribute("viewBox", "0 0 " + width + " " + height); + if (matrix != null) { + matrix.rotateSkew0 /= SWF.unitDivisor; + matrix.rotateSkew1 /= SWF.unitDivisor; + matrix.scaleX /= SWF.unitDivisor; + matrix.scaleY /= SWF.unitDivisor; + matrixEnd.rotateSkew0 /= SWF.unitDivisor; + matrixEnd.rotateSkew1 /= SWF.unitDivisor; + matrixEnd.scaleX /= SWF.unitDivisor; + matrixEnd.scaleY /= SWF.unitDivisor; + addMatrixAnimation(pattern, "patternTransform", matrix, matrixEnd); + } + Element imageElement = exporter.createElement("image"); + imageElement.setAttribute("width", "" + width); + imageElement.setAttribute("height", "" + height); + imageElement.setAttribute("xlink:href", "data:image/" + format + ";base64," + base64ImgData); + pattern.appendChild(imageElement); + exporter.addToGroup(pattern); + } + } + } + + @Override + public void lineStyle(double thickness, double thicknessEnd, RGB color, RGB colorEnd, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + thickness /= SWF.unitDivisor; + thicknessEnd /= SWF.unitDivisor; + path.setAttribute("fill", "none"); + path.setAttribute("stroke", color.toHexRGB()); + path.appendChild(createAnimateElement("stroke", color.toHexRGB(), colorEnd.toHexRGB())); + path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness)); + path.appendChild(createAnimateElement("stroke-width", thickness, thicknessEnd)); + + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + path.setAttribute("stroke-opacity", Float.toString(colorA.getAlphaFloat())); + } + RGBA colorAEnd = (RGBA) colorEnd; + path.appendChild(createAnimateElement("fill-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); + } + switch (startCaps) { + case LINESTYLE2.NO_CAP: + path.setAttribute("stroke-linecap", "butt"); + break; + case LINESTYLE2.SQUARE_CAP: + path.setAttribute("stroke-linecap", "square"); + break; + default: + path.setAttribute("stroke-linecap", "round"); + break; + } + switch (joints) { + case LINESTYLE2.BEVEL_JOIN: + path.setAttribute("stroke-linejoin", "bevel"); + break; + case LINESTYLE2.ROUND_JOIN: + path.setAttribute("stroke-linejoin", "round"); + break; + default: + path.setAttribute("stroke-linejoin", "miter"); + if (miterLimit >= 1 && miterLimit != 4) { + path.setAttribute("stroke-miterlimit", Integer.toString(miterLimit)); + } + break; + } + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio, float focalPointRatioEnd) { + path.removeAttribute("stroke-opacity"); + Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) + ? exporter.createElement("linearGradient") + : exporter.createElement("radialGradient"); + populateGradientElement(gradient, type, gradientRecords, gradientRecordsEnd, matrix, matrixEnd, spreadMethod, interpolationMethod, focalPointRatio); + int id = exporter.gradients.indexOf(gradient); + if (id < 0) { + // todo: filter same gradients + id = exporter.gradients.size(); + exporter.gradients.add(gradient); + } + gradient.setAttribute("id", "gradient" + id); + path.setAttribute("stroke", "url(#gradient" + id + ")"); + path.setAttribute("fill", "none"); + exporter.addToDefs(gradient); + } + + private Element createAnimateElement(String attributeName, Object startValue, Object endValue) { + Element animate = exporter.createElement("animate"); + animate.setAttribute("dur", "2s"); // todo + animate.setAttribute("repeatCount", "indefinite"); + animate.setAttribute("attributeName", attributeName); + animate.setAttribute("values", startValue + ";" + endValue); + return animate; + } + + @Override + protected void finalizePath() { + if (path != null && !"".equals(pathData)) { + path.setAttribute("d", pathData.trim()); + path.appendChild(createAnimateElement("d", pathData.trim(), pathDataEnd.trim())); + exporter.addToGroup(path); + } + path = exporter.createElement("path"); + super.finalizePath(); + } + + private void addMatrixAnimation(Element element, String attribute, Matrix matrix, Matrix matrixEnd) { + final int animationLength = 2; // todo + final String animationLengthStr = animationLength + "s"; + + element.setAttribute(attribute, matrix.getTransformationString(SWF.unitDivisor, 1)); + + // QR decomposition + double translateX = roundPixels400(matrix.translateX / SWF.unitDivisor); + double translateY = roundPixels400(matrix.translateY / SWF.unitDivisor); + double a = matrix.scaleX; + double b = matrix.rotateSkew0; + double c = matrix.rotateSkew1; + double d = matrix.scaleY; + double r = Math.sqrt(a * a + b * b); + double det = a * d - b * c; + double rotate = roundPixels400(Math.signum(b) * Math.acos(a / r) * 180 / Math.PI); + double scaleX = roundPixels400(r); + double scaleY = roundPixels400(det / r); + double skewX = roundPixels400(Math.atan((a * c + b * d) / (r * r)) * 180 / Math.PI); + + double translateXEnd = roundPixels400(matrixEnd.translateX / SWF.unitDivisor); + double translateYEnd = roundPixels400(matrixEnd.translateY / SWF.unitDivisor); + a = matrixEnd.scaleX; + b = matrixEnd.rotateSkew0; + c = matrixEnd.rotateSkew1; + d = matrixEnd.scaleY; + double rEnd = Math.sqrt(a * a + b * b); + double detEnd = a * d - b * c; + double rotateEnd = roundPixels400(Math.signum(b) * Math.acos(a / rEnd) * 180 / Math.PI); + double scaleXEnd = roundPixels400(rEnd); + double scaleYEnd = roundPixels400(detEnd / rEnd); + double skewXEnd = roundPixels400(Math.atan((a * c + b * d) / (rEnd * rEnd)) * 180 / Math.PI); + + Element animateClear = exporter.createElement("animateTransform"); + animateClear.setAttribute("dur", animationLengthStr); + animateClear.setAttribute("repeatCount", "indefinite"); + animateClear.setAttribute("attributeName", attribute); + animateClear.setAttribute("type", "scale"); + animateClear.setAttribute("additive", "replace"); + animateClear.setAttribute("from", "1"); + animateClear.setAttribute("to", "1"); + + Element animateTranslate = exporter.createElement("animateTransform"); + animateTranslate.setAttribute("dur", animationLengthStr); + animateTranslate.setAttribute("repeatCount", "indefinite"); + animateTranslate.setAttribute("attributeName", attribute); + animateTranslate.setAttribute("type", "translate"); + animateTranslate.setAttribute("additive", "sum"); + animateTranslate.setAttribute("from", translateX + " " + translateY); + animateTranslate.setAttribute("to", translateXEnd + " " + translateYEnd); + + Element animateRotate = exporter.createElement("animateTransform"); + animateRotate.setAttribute("dur", animationLengthStr); + animateRotate.setAttribute("repeatCount", "indefinite"); + animateRotate.setAttribute("attributeName", attribute); + animateRotate.setAttribute("type", "rotate"); + animateRotate.setAttribute("additive", "sum"); + animateRotate.setAttribute("from", Double.toString(rotate)); + animateRotate.setAttribute("to", Double.toString(rotateEnd)); + + Element animateScale = exporter.createElement("animateTransform"); + animateScale.setAttribute("dur", animationLengthStr); + animateScale.setAttribute("repeatCount", "indefinite"); + animateScale.setAttribute("attributeName", attribute); + animateScale.setAttribute("type", "scale"); + animateScale.setAttribute("additive", "sum"); + animateScale.setAttribute("from", scaleX + " " + scaleY); + animateScale.setAttribute("to", scaleXEnd + " " + scaleYEnd); + + Element animateSkewX = exporter.createElement("animateTransform"); + animateSkewX.setAttribute("dur", animationLengthStr); + animateSkewX.setAttribute("repeatCount", "indefinite"); + animateSkewX.setAttribute("attributeName", attribute); + animateSkewX.setAttribute("type", "skewX"); + animateSkewX.setAttribute("additive", "sum"); + animateSkewX.setAttribute("from", Double.toString(skewX)); + animateSkewX.setAttribute("to", Double.toString(skewXEnd)); + + element.appendChild(animateClear); + element.appendChild(animateTranslate); + element.appendChild(animateRotate); + element.appendChild(animateScale); + element.appendChild(animateSkewX); + + /* + // LDU decomposition + + double translateX = roundPixels400(matrix.translateX / SWF.unitDivisor); + double translateY = roundPixels400(matrix.translateY / SWF.unitDivisor); + double a = matrix.scaleX; + double b = matrix.rotateSkew0; + double c = matrix.rotateSkew1; + double d = matrix.scaleY; + double det = a * d - b * c; + double skewY = roundPixels400(Math.atan2(b, a) * 180 / Math.PI); + double scaleX = roundPixels400(a); + double scaleY = roundPixels400(det / a); + double skewX = roundPixels400(Math.atan2(c, a) * 180 / Math.PI); + + double translateXEnd = roundPixels400(matrixEnd.translateX / SWF.unitDivisor); + double translateYEnd = roundPixels400(matrixEnd.translateY / SWF.unitDivisor); + a = matrixEnd.scaleX; + b = matrixEnd.rotateSkew0; + c = matrixEnd.rotateSkew1; + d = matrixEnd.scaleY; + double detEnd = a * d - b * c; + double skewYEnd = roundPixels400(Math.atan2(b, a) * 180 / Math.PI); + double scaleXEnd = roundPixels400(a); + double scaleYEnd = roundPixels400(detEnd / a); + double skewXEnd = roundPixels400(Math.atan2(c, a) * 180 / Math.PI); + + Element animateClear = exporter.createElement("animateTransform"); + animateClear.setAttribute("dur", animationLengthStr); + animateClear.setAttribute("repeatCount", "indefinite"); + animateClear.setAttribute("attributeName", attribute); + animateClear.setAttribute("type", "scale"); + animateClear.setAttribute("additive", "replace"); + animateClear.setAttribute("from", "1"); + animateClear.setAttribute("to", "1"); + + Element animateTranslate = exporter.createElement("animateTransform"); + animateTranslate.setAttribute("dur", animationLengthStr); + animateTranslate.setAttribute("repeatCount", "indefinite"); + animateTranslate.setAttribute("attributeName", attribute); + animateTranslate.setAttribute("type", "translate"); + animateTranslate.setAttribute("additive", "sum"); + animateTranslate.setAttribute("from", translateX + " " + translateY); + animateTranslate.setAttribute("to", translateXEnd + " " + translateYEnd); + + Element animateSkewY = exporter.createElement("animateTransform"); + animateSkewY.setAttribute("dur", animationLengthStr); + animateSkewY.setAttribute("repeatCount", "indefinite"); + animateSkewY.setAttribute("attributeName", attribute); + animateSkewY.setAttribute("type", "skewY"); + animateSkewY.setAttribute("additive", "sum"); + animateSkewY.setAttribute("from", Double.toString(skewY)); + animateSkewY.setAttribute("to", Double.toString(skewYEnd)); + + Element animateScale = exporter.createElement("animateTransform"); + animateScale.setAttribute("dur", animationLengthStr); + animateScale.setAttribute("repeatCount", "indefinite"); + animateScale.setAttribute("attributeName", attribute); + animateScale.setAttribute("type", "scale"); + animateScale.setAttribute("additive", "sum"); + animateScale.setAttribute("from", scaleX + " " + scaleY); + animateScale.setAttribute("to", scaleXEnd + " " + scaleYEnd); + + Element animateSkewX = exporter.createElement("animateTransform"); + animateSkewX.setAttribute("dur", animationLengthStr); + animateSkewX.setAttribute("repeatCount", "indefinite"); + animateSkewX.setAttribute("attributeName", attribute); + animateSkewX.setAttribute("type", "skewX"); + animateSkewX.setAttribute("additive", "sum"); + animateSkewX.setAttribute("from", Double.toString(skewX)); + animateSkewX.setAttribute("to", Double.toString(skewXEnd)); + + element.appendChild(animateClear); + element.appendChild(animateTranslate); + element.appendChild(animateSkewY); + element.appendChild(animateScale); + element.appendChild(animateSkewX);*/ + } + + protected void populateGradientElement(Element gradient, int type, GRADRECORD[] gradientRecords, GRADRECORD[] gradientRecordsEnd, Matrix matrix, Matrix matrixEnd, int spreadMethod, int interpolationMethod, float focalPointRatio) { + gradient.setAttribute("gradientUnits", "userSpaceOnUse"); + if (type == FILLSTYLE.LINEAR_GRADIENT) { + gradient.setAttribute("x1", "-819.2"); + gradient.setAttribute("x2", "819.2"); + } else { + gradient.setAttribute("r", "819.2"); + gradient.setAttribute("cx", "0"); + gradient.setAttribute("cy", "0"); + if (focalPointRatio != 0) { + gradient.setAttribute("fx", Double.toString(819.2 * focalPointRatio)); + gradient.setAttribute("fy", "0"); + } + } + switch (spreadMethod) { + case GRADIENT.SPREAD_PAD_MODE: + gradient.setAttribute("spreadMethod", "pad"); + break; + case GRADIENT.SPREAD_REFLECT_MODE: + gradient.setAttribute("spreadMethod", "reflect"); + break; + case GRADIENT.SPREAD_REPEAT_MODE: + gradient.setAttribute("spreadMethod", "repeat"); + break; + } + if (interpolationMethod == GRADIENT.INTERPOLATION_LINEAR_RGB_MODE) { + gradient.setAttribute("color-interpolation", "linearRGB"); + } + if (matrix != null) { + addMatrixAnimation(gradient, "gradientTransform", matrix, matrixEnd); + } + for (int i = 0; i < gradientRecords.length; i++) { + GRADRECORD record = gradientRecords[i]; + GRADRECORD recordEnd = gradientRecordsEnd[i]; + Element gradientEntry = exporter.createElement("stop"); + gradientEntry.setAttribute("offset", Double.toString(record.ratio / 255.0)); + gradientEntry.appendChild(createAnimateElement("offset", record.ratio / 255.0, recordEnd.ratio / 255.0)); + RGB color = record.color; + RGB colorEnd = recordEnd.color; + //if(colors.get(i) != 0) { + gradientEntry.setAttribute("stop-color", color.toHexRGB()); + gradientEntry.appendChild(createAnimateElement("stop-color", color.toHexRGB(), colorEnd.toHexRGB())); + //} + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + gradientEntry.setAttribute("stop-opacity", Float.toString(colorA.getAlphaFloat())); + } + RGBA colorAEnd = (RGBA) colorEnd; + gradientEntry.appendChild(createAnimateElement("stop-opacity", colorA.getAlphaFloat(), colorAEnd.getAlphaFloat())); + } + gradient.appendChild(gradientEntry); + } + } + + protected double roundPixels400(double pixels) { + return Math.round(pixels * 10000) / 10000.0; + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java similarity index 64% rename from src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java index 83f76b764..d67081b6c 100644 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/morphshape/StraightMorphEdge.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public class StraightMorphEdge implements IMorphEdge { - - protected final PointInt from; - protected final PointInt to; - protected final PointInt fromEnd; - protected final PointInt toEnd; - protected final int lineStyleIdx; - private final int fillStyleIdx; - - StraightMorphEdge(PointInt from, PointInt to, PointInt fromEnd, PointInt toEnd, int lineStyleIdx, int fillStyleIdx) { - this.from = from; - this.to = to; - this.fromEnd = fromEnd; - this.toEnd = toEnd; - this.lineStyleIdx = lineStyleIdx; - this.fillStyleIdx = fillStyleIdx; - } - - @Override - public PointInt getFrom() { - return from; - } - - @Override - public PointInt getTo() { - return to; - } - - @Override - public PointInt getFromEnd() { - return fromEnd; - } - - @Override - public PointInt getToEnd() { - return toEnd; - } - - @Override - public int getLineStyleIdx() { - return lineStyleIdx; - } - - @Override - public int getFillStyleIdx() { - return fillStyleIdx; - } - - @Override - public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx) { - return new StraightMorphEdge(to, from, toEnd, fromEnd, lineStyleIdx, newFillStyleIdx); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.morphshape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public class StraightMorphEdge implements IMorphEdge { + + protected final PointInt from; + protected final PointInt to; + protected final PointInt fromEnd; + protected final PointInt toEnd; + protected final int lineStyleIdx; + private final int fillStyleIdx; + + StraightMorphEdge(PointInt from, PointInt to, PointInt fromEnd, PointInt toEnd, int lineStyleIdx, int fillStyleIdx) { + this.from = from; + this.to = to; + this.fromEnd = fromEnd; + this.toEnd = toEnd; + this.lineStyleIdx = lineStyleIdx; + this.fillStyleIdx = fillStyleIdx; + } + + @Override + public PointInt getFrom() { + return from; + } + + @Override + public PointInt getTo() { + return to; + } + + @Override + public PointInt getFromEnd() { + return fromEnd; + } + + @Override + public PointInt getToEnd() { + return toEnd; + } + + @Override + public int getLineStyleIdx() { + return lineStyleIdx; + } + + @Override + public int getFillStyleIdx() { + return fillStyleIdx; + } + + @Override + public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx) { + return new StraightMorphEdge(to, from, toEnd, fromEnd, lineStyleIdx, newFillStyleIdx); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java new file mode 100644 index 000000000..cffedd4b7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode; + +/** + * + * @author JPEXS + */ +public class BinaryDataExportSettings { + + public BinaryDataExportMode mode; + + public BinaryDataExportSettings(BinaryDataExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java new file mode 100644 index 000000000..0edce1f5f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; + +/** + * + * @author JPEXS + */ +public class FontExportSettings { + + public FontExportMode mode; + + public FontExportSettings(FontExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java new file mode 100644 index 000000000..28403544d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.FramesExportMode; + +/** + * + * @author JPEXS + */ +public class FramesExportSettings { + + public FramesExportMode mode; + + public FramesExportSettings(FramesExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java new file mode 100644 index 000000000..91b6d5799 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.ImageExportMode; + +/** + * + * @author JPEXS + */ +public class ImageExportSettings { + + public ImageExportMode mode; + + public ImageExportSettings(ImageExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java new file mode 100644 index 000000000..d49c7e3a8 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.MorphShapeExportMode; + +/** + * + * @author JPEXS + */ +public class MorphShapeExportSettings { + + public MorphShapeExportMode mode; + + public MorphShapeExportSettings(MorphShapeExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java new file mode 100644 index 000000000..cb2e19e3c --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.MovieExportMode; + +/** + * + * @author JPEXS + */ +public class MovieExportSettings { + + public MovieExportMode mode; + + public MovieExportSettings(MovieExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java new file mode 100644 index 000000000..5fbf22998 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; + +/** + * + * @author JPEXS + */ +public class ScriptExportSettings { + + public ScriptExportMode mode; + + public ScriptExportSettings(ScriptExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java new file mode 100644 index 000000000..b0eccfaa6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.ShapeExportMode; + +/** + * + * @author JPEXS + */ +public class ShapeExportSettings { + + public ShapeExportMode mode; + + public ShapeExportSettings(ShapeExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java new file mode 100644 index 000000000..720bbcd58 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.SoundExportMode; + +/** + * + * @author JPEXS + */ +public class SoundExportSettings { + + public SoundExportMode mode; + + public SoundExportSettings(SoundExportMode mode) { + this.mode = mode; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java new file mode 100644 index 000000000..6e1894bec --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.settings; + +import com.jpexs.decompiler.flash.exporters.modes.TextExportMode; + +/** + * + * @author JPEXS + */ +public class TextExportSettings { + + public TextExportMode mode; + public boolean singleFile; + + public TextExportSettings(TextExportMode mode, boolean singleFile) { + this.mode = mode; + this.singleFile = singleFile; + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java similarity index 93% rename from src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java index 09e86e54e..d581a8691 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java @@ -1,405 +1,404 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.ExportRectangle; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.tags.base.ImageTag; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.GRADIENT; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.helpers.SerializableImage; -import java.awt.AlphaComposite; -import java.awt.BasicStroke; -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.LinearGradientPaint; -import java.awt.MultipleGradientPaint; -import java.awt.Paint; -import java.awt.RadialGradientPaint; -import java.awt.Stroke; -import java.awt.TexturePaint; -import java.awt.geom.AffineTransform; -import java.awt.geom.GeneralPath; -import java.awt.geom.NoninvertibleTransformException; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class BitmapExporter extends ShapeExporterBase { - - private SerializableImage image; - private Graphics2D graphics; - private final Color defaultColor; - private double deltaX; - private double deltaY; - private final SWF swf; - private GeneralPath path; - private Paint fillPathPaint; - private Paint fillPaint; - private AffineTransform fillTransform; - private Color lineColor; - private Stroke lineStroke; - private Stroke defaultStroke; - private double unitDivisor; - - public static void export(SWF swf, SHAPE shape, Color defaultColor, SerializableImage image, Matrix transformation, ColorTransform colorTransform) { - BitmapExporter exporter = new BitmapExporter(swf, shape, defaultColor, colorTransform); - exporter.exportTo(image, transformation); - } - - private BitmapExporter(SWF swf, SHAPE shape, Color defaultColor, ColorTransform colorTransform) { - super(shape, colorTransform); - this.swf = swf; - this.defaultColor = defaultColor; - } - - private void exportTo(SerializableImage image, Matrix transformation) { - this.image = image; - graphics = (Graphics2D) image.getGraphics(); - AffineTransform at = transformation.toTransform(); - at.preConcatenate(AffineTransform.getScaleInstance(1 / SWF.unitDivisor, 1 / SWF.unitDivisor)); - unitDivisor = 1; - graphics.setTransform(at); - defaultStroke = graphics.getStroke(); - super.export(); - } - - public SerializableImage getImage() { - return image; - } - - @Override - public void beginShape() { - } - - @Override - public void endShape() { - } - - @Override - public void beginFills() { - } - - @Override - public void endFills() { - } - - @Override - public void beginLines() { - } - - @Override - public void endLines() { - finalizePath(); - } - - @Override - public void beginFill(RGB color) { - finalizePath(); - if (color == null) { - fillPaint = defaultColor; - } else { - fillPaint = color.toColor(); - } - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - finalizePath(); - matrix.translateX /= unitDivisor; - matrix.translateY /= unitDivisor; - matrix.scaleX /= unitDivisor; - matrix.scaleY /= unitDivisor; - matrix.rotateSkew0 /= unitDivisor; - matrix.rotateSkew1 /= unitDivisor; - switch (type) { - case FILLSTYLE.LINEAR_GRADIENT: { - List colors = new ArrayList<>(); - List ratios = new ArrayList<>(); - for (int i = 0; i < gradientRecords.length; i++) { - if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { - continue; - } - ratios.add(gradientRecords[i].getRatioFloat()); - colors.add(gradientRecords[i].color.toColor()); - } - - float[] ratiosArr = new float[ratios.size()]; - for (int i = 0; i < ratios.size(); i++) { - ratiosArr[i] = ratios.get(i); - } - Color[] colorsArr = colors.toArray(new Color[colors.size()]); - - MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { - cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REFLECT; - } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REPEAT; - } - - fillPathPaint = null; - fillPaint = new LinearGradientPaint(new java.awt.Point(-16384, 0), new java.awt.Point(16384, 0), ratiosArr, colorsArr, cm); - matrix.translateX -= deltaX; - matrix.translateY -= deltaY; - fillTransform = matrix.toTransform(); - } - break; - case FILLSTYLE.RADIAL_GRADIENT: { - List colors = new ArrayList<>(); - List ratios = new ArrayList<>(); - for (int i = 0; i < gradientRecords.length; i++) { - if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { - continue; - } - ratios.add(gradientRecords[i].getRatioFloat()); - colors.add(gradientRecords[i].color.toColor()); - } - - float[] ratiosArr = new float[ratios.size()]; - for (int i = 0; i < ratios.size(); i++) { - ratiosArr[i] = ratios.get(i); - } - Color[] colorsArr = colors.toArray(new Color[colors.size()]); - - MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { - cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REFLECT; - } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REPEAT; - } - - Color endColor = gradientRecords[gradientRecords.length - 1].color.toColor(); - fillPathPaint = endColor; - fillPaint = new RadialGradientPaint(new java.awt.Point(0, 0), 16384, ratiosArr, colorsArr, cm); - matrix.translateX -= deltaX; - matrix.translateY -= deltaY; - fillTransform = matrix.toTransform(); - } - break; - case FILLSTYLE.FOCAL_RADIAL_GRADIENT: { - List colors = new ArrayList<>(); - List ratios = new ArrayList<>(); - for (int i = 0; i < gradientRecords.length; i++) { - if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { - continue; - } - ratios.add(gradientRecords[i].getRatioFloat()); - colors.add(gradientRecords[i].color.toColor()); - } - - float[] ratiosArr = new float[ratios.size()]; - for (int i = 0; i < ratios.size(); i++) { - ratiosArr[i] = ratios.get(i); - } - Color[] colorsArr = colors.toArray(new Color[colors.size()]); - - MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { - cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; - } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REFLECT; - } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { - cm = MultipleGradientPaint.CycleMethod.REPEAT; - } - - Color endColor = gradientRecords[gradientRecords.length - 1].color.toColor(); - fillPathPaint = endColor; - fillPaint = new RadialGradientPaint(new java.awt.Point(0, 0), 16384, new java.awt.Point((int) (focalPointRatio * 16384), 0), ratiosArr, colorsArr, cm); - matrix.translateX -= deltaX; - matrix.translateY -= deltaY; - fillTransform = matrix.toTransform(); - } - break; - } - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - matrix.translateX /= unitDivisor; - matrix.translateY /= unitDivisor; - matrix.scaleX /= unitDivisor; - matrix.scaleY /= unitDivisor; - matrix.rotateSkew0 /= unitDivisor; - matrix.rotateSkew1 /= unitDivisor; - ImageTag image = null; - for (Tag t : swf.tags) { - if (t instanceof ImageTag) { - ImageTag i = (ImageTag) t; - if (i.getCharacterId() == bitmapId) { - image = i; - break; - } - } - } - if (image != null) { - SerializableImage img = image.getImage(); - if (img != null) { - img = colorTransform.apply(img); - fillPaint = new TexturePaint(img.getBufferedImage(), new java.awt.Rectangle(img.getWidth(), img.getHeight())); - matrix.translateX -= deltaX; - matrix.translateY -= deltaY; - fillTransform = matrix.toTransform(); - } - } - } - - @Override - public void endFill() { - finalizePath(); - fillPaint = null; - } - - @Override - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - thickness /= unitDivisor; - lineColor = color == null ? null : color.toColor(); - int capStyle = BasicStroke.CAP_ROUND; - switch (startCaps) { - case LINESTYLE2.NO_CAP: - capStyle = BasicStroke.CAP_BUTT; - break; - case LINESTYLE2.ROUND_CAP: - capStyle = BasicStroke.CAP_ROUND; - break; - case LINESTYLE2.SQUARE_CAP: - capStyle = BasicStroke.CAP_SQUARE; - break; - } - int joinStyle = BasicStroke.JOIN_ROUND; - switch (joints) { - case LINESTYLE2.BEVEL_JOIN: - joinStyle = BasicStroke.JOIN_BEVEL; - break; - case LINESTYLE2.MITER_JOIN: - joinStyle = BasicStroke.JOIN_MITER; - break; - case LINESTYLE2.ROUND_JOIN: - joinStyle = BasicStroke.JOIN_ROUND; - break; - } - if (joinStyle == BasicStroke.JOIN_MITER) { - lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle, miterLimit); - } else { - lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle); - } - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - } - - @Override - public void moveTo(double x, double y) { - path.moveTo(x / unitDivisor - deltaX, y / unitDivisor - deltaY); - } - - @Override - public void lineTo(double x, double y) { - path.lineTo(x / unitDivisor - deltaX, y / unitDivisor - deltaY); - } - - @Override - public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { - path.quadTo(controlX / unitDivisor - deltaX, controlY / unitDivisor - deltaY, - anchorX / unitDivisor - deltaX, anchorY / unitDivisor - deltaY); - } - - protected void finalizePath() { - if (path != null) { - if (fillPaint != null) { - graphics.setComposite(AlphaComposite.SrcOver); - if (fillPaint instanceof MultipleGradientPaint) { - AffineTransform oldAf = graphics.getTransform(); - if (fillPathPaint != null) { - graphics.setPaint(fillPathPaint); - } - graphics.fill(path); - graphics.setClip(path); - Matrix inverse = null; - try { - inverse = new Matrix(new AffineTransform(fillTransform).createInverse()); - } catch (NoninvertibleTransformException ex) { - } - - fillTransform.preConcatenate(oldAf); - graphics.setTransform(fillTransform); - graphics.setPaint(fillPaint); - - if (inverse != null) { - ExportRectangle rect = inverse.transform(new ExportRectangle(path.getBounds2D())); - double minX = rect.xMin; - double minY = rect.yMin; - graphics.fill(new java.awt.Rectangle((int) minX, (int) minY, (int) (rect.xMax - minX), (int) (rect.yMax - minY))); - } - - graphics.setTransform(oldAf); - graphics.setClip(null); - } else if (fillPaint instanceof TexturePaint) { - AffineTransform oldAf = graphics.getTransform(); - graphics.setClip(path); - Matrix inverse = null; - try { - inverse = new Matrix(new AffineTransform(fillTransform).createInverse()); - } catch (NoninvertibleTransformException ex) { - } - - fillTransform.preConcatenate(oldAf); - graphics.setTransform(fillTransform); - graphics.setPaint(fillPaint); - - if (inverse != null) { - ExportRectangle rect = inverse.transform(new ExportRectangle(path.getBounds2D())); - double minX = rect.xMin; - double minY = rect.yMin; - graphics.fill(new java.awt.Rectangle((int) minX, (int) minY, (int) (rect.xMax - minX), (int) (rect.yMax - minY))); - } - - graphics.setTransform(oldAf); - graphics.setClip(null); - } else { - graphics.setPaint(fillPaint); - graphics.fill(path); - } - } - if (lineColor != null) { - graphics.setColor(lineColor); - graphics.setStroke(lineStroke == null ? defaultStroke : lineStroke); - graphics.draw(path); - } - } - path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); //For correct intersections display - lineStroke = null; - lineColor = null; - fillPaint = null; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.ExportRectangle; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.base.ImageTag; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.helpers.SerializableImage; +import java.awt.AlphaComposite; +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.LinearGradientPaint; +import java.awt.MultipleGradientPaint; +import java.awt.Paint; +import java.awt.RadialGradientPaint; +import java.awt.Stroke; +import java.awt.TexturePaint; +import java.awt.geom.AffineTransform; +import java.awt.geom.GeneralPath; +import java.awt.geom.NoninvertibleTransformException; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class BitmapExporter extends ShapeExporterBase { + + private SerializableImage image; + private Graphics2D graphics; + private final Color defaultColor; + private double deltaX; + private double deltaY; + private final SWF swf; + private GeneralPath path; + private Paint fillPathPaint; + private Paint fillPaint; + private AffineTransform fillTransform; + private Color lineColor; + private Stroke lineStroke; + private Stroke defaultStroke; + private double unitDivisor; + + public static void export(SWF swf, SHAPE shape, Color defaultColor, SerializableImage image, Matrix transformation, ColorTransform colorTransform) { + BitmapExporter exporter = new BitmapExporter(swf, shape, defaultColor, colorTransform); + exporter.exportTo(image, transformation); + } + + private BitmapExporter(SWF swf, SHAPE shape, Color defaultColor, ColorTransform colorTransform) { + super(shape, colorTransform); + this.swf = swf; + this.defaultColor = defaultColor; + } + + private void exportTo(SerializableImage image, Matrix transformation) { + this.image = image; + graphics = (Graphics2D) image.getGraphics(); + AffineTransform at = transformation.toTransform(); + at.preConcatenate(AffineTransform.getScaleInstance(1 / SWF.unitDivisor, 1 / SWF.unitDivisor)); + unitDivisor = 1; + graphics.setTransform(at); + defaultStroke = graphics.getStroke(); + super.export(); + } + + public SerializableImage getImage() { + return image; + } + + @Override + public void beginShape() { + } + + @Override + public void endShape() { + } + + @Override + public void beginFills() { + } + + @Override + public void endFills() { + } + + @Override + public void beginLines() { + } + + @Override + public void endLines() { + finalizePath(); + } + + @Override + public void beginFill(RGB color) { + finalizePath(); + if (color == null) { + fillPaint = defaultColor; + } else { + fillPaint = color.toColor(); + } + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + finalizePath(); + matrix.translateX /= unitDivisor; + matrix.translateY /= unitDivisor; + matrix.scaleX /= unitDivisor; + matrix.scaleY /= unitDivisor; + matrix.rotateSkew0 /= unitDivisor; + matrix.rotateSkew1 /= unitDivisor; + switch (type) { + case FILLSTYLE.LINEAR_GRADIENT: { + List colors = new ArrayList<>(); + List ratios = new ArrayList<>(); + for (int i = 0; i < gradientRecords.length; i++) { + if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { + continue; + } + ratios.add(gradientRecords[i].getRatioFloat()); + colors.add(gradientRecords[i].color.toColor()); + } + + float[] ratiosArr = new float[ratios.size()]; + for (int i = 0; i < ratios.size(); i++) { + ratiosArr[i] = ratios.get(i); + } + Color[] colorsArr = colors.toArray(new Color[colors.size()]); + + MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { + cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REFLECT; + } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REPEAT; + } + + fillPathPaint = null; + fillPaint = new LinearGradientPaint(new java.awt.Point(-16384, 0), new java.awt.Point(16384, 0), ratiosArr, colorsArr, cm); + matrix.translateX -= deltaX; + matrix.translateY -= deltaY; + fillTransform = matrix.toTransform(); + } + break; + case FILLSTYLE.RADIAL_GRADIENT: { + List colors = new ArrayList<>(); + List ratios = new ArrayList<>(); + for (int i = 0; i < gradientRecords.length; i++) { + if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { + continue; + } + ratios.add(gradientRecords[i].getRatioFloat()); + colors.add(gradientRecords[i].color.toColor()); + } + + float[] ratiosArr = new float[ratios.size()]; + for (int i = 0; i < ratios.size(); i++) { + ratiosArr[i] = ratios.get(i); + } + Color[] colorsArr = colors.toArray(new Color[colors.size()]); + + MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { + cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REFLECT; + } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REPEAT; + } + + Color endColor = gradientRecords[gradientRecords.length - 1].color.toColor(); + fillPathPaint = endColor; + fillPaint = new RadialGradientPaint(new java.awt.Point(0, 0), 16384, ratiosArr, colorsArr, cm); + matrix.translateX -= deltaX; + matrix.translateY -= deltaY; + fillTransform = matrix.toTransform(); + } + break; + case FILLSTYLE.FOCAL_RADIAL_GRADIENT: { + List colors = new ArrayList<>(); + List ratios = new ArrayList<>(); + for (int i = 0; i < gradientRecords.length; i++) { + if ((i > 0) && (gradientRecords[i - 1].ratio == gradientRecords[i].ratio)) { + continue; + } + ratios.add(gradientRecords[i].getRatioFloat()); + colors.add(gradientRecords[i].color.toColor()); + } + + float[] ratiosArr = new float[ratios.size()]; + for (int i = 0; i < ratios.size(); i++) { + ratiosArr[i] = ratios.get(i); + } + Color[] colorsArr = colors.toArray(new Color[colors.size()]); + + MultipleGradientPaint.CycleMethod cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + if (spreadMethod == GRADIENT.SPREAD_PAD_MODE) { + cm = MultipleGradientPaint.CycleMethod.NO_CYCLE; + } else if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REFLECT; + } else if (spreadMethod == GRADIENT.SPREAD_REPEAT_MODE) { + cm = MultipleGradientPaint.CycleMethod.REPEAT; + } + + Color endColor = gradientRecords[gradientRecords.length - 1].color.toColor(); + fillPathPaint = endColor; + fillPaint = new RadialGradientPaint(new java.awt.Point(0, 0), 16384, new java.awt.Point((int) (focalPointRatio * 16384), 0), ratiosArr, colorsArr, cm); + matrix.translateX -= deltaX; + matrix.translateY -= deltaY; + fillTransform = matrix.toTransform(); + } + break; + } + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + matrix.translateX /= unitDivisor; + matrix.translateY /= unitDivisor; + matrix.scaleX /= unitDivisor; + matrix.scaleY /= unitDivisor; + matrix.rotateSkew0 /= unitDivisor; + matrix.rotateSkew1 /= unitDivisor; + ImageTag image = null; + for (Tag t : swf.tags) { + if (t instanceof ImageTag) { + ImageTag i = (ImageTag) t; + if (i.getCharacterId() == bitmapId) { + image = i; + break; + } + } + } + if (image != null) { + SerializableImage img = image.getImage(); + if (img != null) { + img = colorTransform.apply(img); + fillPaint = new TexturePaint(img.getBufferedImage(), new java.awt.Rectangle(img.getWidth(), img.getHeight())); + matrix.translateX -= deltaX; + matrix.translateY -= deltaY; + fillTransform = matrix.toTransform(); + } + } + } + + @Override + public void endFill() { + finalizePath(); + fillPaint = null; + } + + @Override + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + thickness /= unitDivisor; + lineColor = color == null ? null : color.toColor(); + int capStyle = BasicStroke.CAP_ROUND; + switch (startCaps) { + case LINESTYLE2.NO_CAP: + capStyle = BasicStroke.CAP_BUTT; + break; + case LINESTYLE2.ROUND_CAP: + capStyle = BasicStroke.CAP_ROUND; + break; + case LINESTYLE2.SQUARE_CAP: + capStyle = BasicStroke.CAP_SQUARE; + break; + } + int joinStyle = BasicStroke.JOIN_ROUND; + switch (joints) { + case LINESTYLE2.BEVEL_JOIN: + joinStyle = BasicStroke.JOIN_BEVEL; + break; + case LINESTYLE2.MITER_JOIN: + joinStyle = BasicStroke.JOIN_MITER; + break; + case LINESTYLE2.ROUND_JOIN: + joinStyle = BasicStroke.JOIN_ROUND; + break; + } + if (joinStyle == BasicStroke.JOIN_MITER) { + lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle, miterLimit); + } else { + lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle); + } + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + } + + @Override + public void moveTo(double x, double y) { + path.moveTo(x / unitDivisor - deltaX, y / unitDivisor - deltaY); + } + + @Override + public void lineTo(double x, double y) { + path.lineTo(x / unitDivisor - deltaX, y / unitDivisor - deltaY); + } + + @Override + public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { + path.quadTo(controlX / unitDivisor - deltaX, controlY / unitDivisor - deltaY, + anchorX / unitDivisor - deltaX, anchorY / unitDivisor - deltaY); + } + + protected void finalizePath() { + if (path != null) { + if (fillPaint != null) { + graphics.setComposite(AlphaComposite.SrcOver); + if (fillPaint instanceof MultipleGradientPaint) { + AffineTransform oldAf = graphics.getTransform(); + if (fillPathPaint != null) { + graphics.setPaint(fillPathPaint); + } + graphics.fill(path); + graphics.setClip(path); + Matrix inverse = null; + try { + inverse = new Matrix(new AffineTransform(fillTransform).createInverse()); + } catch (NoninvertibleTransformException ex) { + } + + fillTransform.preConcatenate(oldAf); + graphics.setTransform(fillTransform); + graphics.setPaint(fillPaint); + + if (inverse != null) { + ExportRectangle rect = inverse.transform(new ExportRectangle(path.getBounds2D())); + double minX = rect.xMin; + double minY = rect.yMin; + graphics.fill(new java.awt.Rectangle((int) minX, (int) minY, (int) (rect.xMax - minX), (int) (rect.yMax - minY))); + } + + graphics.setTransform(oldAf); + graphics.setClip(null); + } else if (fillPaint instanceof TexturePaint) { + AffineTransform oldAf = graphics.getTransform(); + graphics.setClip(path); + Matrix inverse = null; + try { + inverse = new Matrix(new AffineTransform(fillTransform).createInverse()); + } catch (NoninvertibleTransformException ex) { + } + + fillTransform.preConcatenate(oldAf); + graphics.setTransform(fillTransform); + graphics.setPaint(fillPaint); + + if (inverse != null) { + ExportRectangle rect = inverse.transform(new ExportRectangle(path.getBounds2D())); + double minX = rect.xMin; + double minY = rect.yMin; + graphics.fill(new java.awt.Rectangle((int) minX, (int) minY, (int) (rect.xMax - minX), (int) (rect.yMax - minY))); + } + + graphics.setTransform(oldAf); + graphics.setClip(null); + } else { + graphics.setPaint(fillPaint); + graphics.fill(path); + } + } + if (lineColor != null) { + graphics.setColor(lineColor); + graphics.setStroke(lineStroke == null ? defaultStroke : lineStroke); + graphics.draw(path); + } + } + path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); //For correct intersections display + lineStroke = null; + lineColor = null; + fillPaint = null; + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java similarity index 94% rename from src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java index ebe866279..4131705bc 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CanvasShapeExporter.java @@ -1,513 +1,512 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.Point; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.tags.base.ImageTag; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.GRADIENT; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RECT; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.helpers.Helper; -import com.jpexs.helpers.SerializableImage; -import java.awt.Color; - -/** - * - * @author JPEXS - */ -public class CanvasShapeExporter extends ShapeExporterBase { - - protected static final String DRAW_COMMAND_M = "M"; - protected static final String DRAW_COMMAND_L = "L"; - protected static final String DRAW_COMMAND_Q = "Q"; - protected String currentDrawCommand = ""; - - protected String pathData = ""; - protected String shapeData = ""; - protected String html = ""; - protected String strokeData = ""; - protected String fillData = ""; - protected double deltaX = 0; - protected double deltaY = 0; - protected Matrix fillMatrix = null; - protected String lastRadColor = null; - protected SWF swf; - protected int repeatCnt = 0; - protected double unitDivisor; - protected RGB basicFill; - protected String lineFillData = null; - protected String lineLastRadColor = null; - protected Matrix lineFillMatrix = null; - protected int lineRepeatCnt = 0; - protected int fillWidth = 0; - protected int fillHeight = 0; - - public static String getJsPrefix() { - return "" - + "" - + "" - + "\r\n" - + "\r\n" - + "
\r\n" - + "Your browser does not support the HTML5 canvas tag.\r\n" - + "
 
 
" - //+ "
 
" - + "
\r\n" - + "\r\n"; - - } - - public static String getJsSuffix() { - return "\r\n"; - } - - public static String getHtmlSuffix() { - return "\r\n" - + ""; - } - - public static String getDrawJs(int width, int height, String data) { - return "var originalWidth=" + width + ";\r\nvar originalHeight=" + height + ";\r\n function drawFrame(){\r\n" - + "\tctx.save();\r\n\tctx.transform(canvas.width/originalWidth,0,0,canvas.height/originalHeight,0,0);\r\n" + data + "\tctx.restore();\r\n}\r\n\tdrawFrame();\r\n"; - } - - public String getHtml(String needed) { - RECT r = shape.getBounds(); - int width = (int) (r.getWidth() / unitDivisor); - int height = (int) (r.getHeight() / unitDivisor); - - return getHtmlPrefix(width, height) + getJsPrefix() + needed + getDrawJs(width, height, shapeData) + getJsSuffix() + getHtmlSuffix(); - } - - public String getShapeData() { - return shapeData; - } - - public CanvasShapeExporter(RGB basicFill, double unitDivisor, SWF swf, SHAPE shape, ColorTransform colorTransform, int deltaX, int deltaY) { - super(shape, colorTransform); - this.swf = swf; - this.unitDivisor = unitDivisor; - this.basicFill = basicFill; - this.deltaX = deltaX; - this.deltaY = deltaY; - } - - @Override - public void beginShape() { - shapeData = ""; - } - - @Override - public void endShape() { - } - - @Override - public void beginFills() { - } - - @Override - public void endFills() { - } - - @Override - public void beginLines() { - } - - @Override - public void endLines() { - finalizePath(); - } - - @Override - public void beginFill(RGB color) { - finalizePath(); - if (color == null) { - fillData += "\tctx.fillStyle=defaultFill;\r\n"; - } else { - fillData += "\tctx.fillStyle=" + color(color) + ";\r\n"; - } - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - finalizePath(); - - //TODO: How many repeats is ideal? - final int REPEAT_CNT = 5; - - repeatCnt = spreadMethod == GRADIENT.SPREAD_PAD_MODE ? 0 : REPEAT_CNT; - - if (type == FILLSTYLE.LINEAR_GRADIENT) { - Point start = matrix.transform(new Point(-16384 - 32768 * repeatCnt, 0)); - Point end = matrix.transform(new Point(16384 + 32768 * repeatCnt, 0)); - start.x += deltaX; - start.y += deltaY; - end.x += deltaX; - end.y += deltaY; - fillData += "\tvar grd=ctx.createLinearGradient(" + Double.toString(start.x / unitDivisor) + "," + Double.toString(start.y / unitDivisor) + "," + Double.toString(end.x / unitDivisor) + "," + Double.toString(end.y / unitDivisor) + ");\r\n"; - } else { - matrix.translateX /= unitDivisor; - matrix.translateY /= unitDivisor; - matrix.scaleX /= unitDivisor; - matrix.scaleY /= unitDivisor; - matrix.rotateSkew0 /= unitDivisor; - matrix.rotateSkew1 /= unitDivisor; - fillMatrix = matrix; - - matrix.translateX += deltaX / unitDivisor; - matrix.translateY += deltaY / unitDivisor; - - fillData += "\tvar grd=ctx.createRadialGradient(" + focalPointRatio * 16384 + ",0,0,0,0," + (16384 + 32768 * repeatCnt) + ");\r\n"; - } - int repeatTotal = repeatCnt * 2 + 1; - double oneHeight = 1.0 / repeatTotal; - double pos = 0; - boolean revert = false; - if (type != FILLSTYLE.LINEAR_GRADIENT && spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - revert = true; - } - for (int i = 0; i < repeatTotal; i++) { - if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - revert = !revert; - } - for (GRADRECORD r : gradientRecords) { - fillData += "\tgrd.addColorStop(" + Double.toString(pos + (oneHeight * (revert ? 255 - r.ratio : r.ratio) / 255.0)) + "," + color(r.color) + ");\r\n"; - lastRadColor = color(r.color); - } - pos += oneHeight; - } - fillData += "\tctx.fillStyle = grd;\r\n"; - } - - public static String color(Color color) { - return color(new RGBA(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha())); - } - - public static String color(RGB rgb) { - if ((rgb instanceof RGBA) && (((RGBA) rgb).alpha < 255)) { - RGBA rgba = (RGBA) rgb; - return "tocolor(ctrans.apply([" + rgba.red + "," + rgba.green + "," + rgba.blue + "," + rgba.getAlphaFloat() + "]))"; - } else { - return "tocolor(ctrans.apply([" + rgb.red + "," + rgb.green + "," + rgb.blue + ",1]))"; - } - - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - ImageTag image = null; - for (Tag t : swf.tags) { - if (t instanceof ImageTag) { - ImageTag i = (ImageTag) t; - if (i.getCharacterId() == bitmapId) { - image = i; - SerializableImage im = i.getImage(); - fillWidth = im.getWidth(); - fillHeight = im.getHeight(); - break; - } - } - } - if (image != null) { - SerializableImage img = image.getImage(); - if (img != null) { - colorTransform.apply(img); - if (matrix != null) { - matrix.translateX /= unitDivisor; - matrix.translateY /= unitDivisor; - matrix.scaleX /= unitDivisor; - matrix.scaleY /= unitDivisor; - matrix.rotateSkew0 /= unitDivisor; - matrix.rotateSkew1 /= unitDivisor; - matrix.translateX += deltaX / unitDivisor; - matrix.translateY += deltaY / unitDivisor; - fillMatrix = matrix; - } - - fillData += "\tvar fimg = ctrans.applyToImage(imageObj" + bitmapId + ");\r\n"; - fillData += "\tvar pat=ctx.createPattern(fimg,\"repeat\");\r\n"; - fillData += "\tctx.fillStyle = pat;\r\n"; - } - } - } - - @Override - public void endFill() { - finalizePath(); - } - - @Override - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - thickness /= unitDivisor; - - if (color != null) { //gradient lines have no color - strokeData += "\tctx.strokeStyle=" + color(color) + ";\r\n"; - } - strokeData += "\tctx.lineWidth=" + Double.toString(thickness == 0 ? 1 : thickness) + ";\r\n"; - switch (startCaps) { - case LINESTYLE2.NO_CAP: - strokeData += "\tctx.lineCap=\"butt\";\r\n"; - break; - case LINESTYLE2.SQUARE_CAP: - strokeData += "\tctx.lineCap=\"square\";\r\n"; - break; - default: - strokeData += "\tctx.lineCap=\"round\";\r\n"; - break; - } - switch (joints) { - case LINESTYLE2.BEVEL_JOIN: - strokeData += "\tctx.lineJoin=\"bevel\";\r\n"; - break; - case LINESTYLE2.ROUND_JOIN: - strokeData += "\tctx.lineJoin=\"round\";\r\n"; - break; - default: - strokeData += "\tctx.lineJoin=\"miter\";\r\n"; - strokeData += "\tctx.miterLimit=" + Integer.toString(miterLimit) + ";\r\n"; - break; - } - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - lineFillData = ""; - - //TODO: How many repeats is ideal? - final int REPEAT_CNT = 5; - - lineRepeatCnt = spreadMethod == GRADIENT.SPREAD_PAD_MODE ? 0 : REPEAT_CNT; - - if (type == FILLSTYLE.LINEAR_GRADIENT) { - Point start = matrix.transform(new Point(-16384 - 32768 * lineRepeatCnt, 0)); - Point end = matrix.transform(new Point(16384 + 32768 * lineRepeatCnt, 0)); - start.x += deltaX; - start.y += deltaY; - end.x += deltaX; - end.y += deltaY; - lineFillData += "\tvar grd=ctx.createLinearGradient(" + Double.toString(start.x / unitDivisor) + "," + Double.toString(start.y / unitDivisor) + "," + Double.toString(end.x / unitDivisor) + "," + Double.toString(end.y / unitDivisor) + ");\r\n"; - } else { - matrix.translateX /= unitDivisor; - matrix.translateY /= unitDivisor; - matrix.scaleX /= unitDivisor; - matrix.scaleY /= unitDivisor; - matrix.rotateSkew0 /= unitDivisor; - matrix.rotateSkew1 /= unitDivisor; - lineFillMatrix = matrix; - - matrix.translateX += deltaX / unitDivisor; - matrix.translateY += deltaY / unitDivisor; - - lineFillData += "\tvar grd=ctx.createRadialGradient(" + focalPointRatio * 16384 + ",0,0,0,0," + (16384 + 32768 * lineRepeatCnt) + ");\r\n"; - } - int repeatTotal = lineRepeatCnt * 2 + 1; - double oneHeight = 1.0 / repeatTotal; - double pos = 0; - boolean revert = false; - if (type != FILLSTYLE.LINEAR_GRADIENT && spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - revert = true; - } - for (int i = 0; i < repeatTotal; i++) { - if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { - revert = !revert; - } - for (GRADRECORD r : gradientRecords) { - lineFillData += "\tgrd.addColorStop(" + Double.toString(pos + (oneHeight * (revert ? 255 - r.ratio : r.ratio) / 255.0)) + "," + color(r.color) + ");\r\n"; - lineLastRadColor = color(r.color); - } - pos += oneHeight; - } - lineFillData += "\tctx.fillStyle = grd;\r\n"; - - String preStrokeData = ""; - - preStrokeData += "\tvar lcanvas = document.createElement(\"canvas\");\r\n"; - preStrokeData += "\tlcanvas.width = canvas.width;\r\n"; - preStrokeData += "\tlcanvas.height=canvas.height;\r\n"; - preStrokeData += "\tvar lctx = lcanvas.getContext(\"2d\");\r\n"; - preStrokeData += "\tenhanceContext(lctx);\r\n"; - preStrokeData += "\tlctx.applyTransforms(ctx._matrices);\r\n"; - preStrokeData += "\tctx = lctx;\r\n"; - strokeData = preStrokeData + strokeData; - } - - @Override - public void moveTo(double x, double y) { - currentDrawCommand = DRAW_COMMAND_M; - pathData += currentDrawCommand + " "; - x += deltaX; - y += deltaY; - pathData += Helper.doubleStr(x / unitDivisor) + " " - + Helper.doubleStr(y / unitDivisor) + " "; - } - - @Override - public void lineTo(double x, double y) { - if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { - currentDrawCommand = DRAW_COMMAND_L; - pathData += currentDrawCommand + " "; - } - x += deltaX; - y += deltaY; - pathData += Helper.doubleStr(x / unitDivisor) + " " - + Helper.doubleStr(y / unitDivisor) + " "; - } - - @Override - public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { - if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { - currentDrawCommand = DRAW_COMMAND_Q; - pathData += currentDrawCommand + " "; - } - controlX += deltaX; - anchorX += deltaX; - controlY += deltaY; - anchorY += deltaY; - pathData += Helper.doubleStr(controlX / unitDivisor) + " " - + Helper.doubleStr(controlY / unitDivisor) + " " - + Helper.doubleStr(anchorX / unitDivisor) + " " - + Helper.doubleStr(anchorY / unitDivisor) + " "; - } - - protected void finalizePath() { - if (!"".equals(pathData)) { - pathData = "\tdrawPath(ctx,\"" + pathData + "\");\r\n"; - - if (lineFillData != null) { - String preLineFillData = ""; - preLineFillData += "\tvar oldctx = ctx;\r\n"; - preLineFillData += "\tctx.save();\r\n"; - preLineFillData += strokeData; - preLineFillData += pathData; - preLineFillData += "\tctx.stroke();\r\n"; - preLineFillData += "\tvar lfcanvas = document.createElement(\"canvas\");\r\n"; - preLineFillData += "\tlfcanvas.width = canvas.width;\r\n"; - preLineFillData += "\tlfcanvas.height=canvas.height;\r\n"; - preLineFillData += "\tvar lfctx = lfcanvas.getContext(\"2d\");\r\n"; - preLineFillData += "\tenhanceContext(lfctx);\r\n"; - preLineFillData += "\tlfctx.applyTransforms(ctx._matrices);\r\n"; - preLineFillData += "\tctx = lfctx;"; - if (lineLastRadColor != null) { - preLineFillData += "\tctx.fillStyle=" + lineLastRadColor + ";\r\n\tctx.fill(\"evenodd\");\r\n"; - } - - preLineFillData += "\tctx.transform(" + Helper.doubleStr(lineFillMatrix.scaleX) + "," + Helper.doubleStr(lineFillMatrix.rotateSkew0) + "," + Helper.doubleStr(lineFillMatrix.rotateSkew1) + "," + Helper.doubleStr(lineFillMatrix.scaleY) + "," + Helper.doubleStr(lineFillMatrix.translateX) + "," + Helper.doubleStr(lineFillMatrix.translateY) + ");\r\n"; - lineFillData = preLineFillData + lineFillData; - lineFillData += "\tctx.fillRect(" + (-16384 - 32768 * lineRepeatCnt) + "," + (-16384 - 32768 * lineRepeatCnt) + "," + (2 * 16384 + 32768 * 2 * lineRepeatCnt) + "," + (2 * 16384 + 32768 * 2 * lineRepeatCnt) + ");\r\n"; - - lineFillData += "\tctx = oldctx;\r\n"; - - //lcanvas - stroke - //lfcanvas - stroke background - lineFillData += "\tvar limgd = lctx.getImageData(0, 0, lcanvas.width, lcanvas.height);\r\n" - + "\tvar lpix = limgd.data;\r\n" - + "\tvar lfimgd = lfctx.getImageData(0, 0, lfcanvas.width, lfcanvas.height);\r\n" - + "\tvar lfpix = lfimgd.data;\r\n" - + "\tvar imgd = ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n" - + "\tvar pix = imgd.data;\r\n" - + "\tfor (var i = 0; i < lpix.length; i += 4) {\r\n" - + "\t\tif(lpix[i+3]>0){ pix[i] = lfpix[i]; pix[i+1] = lfpix[i+1]; pix[i+2] = lfpix[i+2]; pix[i+3] = lfpix[i+3];}\r\n" - + "\t}\r\n" - + "\tctx.putImageData(imgd, 0, 0);\r\n"; - lineFillData += "\tctx.restore();\r\n"; - strokeData = ""; - } else { - pathData += strokeData; - } - if (fillMatrix != null) { - if (lastRadColor != null) { - pathData += "\tctx.fillStyle=" + lastRadColor + ";\r\n\tctx.fill(\"evenodd\");\r\n"; - } - pathData += "\tctx.save();\r\n"; - pathData += "\tctx.clip();\r\n"; - pathData += "\tctx.transform(" + Helper.doubleStr(fillMatrix.scaleX) + "," + Helper.doubleStr(fillMatrix.rotateSkew0) + "," + Helper.doubleStr(fillMatrix.rotateSkew1) + "," + Helper.doubleStr(fillMatrix.scaleY) + "," + Helper.doubleStr(fillMatrix.translateX) + "," + Helper.doubleStr(fillMatrix.translateY) + ");\r\n"; - if (fillWidth > 0) {//repeating bitmap glitch fix - //make bitmap 1px wider - double s_w = (fillWidth + 1) / (double) fillWidth; - double s_h = (fillHeight + 1) / (double) fillHeight; - - pathData += "\tctx.transform(" + (s_w) + ",0,0," + s_h + ",-0.5,-0.5);\r\n"; - } - pathData += fillData; - pathData += "\tctx.fillRect(" + (-16384 - 32768 * repeatCnt) + "," + (-16384 - 32768 * repeatCnt) + "," + (2 * 16384 + 32768 * 2 * repeatCnt) + "," + (2 * 16384 + 32768 * 2 * repeatCnt) + ");\r\n"; - pathData += "\tctx.restore();\r\n"; - shapeData += pathData; - } else { - if (!"".equals(fillData)) { - pathData += "\tctx.fill(\"evenodd\");\r\n"; - } - shapeData += fillData + pathData; - } - if (!"".equals(strokeData)) { - shapeData += "\tctx.stroke();\r\n"; - } else if (lineFillData != null) { - shapeData += lineFillData; - } - } - - repeatCnt = 0; - - pathData = ""; - fillData = ""; - strokeData = ""; - fillMatrix = null; - lastRadColor = null; - - lineRepeatCnt = 0; - lineFillData = null; - lineLastRadColor = null; - lineFillMatrix = null; - - fillWidth = 0; - fillHeight = 0; - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.Point; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.base.ImageTag; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.SerializableImage; +import java.awt.Color; + +/** + * + * @author JPEXS + */ +public class CanvasShapeExporter extends ShapeExporterBase { + + protected static final String DRAW_COMMAND_M = "M"; + protected static final String DRAW_COMMAND_L = "L"; + protected static final String DRAW_COMMAND_Q = "Q"; + protected String currentDrawCommand = ""; + + protected String pathData = ""; + protected String shapeData = ""; + protected String html = ""; + protected String strokeData = ""; + protected String fillData = ""; + protected double deltaX = 0; + protected double deltaY = 0; + protected Matrix fillMatrix = null; + protected String lastRadColor = null; + protected SWF swf; + protected int repeatCnt = 0; + protected double unitDivisor; + protected RGB basicFill; + protected String lineFillData = null; + protected String lineLastRadColor = null; + protected Matrix lineFillMatrix = null; + protected int lineRepeatCnt = 0; + protected int fillWidth = 0; + protected int fillHeight = 0; + + public static String getJsPrefix() { + return "" + + "" + + "" + + "\r\n" + + "\r\n" + + "
\r\n" + + "Your browser does not support the HTML5 canvas tag.\r\n" + + "
 
 
" + //+ "
 
" + + "
\r\n" + + "\r\n"; + + } + + public static String getJsSuffix() { + return "\r\n"; + } + + public static String getHtmlSuffix() { + return "\r\n" + + ""; + } + + public static String getDrawJs(int width, int height, String data) { + return "var originalWidth=" + width + ";\r\nvar originalHeight=" + height + ";\r\n function drawFrame(){\r\n" + + "\tctx.save();\r\n\tctx.transform(canvas.width/originalWidth,0,0,canvas.height/originalHeight,0,0);\r\n" + data + "\tctx.restore();\r\n}\r\n\tdrawFrame();\r\n"; + } + + public String getHtml(String needed) { + RECT r = shape.getBounds(); + int width = (int) (r.getWidth() / unitDivisor); + int height = (int) (r.getHeight() / unitDivisor); + + return getHtmlPrefix(width, height) + getJsPrefix() + needed + getDrawJs(width, height, shapeData) + getJsSuffix() + getHtmlSuffix(); + } + + public String getShapeData() { + return shapeData; + } + + public CanvasShapeExporter(RGB basicFill, double unitDivisor, SWF swf, SHAPE shape, ColorTransform colorTransform, int deltaX, int deltaY) { + super(shape, colorTransform); + this.swf = swf; + this.unitDivisor = unitDivisor; + this.basicFill = basicFill; + this.deltaX = deltaX; + this.deltaY = deltaY; + } + + @Override + public void beginShape() { + shapeData = ""; + } + + @Override + public void endShape() { + } + + @Override + public void beginFills() { + } + + @Override + public void endFills() { + } + + @Override + public void beginLines() { + } + + @Override + public void endLines() { + finalizePath(); + } + + @Override + public void beginFill(RGB color) { + finalizePath(); + if (color == null) { + fillData += "\tctx.fillStyle=defaultFill;\r\n"; + } else { + fillData += "\tctx.fillStyle=" + color(color) + ";\r\n"; + } + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + finalizePath(); + + //TODO: How many repeats is ideal? + final int REPEAT_CNT = 5; + + repeatCnt = spreadMethod == GRADIENT.SPREAD_PAD_MODE ? 0 : REPEAT_CNT; + + if (type == FILLSTYLE.LINEAR_GRADIENT) { + Point start = matrix.transform(new Point(-16384 - 32768 * repeatCnt, 0)); + Point end = matrix.transform(new Point(16384 + 32768 * repeatCnt, 0)); + start.x += deltaX; + start.y += deltaY; + end.x += deltaX; + end.y += deltaY; + fillData += "\tvar grd=ctx.createLinearGradient(" + Double.toString(start.x / unitDivisor) + "," + Double.toString(start.y / unitDivisor) + "," + Double.toString(end.x / unitDivisor) + "," + Double.toString(end.y / unitDivisor) + ");\r\n"; + } else { + matrix.translateX /= unitDivisor; + matrix.translateY /= unitDivisor; + matrix.scaleX /= unitDivisor; + matrix.scaleY /= unitDivisor; + matrix.rotateSkew0 /= unitDivisor; + matrix.rotateSkew1 /= unitDivisor; + fillMatrix = matrix; + + matrix.translateX += deltaX / unitDivisor; + matrix.translateY += deltaY / unitDivisor; + + fillData += "\tvar grd=ctx.createRadialGradient(" + focalPointRatio * 16384 + ",0,0,0,0," + (16384 + 32768 * repeatCnt) + ");\r\n"; + } + int repeatTotal = repeatCnt * 2 + 1; + double oneHeight = 1.0 / repeatTotal; + double pos = 0; + boolean revert = false; + if (type != FILLSTYLE.LINEAR_GRADIENT && spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + revert = true; + } + for (int i = 0; i < repeatTotal; i++) { + if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + revert = !revert; + } + for (GRADRECORD r : gradientRecords) { + fillData += "\tgrd.addColorStop(" + Double.toString(pos + (oneHeight * (revert ? 255 - r.ratio : r.ratio) / 255.0)) + "," + color(r.color) + ");\r\n"; + lastRadColor = color(r.color); + } + pos += oneHeight; + } + fillData += "\tctx.fillStyle = grd;\r\n"; + } + + public static String color(Color color) { + return color(new RGBA(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha())); + } + + public static String color(RGB rgb) { + if ((rgb instanceof RGBA) && (((RGBA) rgb).alpha < 255)) { + RGBA rgba = (RGBA) rgb; + return "tocolor(ctrans.apply([" + rgba.red + "," + rgba.green + "," + rgba.blue + "," + rgba.getAlphaFloat() + "]))"; + } else { + return "tocolor(ctrans.apply([" + rgb.red + "," + rgb.green + "," + rgb.blue + ",1]))"; + } + + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + ImageTag image = null; + for (Tag t : swf.tags) { + if (t instanceof ImageTag) { + ImageTag i = (ImageTag) t; + if (i.getCharacterId() == bitmapId) { + image = i; + SerializableImage im = i.getImage(); + fillWidth = im.getWidth(); + fillHeight = im.getHeight(); + break; + } + } + } + if (image != null) { + SerializableImage img = image.getImage(); + if (img != null) { + colorTransform.apply(img); + if (matrix != null) { + matrix.translateX /= unitDivisor; + matrix.translateY /= unitDivisor; + matrix.scaleX /= unitDivisor; + matrix.scaleY /= unitDivisor; + matrix.rotateSkew0 /= unitDivisor; + matrix.rotateSkew1 /= unitDivisor; + matrix.translateX += deltaX / unitDivisor; + matrix.translateY += deltaY / unitDivisor; + fillMatrix = matrix; + } + + fillData += "\tvar fimg = ctrans.applyToImage(imageObj" + bitmapId + ");\r\n"; + fillData += "\tvar pat=ctx.createPattern(fimg,\"repeat\");\r\n"; + fillData += "\tctx.fillStyle = pat;\r\n"; + } + } + } + + @Override + public void endFill() { + finalizePath(); + } + + @Override + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + thickness /= unitDivisor; + + if (color != null) { //gradient lines have no color + strokeData += "\tctx.strokeStyle=" + color(color) + ";\r\n"; + } + strokeData += "\tctx.lineWidth=" + Double.toString(thickness == 0 ? 1 : thickness) + ";\r\n"; + switch (startCaps) { + case LINESTYLE2.NO_CAP: + strokeData += "\tctx.lineCap=\"butt\";\r\n"; + break; + case LINESTYLE2.SQUARE_CAP: + strokeData += "\tctx.lineCap=\"square\";\r\n"; + break; + default: + strokeData += "\tctx.lineCap=\"round\";\r\n"; + break; + } + switch (joints) { + case LINESTYLE2.BEVEL_JOIN: + strokeData += "\tctx.lineJoin=\"bevel\";\r\n"; + break; + case LINESTYLE2.ROUND_JOIN: + strokeData += "\tctx.lineJoin=\"round\";\r\n"; + break; + default: + strokeData += "\tctx.lineJoin=\"miter\";\r\n"; + strokeData += "\tctx.miterLimit=" + Integer.toString(miterLimit) + ";\r\n"; + break; + } + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + lineFillData = ""; + + //TODO: How many repeats is ideal? + final int REPEAT_CNT = 5; + + lineRepeatCnt = spreadMethod == GRADIENT.SPREAD_PAD_MODE ? 0 : REPEAT_CNT; + + if (type == FILLSTYLE.LINEAR_GRADIENT) { + Point start = matrix.transform(new Point(-16384 - 32768 * lineRepeatCnt, 0)); + Point end = matrix.transform(new Point(16384 + 32768 * lineRepeatCnt, 0)); + start.x += deltaX; + start.y += deltaY; + end.x += deltaX; + end.y += deltaY; + lineFillData += "\tvar grd=ctx.createLinearGradient(" + Double.toString(start.x / unitDivisor) + "," + Double.toString(start.y / unitDivisor) + "," + Double.toString(end.x / unitDivisor) + "," + Double.toString(end.y / unitDivisor) + ");\r\n"; + } else { + matrix.translateX /= unitDivisor; + matrix.translateY /= unitDivisor; + matrix.scaleX /= unitDivisor; + matrix.scaleY /= unitDivisor; + matrix.rotateSkew0 /= unitDivisor; + matrix.rotateSkew1 /= unitDivisor; + lineFillMatrix = matrix; + + matrix.translateX += deltaX / unitDivisor; + matrix.translateY += deltaY / unitDivisor; + + lineFillData += "\tvar grd=ctx.createRadialGradient(" + focalPointRatio * 16384 + ",0,0,0,0," + (16384 + 32768 * lineRepeatCnt) + ");\r\n"; + } + int repeatTotal = lineRepeatCnt * 2 + 1; + double oneHeight = 1.0 / repeatTotal; + double pos = 0; + boolean revert = false; + if (type != FILLSTYLE.LINEAR_GRADIENT && spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + revert = true; + } + for (int i = 0; i < repeatTotal; i++) { + if (spreadMethod == GRADIENT.SPREAD_REFLECT_MODE) { + revert = !revert; + } + for (GRADRECORD r : gradientRecords) { + lineFillData += "\tgrd.addColorStop(" + Double.toString(pos + (oneHeight * (revert ? 255 - r.ratio : r.ratio) / 255.0)) + "," + color(r.color) + ");\r\n"; + lineLastRadColor = color(r.color); + } + pos += oneHeight; + } + lineFillData += "\tctx.fillStyle = grd;\r\n"; + + String preStrokeData = ""; + + preStrokeData += "\tvar lcanvas = document.createElement(\"canvas\");\r\n"; + preStrokeData += "\tlcanvas.width = canvas.width;\r\n"; + preStrokeData += "\tlcanvas.height=canvas.height;\r\n"; + preStrokeData += "\tvar lctx = lcanvas.getContext(\"2d\");\r\n"; + preStrokeData += "\tenhanceContext(lctx);\r\n"; + preStrokeData += "\tlctx.applyTransforms(ctx._matrices);\r\n"; + preStrokeData += "\tctx = lctx;\r\n"; + strokeData = preStrokeData + strokeData; + } + + @Override + public void moveTo(double x, double y) { + currentDrawCommand = DRAW_COMMAND_M; + pathData += currentDrawCommand + " "; + x += deltaX; + y += deltaY; + pathData += Helper.doubleStr(x / unitDivisor) + " " + + Helper.doubleStr(y / unitDivisor) + " "; + } + + @Override + public void lineTo(double x, double y) { + if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { + currentDrawCommand = DRAW_COMMAND_L; + pathData += currentDrawCommand + " "; + } + x += deltaX; + y += deltaY; + pathData += Helper.doubleStr(x / unitDivisor) + " " + + Helper.doubleStr(y / unitDivisor) + " "; + } + + @Override + public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { + if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { + currentDrawCommand = DRAW_COMMAND_Q; + pathData += currentDrawCommand + " "; + } + controlX += deltaX; + anchorX += deltaX; + controlY += deltaY; + anchorY += deltaY; + pathData += Helper.doubleStr(controlX / unitDivisor) + " " + + Helper.doubleStr(controlY / unitDivisor) + " " + + Helper.doubleStr(anchorX / unitDivisor) + " " + + Helper.doubleStr(anchorY / unitDivisor) + " "; + } + + protected void finalizePath() { + if (!"".equals(pathData)) { + pathData = "\tdrawPath(ctx,\"" + pathData + "\");\r\n"; + + if (lineFillData != null) { + String preLineFillData = ""; + preLineFillData += "\tvar oldctx = ctx;\r\n"; + preLineFillData += "\tctx.save();\r\n"; + preLineFillData += strokeData; + preLineFillData += pathData; + preLineFillData += "\tctx.stroke();\r\n"; + preLineFillData += "\tvar lfcanvas = document.createElement(\"canvas\");\r\n"; + preLineFillData += "\tlfcanvas.width = canvas.width;\r\n"; + preLineFillData += "\tlfcanvas.height=canvas.height;\r\n"; + preLineFillData += "\tvar lfctx = lfcanvas.getContext(\"2d\");\r\n"; + preLineFillData += "\tenhanceContext(lfctx);\r\n"; + preLineFillData += "\tlfctx.applyTransforms(ctx._matrices);\r\n"; + preLineFillData += "\tctx = lfctx;"; + if (lineLastRadColor != null) { + preLineFillData += "\tctx.fillStyle=" + lineLastRadColor + ";\r\n\tctx.fill(\"evenodd\");\r\n"; + } + + preLineFillData += "\tctx.transform(" + Helper.doubleStr(lineFillMatrix.scaleX) + "," + Helper.doubleStr(lineFillMatrix.rotateSkew0) + "," + Helper.doubleStr(lineFillMatrix.rotateSkew1) + "," + Helper.doubleStr(lineFillMatrix.scaleY) + "," + Helper.doubleStr(lineFillMatrix.translateX) + "," + Helper.doubleStr(lineFillMatrix.translateY) + ");\r\n"; + lineFillData = preLineFillData + lineFillData; + lineFillData += "\tctx.fillRect(" + (-16384 - 32768 * lineRepeatCnt) + "," + (-16384 - 32768 * lineRepeatCnt) + "," + (2 * 16384 + 32768 * 2 * lineRepeatCnt) + "," + (2 * 16384 + 32768 * 2 * lineRepeatCnt) + ");\r\n"; + + lineFillData += "\tctx = oldctx;\r\n"; + + //lcanvas - stroke + //lfcanvas - stroke background + lineFillData += "\tvar limgd = lctx.getImageData(0, 0, lcanvas.width, lcanvas.height);\r\n" + + "\tvar lpix = limgd.data;\r\n" + + "\tvar lfimgd = lfctx.getImageData(0, 0, lfcanvas.width, lfcanvas.height);\r\n" + + "\tvar lfpix = lfimgd.data;\r\n" + + "\tvar imgd = ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n" + + "\tvar pix = imgd.data;\r\n" + + "\tfor (var i = 0; i < lpix.length; i += 4) {\r\n" + + "\t\tif(lpix[i+3]>0){ pix[i] = lfpix[i]; pix[i+1] = lfpix[i+1]; pix[i+2] = lfpix[i+2]; pix[i+3] = lfpix[i+3];}\r\n" + + "\t}\r\n" + + "\tctx.putImageData(imgd, 0, 0);\r\n"; + lineFillData += "\tctx.restore();\r\n"; + strokeData = ""; + } else { + pathData += strokeData; + } + if (fillMatrix != null) { + if (lastRadColor != null) { + pathData += "\tctx.fillStyle=" + lastRadColor + ";\r\n\tctx.fill(\"evenodd\");\r\n"; + } + pathData += "\tctx.save();\r\n"; + pathData += "\tctx.clip();\r\n"; + pathData += "\tctx.transform(" + Helper.doubleStr(fillMatrix.scaleX) + "," + Helper.doubleStr(fillMatrix.rotateSkew0) + "," + Helper.doubleStr(fillMatrix.rotateSkew1) + "," + Helper.doubleStr(fillMatrix.scaleY) + "," + Helper.doubleStr(fillMatrix.translateX) + "," + Helper.doubleStr(fillMatrix.translateY) + ");\r\n"; + if (fillWidth > 0) {//repeating bitmap glitch fix + //make bitmap 1px wider + double s_w = (fillWidth + 1) / (double) fillWidth; + double s_h = (fillHeight + 1) / (double) fillHeight; + + pathData += "\tctx.transform(" + (s_w) + ",0,0," + s_h + ",-0.5,-0.5);\r\n"; + } + pathData += fillData; + pathData += "\tctx.fillRect(" + (-16384 - 32768 * repeatCnt) + "," + (-16384 - 32768 * repeatCnt) + "," + (2 * 16384 + 32768 * 2 * repeatCnt) + "," + (2 * 16384 + 32768 * 2 * repeatCnt) + ");\r\n"; + pathData += "\tctx.restore();\r\n"; + shapeData += pathData; + } else { + if (!"".equals(fillData)) { + pathData += "\tctx.fill(\"evenodd\");\r\n"; + } + shapeData += fillData + pathData; + } + if (!"".equals(strokeData)) { + shapeData += "\tctx.stroke();\r\n"; + } else if (lineFillData != null) { + shapeData += lineFillData; + } + } + + repeatCnt = 0; + + pathData = ""; + fillData = ""; + strokeData = ""; + fillMatrix = null; + lastRadColor = null; + + lineRepeatCnt = 0; + lineFillData = null; + lineLastRadColor = null; + lineFillMatrix = null; + + fillWidth = 0; + fillHeight = 0; + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java new file mode 100644 index 000000000..9e17aba96 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public class CurvedEdge extends StraightEdge implements IEdge { + + private final PointInt control; + + CurvedEdge(PointInt from, PointInt control, PointInt to, int lineStyleIdx, int fillStyleIdx) { + super(from, to, lineStyleIdx, fillStyleIdx); + this.control = control; + } + + public PointInt getControl() { + return control; + } + + @Override + public IEdge reverseWithNewFillStyle(int newFillStyleIdx) { + return new CurvedEdge(to, control, from, lineStyleIdx, newFillStyleIdx); + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java similarity index 80% rename from src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java index b9c477633..b5e007ca4 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/DefaultSVGShapeExporter.java @@ -1,134 +1,133 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public abstract class DefaultSVGShapeExporter extends ShapeExporterBase { - - protected static final String DRAW_COMMAND_L = "L"; - protected static final String DRAW_COMMAND_Q = "Q"; - - protected String currentDrawCommand = ""; - protected String pathData; - - public DefaultSVGShapeExporter(SHAPE shape, ColorTransform colorTransform) { - super(shape, colorTransform); - } - - @Override - public void beginShape() { - } - - @Override - public void endShape() { - } - - @Override - public void beginFills() { - } - - @Override - public void endFills() { - } - - @Override - public void beginLines() { - } - - @Override - public void endLines() { - finalizePath(); - } - - @Override - public void beginFill(RGB color) { - finalizePath(); - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - finalizePath(); - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - } - - @Override - public void endFill() { - finalizePath(); - } - - @Override - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - } - - @Override - public void moveTo(double x, double y) { - currentDrawCommand = ""; - pathData += "M" - + roundPixels20(x / SWF.unitDivisor) + " " - + roundPixels20(y / SWF.unitDivisor) + " "; - } - - @Override - public void lineTo(double x, double y) { - if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { - currentDrawCommand = DRAW_COMMAND_L; - pathData += "L"; - } - pathData += roundPixels20(x / SWF.unitDivisor) + " " - + roundPixels20(y / SWF.unitDivisor) + " "; - } - - @Override - public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { - if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { - currentDrawCommand = DRAW_COMMAND_Q; - pathData += "Q"; - } - pathData += roundPixels20(controlX / SWF.unitDivisor) + " " - + roundPixels20(controlY / SWF.unitDivisor) + " " - + roundPixels20(anchorX / SWF.unitDivisor) + " " - + roundPixels20(anchorY / SWF.unitDivisor) + " "; - } - - protected void finalizePath() { - pathData = ""; - currentDrawCommand = ""; - } - - protected double roundPixels20(double pixels) { - return Math.round(pixels * 100) / 100.0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public abstract class DefaultSVGShapeExporter extends ShapeExporterBase { + + protected static final String DRAW_COMMAND_L = "L"; + protected static final String DRAW_COMMAND_Q = "Q"; + + protected String currentDrawCommand = ""; + protected String pathData; + + public DefaultSVGShapeExporter(SHAPE shape, ColorTransform colorTransform) { + super(shape, colorTransform); + } + + @Override + public void beginShape() { + } + + @Override + public void endShape() { + } + + @Override + public void beginFills() { + } + + @Override + public void endFills() { + } + + @Override + public void beginLines() { + } + + @Override + public void endLines() { + finalizePath(); + } + + @Override + public void beginFill(RGB color) { + finalizePath(); + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + finalizePath(); + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + } + + @Override + public void endFill() { + finalizePath(); + } + + @Override + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + } + + @Override + public void moveTo(double x, double y) { + currentDrawCommand = ""; + pathData += "M" + + roundPixels20(x / SWF.unitDivisor) + " " + + roundPixels20(y / SWF.unitDivisor) + " "; + } + + @Override + public void lineTo(double x, double y) { + if (!currentDrawCommand.equals(DRAW_COMMAND_L)) { + currentDrawCommand = DRAW_COMMAND_L; + pathData += "L"; + } + pathData += roundPixels20(x / SWF.unitDivisor) + " " + + roundPixels20(y / SWF.unitDivisor) + " "; + } + + @Override + public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { + if (!currentDrawCommand.equals(DRAW_COMMAND_Q)) { + currentDrawCommand = DRAW_COMMAND_Q; + pathData += "Q"; + } + pathData += roundPixels20(controlX / SWF.unitDivisor) + " " + + roundPixels20(controlY / SWF.unitDivisor) + " " + + roundPixels20(anchorX / SWF.unitDivisor) + " " + + roundPixels20(anchorY / SWF.unitDivisor) + " "; + } + + protected void finalizePath() { + pathData = ""; + currentDrawCommand = ""; + } + + protected double roundPixels20(double pixels) { + return Math.round(pixels * 100) / 100.0; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java new file mode 100644 index 000000000..6768f6b4f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public interface IEdge { + + public PointInt getFrom(); + + public PointInt getTo(); + + public int getLineStyleIdx(); + + public int getFillStyleIdx(); + + public IEdge reverseWithNewFillStyle(int newFillStyleIdx); +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java similarity index 64% rename from src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java index 47c8eab42..e6bcbb9f1 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/IShapeExporter.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.RGB; - -/** - * - * @author JPEXS - */ -public interface IShapeExporter { - - public void beginShape(); - - public void endShape(); - - public void beginFills(); - - public void endFills(); - - public void beginLines(); - - public void endLines(); - - public void beginFill(RGB color); - - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio); - - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform); - - public void endFill(); - - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit); - - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio); - - public void moveTo(double x, double y); - - public void lineTo(double x, double y); - - public void curveTo(double controlX, double controlY, double anchorX, double anchorY); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.RGB; + +/** + * + * @author JPEXS + */ +public interface IShapeExporter { + + public void beginShape(); + + public void endShape(); + + public void beginFills(); + + public void endFills(); + + public void beginLines(); + + public void endLines(); + + public void beginFill(RGB color); + + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio); + + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform); + + public void endFill(); + + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit); + + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio); + + public void moveTo(double x, double y); + + public void lineTo(double x, double y); + + public void curveTo(double controlX, double controlY, double anchorX, double anchorY); +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java similarity index 78% rename from src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java index 8052b9e3e..93d50de11 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/PathExporter.java @@ -1,135 +1,134 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; -import java.awt.geom.GeneralPath; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class PathExporter extends ShapeExporterBase { - - private final List paths = new ArrayList<>(); - private GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); - - private final double unitDivisor = 1; - - public static List export(SHAPE shape) { - PathExporter exporter = new PathExporter(shape, new ColorTransform()); - exporter.export(); - return exporter.paths; - } - - protected PathExporter(SHAPE shape, ColorTransform colorTransform) { - super(shape, colorTransform); - } - - @Override - public void export() { - super.export(); - } - - @Override - public void beginShape() { - - } - - @Override - public void endShape() { - - } - - @Override - public void beginFills() { - - } - - @Override - public void endFills() { - - } - - @Override - public void beginLines() { - - } - - @Override - public void endLines() { - finalizePath(); - } - - @Override - public void beginFill(RGB color) { - finalizePath(); - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - finalizePath(); - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - } - - @Override - public void endFill() { - finalizePath(); - } - - @Override - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - - } - - @Override - public void moveTo(double x, double y) { - path.moveTo(x / unitDivisor, y / unitDivisor); - } - - @Override - public void lineTo(double x, double y) { - path.lineTo(x / unitDivisor, y / unitDivisor); - } - - @Override - public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { - path.quadTo(controlX / unitDivisor, controlY / unitDivisor, - anchorX / unitDivisor, anchorY / unitDivisor); - } - - protected void finalizePath() { - paths.add(path); - path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); //For correct intersections display - - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; +import java.awt.geom.GeneralPath; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class PathExporter extends ShapeExporterBase { + + private final List paths = new ArrayList<>(); + private GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); + + private final double unitDivisor = 1; + + public static List export(SHAPE shape) { + PathExporter exporter = new PathExporter(shape, new ColorTransform()); + exporter.export(); + return exporter.paths; + } + + protected PathExporter(SHAPE shape, ColorTransform colorTransform) { + super(shape, colorTransform); + } + + @Override + public void export() { + super.export(); + } + + @Override + public void beginShape() { + + } + + @Override + public void endShape() { + + } + + @Override + public void beginFills() { + + } + + @Override + public void endFills() { + + } + + @Override + public void beginLines() { + + } + + @Override + public void endLines() { + finalizePath(); + } + + @Override + public void beginFill(RGB color) { + finalizePath(); + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + finalizePath(); + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + } + + @Override + public void endFill() { + finalizePath(); + } + + @Override + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + + } + + @Override + public void moveTo(double x, double y) { + path.moveTo(x / unitDivisor, y / unitDivisor); + } + + @Override + public void lineTo(double x, double y) { + path.lineTo(x / unitDivisor, y / unitDivisor); + } + + @Override + public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { + path.quadTo(controlX / unitDivisor, controlY / unitDivisor, + anchorX / unitDivisor, anchorY / unitDivisor); + } + + protected void finalizePath() { + paths.add(path); + path = new GeneralPath(GeneralPath.WIND_EVEN_ODD); //For correct intersections display + + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java similarity index 91% rename from src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java index 9c56fbc0a..7c5b2aaee 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/SVGShapeExporter.java @@ -1,276 +1,275 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.tags.base.ImageTag; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.GRADIENT; -import com.jpexs.decompiler.flash.types.GRADRECORD; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.helpers.Helper; -import com.jpexs.helpers.SerializableImage; -import java.awt.Color; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Locale; -import javax.imageio.ImageIO; -import javax.xml.bind.DatatypeConverter; -import org.w3c.dom.Element; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public class SVGShapeExporter extends DefaultSVGShapeExporter { - - protected Element path; - protected int lastPatternId; - private final Color defaultColor; - private final SWF swf; - private final SVGExporter exporter; - - public SVGShapeExporter(SWF swf, SHAPE shape, SVGExporter exporter, Color defaultColor, ColorTransform colorTransform) { - super(shape, colorTransform); - this.swf = swf; - this.defaultColor = defaultColor; - this.exporter = exporter; - } - - @Override - public void beginFill(RGB color) { - if (color == null && defaultColor != null) { - color = new RGB(defaultColor); - } - finalizePath(); - path.setAttribute("stroke", "none"); - if (color != null) { - path.setAttribute("fill", color.toHexRGB()); - } - path.setAttribute("fill-rule", "evenodd"); - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - path.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); - } - } - } - - @Override - public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - finalizePath(); - Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) - ? exporter.createElement("linearGradient") - : exporter.createElement("radialGradient"); - populateGradientElement(gradient, type, gradientRecords, matrix, spreadMethod, interpolationMethod, focalPointRatio); - int id = exporter.gradients.indexOf(gradient); - if (id < 0) { - // todo: filter same gradients - id = exporter.gradients.size(); - exporter.gradients.add(gradient); - } - String gradientId = "gradient" + id; - gradient.setAttribute("id", gradientId); - path.setAttribute("stroke", "none"); - path.setAttribute("fill", "url(#" + gradientId + ")"); - path.setAttribute("fill-rule", "evenodd"); - exporter.addToDefs(gradient); - } - - @Override - public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { - finalizePath(); - ImageTag image = null; - for (Tag t : swf.tags) { - if (t instanceof ImageTag) { - ImageTag i = (ImageTag) t; - if (i.getCharacterId() == bitmapId) { - image = i; - break; - } - } - } - if (image != null) { - SerializableImage img = image.getImage(); - if (img != null) { - colorTransform.apply(img); - int width = img.getWidth(); - int height = img.getHeight(); - lastPatternId++; - String patternId = "PatternID_"; - patternId += lastPatternId; - String format = image.getImageFormat(); - InputStream imageStream = image.getImageData(); - byte[] imageData; - if (imageStream != null) { - imageData = Helper.readStream(image.getImageData()); - } else { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try { - ImageIO.write(img.getBufferedImage(), format.toUpperCase(Locale.ENGLISH), baos); - } catch (IOException ex) { - } - imageData = baos.toByteArray(); - } - String base64ImgData = DatatypeConverter.printBase64Binary(imageData); - path.setAttribute("style", "fill:url(#" + patternId + ")"); - Element pattern = exporter.createElement("pattern"); - pattern.setAttribute("id", patternId); - pattern.setAttribute("patternUnits", "userSpaceOnUse"); - pattern.setAttribute("overflow", "visible"); - pattern.setAttribute("width", "" + width); - pattern.setAttribute("height", "" + height); - pattern.setAttribute("viewBox", "0 0 " + width + " " + height); - if (matrix != null) { - pattern.setAttribute("patternTransform", matrix.getTransformationString(SWF.unitDivisor, SWF.unitDivisor)); - } - Element imageElement = exporter.createElement("image"); - imageElement.setAttribute("width", "" + width); - imageElement.setAttribute("height", "" + height); - imageElement.setAttribute("xlink:href", "data:image/" + format + ";base64," + base64ImgData); - pattern.appendChild(imageElement); - exporter.addToGroup(pattern); - } - } - } - - @Override - public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { - finalizePath(); - thickness /= SWF.unitDivisor; - path.setAttribute("fill", "none"); - path.setAttribute("stroke", color.toHexRGB()); - path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness)); - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - path.setAttribute("stroke-opacity", Float.toString(colorA.getAlphaFloat())); - } - } - switch (startCaps) { - case LINESTYLE2.NO_CAP: - path.setAttribute("stroke-linecap", "butt"); - break; - case LINESTYLE2.SQUARE_CAP: - path.setAttribute("stroke-linecap", "square"); - break; - default: - path.setAttribute("stroke-linecap", "round"); - break; - } - switch (joints) { - case LINESTYLE2.BEVEL_JOIN: - path.setAttribute("stroke-linejoin", "bevel"); - break; - case LINESTYLE2.ROUND_JOIN: - path.setAttribute("stroke-linejoin", "round"); - break; - default: - path.setAttribute("stroke-linejoin", "miter"); - if (miterLimit >= 1 && miterLimit != 4) { - path.setAttribute("stroke-miterlimit", Integer.toString(miterLimit)); - } - break; - } - } - - @Override - public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - path.removeAttribute("stroke-opacity"); - Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) - ? exporter.createElement("linearGradient") - : exporter.createElement("radialGradient"); - populateGradientElement(gradient, type, gradientRecords, matrix, spreadMethod, interpolationMethod, focalPointRatio); - int id = exporter.gradients.indexOf(gradient); - if (id < 0) { - // todo: filter same gradients - id = exporter.gradients.size(); - exporter.gradients.add(gradient); - } - gradient.setAttribute("id", "gradient" + id); - path.setAttribute("stroke", "url(#gradient" + id + ")"); - path.setAttribute("fill", "none"); - exporter.addToDefs(gradient); - } - - @Override - protected void finalizePath() { - if (path != null && !"".equals(pathData)) { - path.setAttribute("d", pathData.trim()); - exporter.addToGroup(path); - } - path = exporter.createElement("path"); - super.finalizePath(); - } - - protected void populateGradientElement(Element gradient, int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { - gradient.setAttribute("gradientUnits", "userSpaceOnUse"); - if (type == FILLSTYLE.LINEAR_GRADIENT) { - gradient.setAttribute("x1", "-819.2"); - gradient.setAttribute("x2", "819.2"); - } else { - gradient.setAttribute("r", "819.2"); - gradient.setAttribute("cx", "0"); - gradient.setAttribute("cy", "0"); - if (focalPointRatio != 0) { - gradient.setAttribute("fx", Double.toString(819.2 * focalPointRatio)); - gradient.setAttribute("fy", "0"); - } - } - switch (spreadMethod) { - case GRADIENT.SPREAD_PAD_MODE: - gradient.setAttribute("spreadMethod", "pad"); - break; - case GRADIENT.SPREAD_REFLECT_MODE: - gradient.setAttribute("spreadMethod", "reflect"); - break; - case GRADIENT.SPREAD_REPEAT_MODE: - gradient.setAttribute("spreadMethod", "repeat"); - break; - } - if (interpolationMethod == GRADIENT.INTERPOLATION_LINEAR_RGB_MODE) { - gradient.setAttribute("color-interpolation", "linearRGB"); - } - if (matrix != null) { - gradient.setAttribute("gradientTransform", matrix.getTransformationString(SWF.unitDivisor, 1)); - } - for (int i = 0; i < gradientRecords.length; i++) { - GRADRECORD record = gradientRecords[i]; - Element gradientEntry = exporter.createElement("stop"); - gradientEntry.setAttribute("offset", Double.toString(record.ratio / 255.0)); - RGB color = record.color; - //if(colors.get(i) != 0) { - gradientEntry.setAttribute("stop-color", color.toHexRGB()); - //} - if (color instanceof RGBA) { - RGBA colorA = (RGBA) color; - if (colorA.alpha != 255) { - gradientEntry.setAttribute("stop-opacity", Float.toString(colorA.getAlphaFloat())); - } - } - gradient.appendChild(gradientEntry); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.base.ImageTag; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.SerializableImage; +import java.awt.Color; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Locale; +import javax.imageio.ImageIO; +import javax.xml.bind.DatatypeConverter; +import org.w3c.dom.Element; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public class SVGShapeExporter extends DefaultSVGShapeExporter { + + protected Element path; + protected int lastPatternId; + private final Color defaultColor; + private final SWF swf; + private final SVGExporter exporter; + + public SVGShapeExporter(SWF swf, SHAPE shape, SVGExporter exporter, Color defaultColor, ColorTransform colorTransform) { + super(shape, colorTransform); + this.swf = swf; + this.defaultColor = defaultColor; + this.exporter = exporter; + } + + @Override + public void beginFill(RGB color) { + if (color == null && defaultColor != null) { + color = new RGB(defaultColor); + } + finalizePath(); + path.setAttribute("stroke", "none"); + if (color != null) { + path.setAttribute("fill", color.toHexRGB()); + } + path.setAttribute("fill-rule", "evenodd"); + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + path.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); + } + } + } + + @Override + public void beginGradientFill(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + finalizePath(); + Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) + ? exporter.createElement("linearGradient") + : exporter.createElement("radialGradient"); + populateGradientElement(gradient, type, gradientRecords, matrix, spreadMethod, interpolationMethod, focalPointRatio); + int id = exporter.gradients.indexOf(gradient); + if (id < 0) { + // todo: filter same gradients + id = exporter.gradients.size(); + exporter.gradients.add(gradient); + } + String gradientId = "gradient" + id; + gradient.setAttribute("id", gradientId); + path.setAttribute("stroke", "none"); + path.setAttribute("fill", "url(#" + gradientId + ")"); + path.setAttribute("fill-rule", "evenodd"); + exporter.addToDefs(gradient); + } + + @Override + public void beginBitmapFill(int bitmapId, Matrix matrix, boolean repeat, boolean smooth, ColorTransform colorTransform) { + finalizePath(); + ImageTag image = null; + for (Tag t : swf.tags) { + if (t instanceof ImageTag) { + ImageTag i = (ImageTag) t; + if (i.getCharacterId() == bitmapId) { + image = i; + break; + } + } + } + if (image != null) { + SerializableImage img = image.getImage(); + if (img != null) { + colorTransform.apply(img); + int width = img.getWidth(); + int height = img.getHeight(); + lastPatternId++; + String patternId = "PatternID_"; + patternId += lastPatternId; + String format = image.getImageFormat(); + InputStream imageStream = image.getImageData(); + byte[] imageData; + if (imageStream != null) { + imageData = Helper.readStream(image.getImageData()); + } else { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + ImageIO.write(img.getBufferedImage(), format.toUpperCase(Locale.ENGLISH), baos); + } catch (IOException ex) { + } + imageData = baos.toByteArray(); + } + String base64ImgData = DatatypeConverter.printBase64Binary(imageData); + path.setAttribute("style", "fill:url(#" + patternId + ")"); + Element pattern = exporter.createElement("pattern"); + pattern.setAttribute("id", patternId); + pattern.setAttribute("patternUnits", "userSpaceOnUse"); + pattern.setAttribute("overflow", "visible"); + pattern.setAttribute("width", "" + width); + pattern.setAttribute("height", "" + height); + pattern.setAttribute("viewBox", "0 0 " + width + " " + height); + if (matrix != null) { + pattern.setAttribute("patternTransform", matrix.getTransformationString(SWF.unitDivisor, SWF.unitDivisor)); + } + Element imageElement = exporter.createElement("image"); + imageElement.setAttribute("width", "" + width); + imageElement.setAttribute("height", "" + height); + imageElement.setAttribute("xlink:href", "data:image/" + format + ";base64," + base64ImgData); + pattern.appendChild(imageElement); + exporter.addToGroup(pattern); + } + } + } + + @Override + public void lineStyle(double thickness, RGB color, boolean pixelHinting, String scaleMode, int startCaps, int endCaps, int joints, int miterLimit) { + finalizePath(); + thickness /= SWF.unitDivisor; + path.setAttribute("fill", "none"); + path.setAttribute("stroke", color.toHexRGB()); + path.setAttribute("stroke-width", Double.toString(thickness == 0 ? 1 : thickness)); + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + path.setAttribute("stroke-opacity", Float.toString(colorA.getAlphaFloat())); + } + } + switch (startCaps) { + case LINESTYLE2.NO_CAP: + path.setAttribute("stroke-linecap", "butt"); + break; + case LINESTYLE2.SQUARE_CAP: + path.setAttribute("stroke-linecap", "square"); + break; + default: + path.setAttribute("stroke-linecap", "round"); + break; + } + switch (joints) { + case LINESTYLE2.BEVEL_JOIN: + path.setAttribute("stroke-linejoin", "bevel"); + break; + case LINESTYLE2.ROUND_JOIN: + path.setAttribute("stroke-linejoin", "round"); + break; + default: + path.setAttribute("stroke-linejoin", "miter"); + if (miterLimit >= 1 && miterLimit != 4) { + path.setAttribute("stroke-miterlimit", Integer.toString(miterLimit)); + } + break; + } + } + + @Override + public void lineGradientStyle(int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + path.removeAttribute("stroke-opacity"); + Element gradient = (type == FILLSTYLE.LINEAR_GRADIENT) + ? exporter.createElement("linearGradient") + : exporter.createElement("radialGradient"); + populateGradientElement(gradient, type, gradientRecords, matrix, spreadMethod, interpolationMethod, focalPointRatio); + int id = exporter.gradients.indexOf(gradient); + if (id < 0) { + // todo: filter same gradients + id = exporter.gradients.size(); + exporter.gradients.add(gradient); + } + gradient.setAttribute("id", "gradient" + id); + path.setAttribute("stroke", "url(#gradient" + id + ")"); + path.setAttribute("fill", "none"); + exporter.addToDefs(gradient); + } + + @Override + protected void finalizePath() { + if (path != null && !"".equals(pathData)) { + path.setAttribute("d", pathData.trim()); + exporter.addToGroup(path); + } + path = exporter.createElement("path"); + super.finalizePath(); + } + + protected void populateGradientElement(Element gradient, int type, GRADRECORD[] gradientRecords, Matrix matrix, int spreadMethod, int interpolationMethod, float focalPointRatio) { + gradient.setAttribute("gradientUnits", "userSpaceOnUse"); + if (type == FILLSTYLE.LINEAR_GRADIENT) { + gradient.setAttribute("x1", "-819.2"); + gradient.setAttribute("x2", "819.2"); + } else { + gradient.setAttribute("r", "819.2"); + gradient.setAttribute("cx", "0"); + gradient.setAttribute("cy", "0"); + if (focalPointRatio != 0) { + gradient.setAttribute("fx", Double.toString(819.2 * focalPointRatio)); + gradient.setAttribute("fy", "0"); + } + } + switch (spreadMethod) { + case GRADIENT.SPREAD_PAD_MODE: + gradient.setAttribute("spreadMethod", "pad"); + break; + case GRADIENT.SPREAD_REFLECT_MODE: + gradient.setAttribute("spreadMethod", "reflect"); + break; + case GRADIENT.SPREAD_REPEAT_MODE: + gradient.setAttribute("spreadMethod", "repeat"); + break; + } + if (interpolationMethod == GRADIENT.INTERPOLATION_LINEAR_RGB_MODE) { + gradient.setAttribute("color-interpolation", "linearRGB"); + } + if (matrix != null) { + gradient.setAttribute("gradientTransform", matrix.getTransformationString(SWF.unitDivisor, 1)); + } + for (int i = 0; i < gradientRecords.length; i++) { + GRADRECORD record = gradientRecords[i]; + Element gradientEntry = exporter.createElement("stop"); + gradientEntry.setAttribute("offset", Double.toString(record.ratio / 255.0)); + RGB color = record.color; + //if(colors.get(i) != 0) { + gradientEntry.setAttribute("stop-color", color.toHexRGB()); + //} + if (color instanceof RGBA) { + RGBA colorA = (RGBA) color; + if (colorA.alpha != 255) { + gradientEntry.setAttribute("stop-opacity", Float.toString(colorA.getAlphaFloat())); + } + } + gradient.appendChild(gradientEntry); + } + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java similarity index 95% rename from src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java index 381e41673..e7d5b9fc2 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/ShapeExporterBase.java @@ -1,489 +1,488 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.FOCALGRADIENT; -import com.jpexs.decompiler.flash.types.LINESTYLE; -import com.jpexs.decompiler.flash.types.LINESTYLE2; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; -import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; -import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; -import java.awt.Color; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * @author JPEXS, Claus Wahlers - */ -public abstract class ShapeExporterBase implements IShapeExporter { - - protected final SHAPE shape; - - protected List _fillStyles; - protected List _lineStyles; - - protected List>> _fillEdgeMaps; - protected List>> _lineEdgeMaps; - - private boolean edgeMapsCreated; - protected ColorTransform colorTransform; - - public ShapeExporterBase(SHAPE shape, ColorTransform colorTransform) { - this.shape = shape; - this.colorTransform = colorTransform; - _fillStyles = new ArrayList<>(); - _lineStyles = new ArrayList<>(); - if (shape instanceof SHAPEWITHSTYLE) { - SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) shape; - _fillStyles.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); - _lineStyles.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); - } - } - - public void export() { - // Create edge maps - _fillEdgeMaps = new ArrayList<>(); - _lineEdgeMaps = new ArrayList<>(); - createEdgeMaps(_fillStyles, _lineStyles, _fillEdgeMaps, _lineEdgeMaps); - - // Let the doc handler know that a shape export starts - beginShape(); - // Export fills and strokes for each group separately - for (int i = 0; i < _lineEdgeMaps.size(); i++) { - // Export fills first - exportFillPath(i); - // Export strokes last - exportLinePath(i); - } - // Let the doc handler know that we're done exporting a shape - endShape(); - } - - protected void createEdgeMaps(List fillStyles, List lineStyles, - List>> fillEdgeMaps, List>> lineEdgeMaps) { - if (!edgeMapsCreated) { - int xPos = 0; - int yPos = 0; - int fillStyleIdxOffset = 0; - int lineStyleIdxOffset = 0; - int currentFillStyleIdx0 = 0; - int currentFillStyleIdx1 = 0; - int currentLineStyleIdx = 0; - List subPath = new ArrayList<>(); - Map> currentFillEdgeMap = new HashMap<>(); - Map> currentLineEdgeMap = new HashMap<>(); - List records = shape.shapeRecords; - for (int i = 0; i < records.size(); i++) { - SHAPERECORD shapeRecord = records.get(i); - if (shapeRecord instanceof StyleChangeRecord) { - StyleChangeRecord styleChangeRecord = (StyleChangeRecord) shapeRecord; - if (styleChangeRecord.stateLineStyle || styleChangeRecord.stateFillStyle0 || styleChangeRecord.stateFillStyle1) { - processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); - subPath = new ArrayList<>(); - } - if (styleChangeRecord.stateNewStyles) { - fillStyleIdxOffset = fillStyles.size(); - lineStyleIdxOffset = lineStyles.size(); - appendFillStyles(fillStyles, styleChangeRecord.fillStyles.fillStyles); - appendLineStyles(lineStyles, styleChangeRecord.lineStyles.lineStyles); - } - // Check if all styles are reset to 0. - // This (probably) means that a new group starts with the next record - if (styleChangeRecord.stateLineStyle && styleChangeRecord.lineStyle == 0 - && styleChangeRecord.stateFillStyle0 && styleChangeRecord.fillStyle0 == 0 - && styleChangeRecord.stateFillStyle1 && styleChangeRecord.fillStyle1 == 0) { - cleanEdgeMap(currentFillEdgeMap); - cleanEdgeMap(currentLineEdgeMap); - fillEdgeMaps.add(currentFillEdgeMap); - lineEdgeMaps.add(currentLineEdgeMap); - currentFillEdgeMap = new HashMap<>(); - currentLineEdgeMap = new HashMap<>(); - currentLineStyleIdx = 0; - currentFillStyleIdx0 = 0; - currentFillStyleIdx1 = 0; - } else { - if (styleChangeRecord.stateLineStyle) { - currentLineStyleIdx = styleChangeRecord.lineStyle; - if (currentLineStyleIdx > 0) { - currentLineStyleIdx += lineStyleIdxOffset; - } - } - if (styleChangeRecord.stateFillStyle0) { - currentFillStyleIdx0 = styleChangeRecord.fillStyle0; - if (currentFillStyleIdx0 > 0) { - currentFillStyleIdx0 += fillStyleIdxOffset; - } - } - if (styleChangeRecord.stateFillStyle1) { - currentFillStyleIdx1 = styleChangeRecord.fillStyle1; - if (currentFillStyleIdx1 > 0) { - currentFillStyleIdx1 += fillStyleIdxOffset; - } - } - } - if (styleChangeRecord.stateMoveTo) { - xPos = styleChangeRecord.moveDeltaX; - yPos = styleChangeRecord.moveDeltaY; - } - } else if (shapeRecord instanceof StraightEdgeRecord) { - StraightEdgeRecord straightEdgeRecord = (StraightEdgeRecord) shapeRecord; - PointInt from = new PointInt(xPos, yPos); - if (straightEdgeRecord.generalLineFlag) { - xPos += straightEdgeRecord.deltaX; - yPos += straightEdgeRecord.deltaY; - } else { - if (straightEdgeRecord.vertLineFlag) { - yPos += straightEdgeRecord.deltaY; - } else { - xPos += straightEdgeRecord.deltaX; - } - } - PointInt to = new PointInt(xPos, yPos); - subPath.add(new StraightEdge(from, to, currentLineStyleIdx, currentFillStyleIdx1)); - } else if (shapeRecord instanceof CurvedEdgeRecord) { - CurvedEdgeRecord curvedEdgeRecord = (CurvedEdgeRecord) shapeRecord; - PointInt from = new PointInt(xPos, yPos); - int xPosControl = xPos + curvedEdgeRecord.controlDeltaX; - int yPosControl = yPos + curvedEdgeRecord.controlDeltaY; - xPos = xPosControl + curvedEdgeRecord.anchorDeltaX; - yPos = yPosControl + curvedEdgeRecord.anchorDeltaY; - PointInt control = new PointInt(xPosControl, yPosControl); - PointInt to = new PointInt(xPos, yPos); - subPath.add(new CurvedEdge(from, control, to, currentLineStyleIdx, currentFillStyleIdx1)); - } else if (shapeRecord instanceof EndShapeRecord) { - // We're done. Process the last subpath, if any - processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); - cleanEdgeMap(currentFillEdgeMap); - cleanEdgeMap(currentLineEdgeMap); - fillEdgeMaps.add(currentFillEdgeMap); - lineEdgeMaps.add(currentLineEdgeMap); - } - } - edgeMapsCreated = true; - } - } - - protected void processSubPath(List subPath, int lineStyleIdx, int fillStyleIdx0, int fillStyleIdx1, - Map> currentFillEdgeMap, Map> currentLineEdgeMap) { - List path; - if (fillStyleIdx0 != 0) { - path = currentFillEdgeMap.get(fillStyleIdx0); - if (path == null) { - path = new ArrayList<>(); - currentFillEdgeMap.put(fillStyleIdx0, path); - } - for (int j = subPath.size() - 1; j >= 0; j--) { - path.add(subPath.get(j).reverseWithNewFillStyle(fillStyleIdx0)); - } - } - if (fillStyleIdx1 != 0) { - path = currentFillEdgeMap.get(fillStyleIdx1); - if (path == null) { - path = new ArrayList<>(); - currentFillEdgeMap.put(fillStyleIdx1, path); - } - appendEdges(path, subPath); - } - if (lineStyleIdx != 0) { - path = currentLineEdgeMap.get(lineStyleIdx); - if (path == null) { - path = new ArrayList<>(); - currentLineEdgeMap.put(lineStyleIdx, path); - } - appendEdges(path, subPath); - } - } - - protected void exportFillPath(int groupIndex) { - List path = createPathFromEdgeMap(_fillEdgeMaps.get(groupIndex)); - PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - int fillStyleIdx = Integer.MAX_VALUE; - if (path.size() > 0) { - beginFills(); - for (int i = 0; i < path.size(); i++) { - IEdge e = path.get(i); - if (fillStyleIdx != e.getFillStyleIdx()) { - if (fillStyleIdx != Integer.MAX_VALUE) { - endFill(); - } - fillStyleIdx = e.getFillStyleIdx(); - pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - try { - Matrix matrix; - FILLSTYLE fillStyle = _fillStyles.get(fillStyleIdx - 1); - switch (fillStyle.fillStyleType) { - case FILLSTYLE.SOLID: - // Solid fill - beginFill(colorTransform.apply(fillStyle.color)); - break; - case FILLSTYLE.LINEAR_GRADIENT: - case FILLSTYLE.RADIAL_GRADIENT: - case FILLSTYLE.FOCAL_RADIAL_GRADIENT: - // Gradient fill - matrix = new Matrix(fillStyle.gradientMatrix); - beginGradientFill( - fillStyle.fillStyleType, - colorTransform.apply(fillStyle.gradient.gradientRecords), - matrix, - fillStyle.gradient.spreadMode, - fillStyle.gradient.interpolationMode, - (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0 - ); - break; - case FILLSTYLE.REPEATING_BITMAP: - case FILLSTYLE.CLIPPED_BITMAP: - case FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP: - case FILLSTYLE.NON_SMOOTHED_CLIPPED_BITMAP: - // Bitmap fill - matrix = new Matrix(fillStyle.bitmapMatrix); - beginBitmapFill( - fillStyle.bitmapId, - matrix, - (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP), - (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.CLIPPED_BITMAP), - colorTransform - ); - break; - } - } catch (Exception ex) { - // Font shapes define no fillstyles per se, but do reference fillstyle index 1, - // which represents the font color. We just report null in this case. - beginFill(null); - } - } - if (!pos.equals(e.getFrom())) { - moveTo(e.getFrom().x, e.getFrom().y); - } - if (e instanceof CurvedEdge) { - CurvedEdge c = (CurvedEdge) e; - curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y); - } else { - lineTo(e.getTo().x, e.getTo().y); - } - pos = e.getTo(); - } - if (fillStyleIdx != Integer.MAX_VALUE) { - endFill(); - } - endFills(); - } - } - - protected void exportLinePath(int groupIndex) { - List path = createPathFromEdgeMap(_lineEdgeMaps.get(groupIndex)); - PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - int lineStyleIdx = Integer.MAX_VALUE; - if (path.size() > 0) { - beginLines(); - for (int i = 0; i < path.size(); i++) { - IEdge e = path.get(i); - if (lineStyleIdx != e.getLineStyleIdx()) { - lineStyleIdx = e.getLineStyleIdx(); - pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - LINESTYLE lineStyle = null; - try { - lineStyle = _lineStyles.get(lineStyleIdx - 1); - } catch (Exception ex) { - } - if (lineStyle != null) { - String scaleMode = "NORMAL"; - boolean pixelHintingFlag = false; - int startCapStyle = LINESTYLE2.ROUND_CAP; - int endCapStyle = LINESTYLE2.ROUND_CAP; - int joinStyle = LINESTYLE2.ROUND_JOIN; - int miterLimitFactor = 3; - boolean hasFillFlag = false; - if (lineStyle instanceof LINESTYLE2) { - LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; - if (lineStyle2.noHScaleFlag && lineStyle2.noVScaleFlag) { - scaleMode = "NONE"; - } else if (lineStyle2.noHScaleFlag) { - scaleMode = "HORIZONTAL"; - } else if (lineStyle2.noVScaleFlag) { - scaleMode = "VERTICAL"; - } - pixelHintingFlag = lineStyle2.pixelHintingFlag; - startCapStyle = lineStyle2.startCapStyle; - endCapStyle = lineStyle2.endCapStyle; - joinStyle = lineStyle2.joinStyle; - miterLimitFactor = lineStyle2.miterLimitFactor; - hasFillFlag = lineStyle2.hasFillFlag; - } - lineStyle( - lineStyle.width, - colorTransform.apply(lineStyle.color), - pixelHintingFlag, - scaleMode, - startCapStyle, - endCapStyle, - joinStyle, - miterLimitFactor); - - if (hasFillFlag) { - LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; - FILLSTYLE fillStyle = lineStyle2.fillType; - switch (fillStyle.fillStyleType) { - case FILLSTYLE.LINEAR_GRADIENT: - case FILLSTYLE.RADIAL_GRADIENT: - case FILLSTYLE.FOCAL_RADIAL_GRADIENT: - // Gradient fill - Matrix matrix = new Matrix(fillStyle.gradientMatrix); - lineGradientStyle( - fillStyle.fillStyleType, - fillStyle.gradient.gradientRecords, - matrix, - fillStyle.gradient.spreadMode, - fillStyle.gradient.interpolationMode, - (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0 - ); - break; - } - } - } else { - // We should never get here - lineStyle(1, new RGB(Color.BLACK), false, "NORMAL", 0, 0, 0, 3); - } - } - if (!e.getFrom().equals(pos)) { - moveTo(e.getFrom().x, e.getFrom().y); - } - if (e instanceof CurvedEdge) { - CurvedEdge c = (CurvedEdge) e; - curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y); - } else { - lineTo(e.getTo().x, e.getTo().y); - } - pos = e.getTo(); - } - endLines(); - } - } - - protected List createPathFromEdgeMap(Map> edgeMap) { - List newPath = new ArrayList<>(); - List styleIdxArray = new ArrayList<>(); - for (Integer styleIdx : edgeMap.keySet()) { - styleIdxArray.add(styleIdx); - } - Collections.sort(styleIdxArray); - for (int i = 0; i < styleIdxArray.size(); i++) { - appendEdges(newPath, edgeMap.get(styleIdxArray.get(i))); - } - return newPath; - } - - protected void cleanEdgeMap(Map> edgeMap) { - for (Integer styleIdx : edgeMap.keySet()) { - List subPath = edgeMap.get(styleIdx); - if (subPath != null && subPath.size() > 0) { - int idx; - IEdge prevEdge = null; - List tmpPath = new ArrayList<>(); - Map> coordMap = createCoordMap(subPath); - while (subPath.size() > 0) { - idx = 0; - while (idx < subPath.size()) { - if (prevEdge == null || prevEdge.getTo().equals(subPath.get(idx).getFrom())) { - IEdge edge = subPath.remove(idx); - tmpPath.add(edge); - removeEdgeFromCoordMap(coordMap, edge); - prevEdge = edge; - } else { - IEdge edge = findNextEdgeInCoordMap(coordMap, prevEdge); - if (edge != null) { - idx = subPath.indexOf(edge); - } else { - idx = 0; - prevEdge = null; - } - } - } - } - edgeMap.put(styleIdx, tmpPath); - } - } - } - - protected Map> createCoordMap(List path) { - Map> coordMap = new HashMap<>(); - for (int i = 0; i < path.size(); i++) { - PointInt from = path.get(i).getFrom(); - String key = from.x + "_" + from.y; - List coordMapArray = coordMap.get(key); - if (coordMapArray == null) { - List list = new ArrayList<>(); - list.add(path.get(i)); - coordMap.put(key, list); - } else { - coordMapArray.add(path.get(i)); - } - } - return coordMap; - } - - protected void removeEdgeFromCoordMap(Map> coordMap, IEdge edge) { - String key = edge.getFrom().x + "_" + edge.getFrom().y; - List coordMapArray = coordMap.get(key); - if (coordMapArray != null) { - if (coordMapArray.size() == 1) { - coordMap.remove(key); - } else { - int i = coordMapArray.indexOf(edge); - if (i > -1) { - coordMapArray.remove(i); - } - } - } - } - - protected IEdge findNextEdgeInCoordMap(Map> coordMap, IEdge edge) { - String key = edge.getTo().x + "_" + edge.getTo().y; - List coordMapArray = coordMap.get(key); - if (coordMapArray != null && coordMapArray.size() > 0) { - return coordMapArray.get(0); - } - return null; - } - - protected void appendFillStyles(List v1, FILLSTYLE[] v2) { - v1.addAll(Arrays.asList(v2)); - } - - protected void appendLineStyles(List v1, LINESTYLE[] v2) { - v1.addAll(Arrays.asList(v2)); - } - - protected void appendEdges(List v1, List v2) { - for (int i = 0; i < v2.size(); i++) { - v1.add(v2.get(i)); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.FOCALGRADIENT; +import com.jpexs.decompiler.flash.types.LINESTYLE; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; +import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; +import java.awt.Color; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * @author JPEXS, Claus Wahlers + */ +public abstract class ShapeExporterBase implements IShapeExporter { + + protected final SHAPE shape; + + protected List _fillStyles; + protected List _lineStyles; + + protected List>> _fillEdgeMaps; + protected List>> _lineEdgeMaps; + + private boolean edgeMapsCreated; + protected ColorTransform colorTransform; + + public ShapeExporterBase(SHAPE shape, ColorTransform colorTransform) { + this.shape = shape; + this.colorTransform = colorTransform; + _fillStyles = new ArrayList<>(); + _lineStyles = new ArrayList<>(); + if (shape instanceof SHAPEWITHSTYLE) { + SHAPEWITHSTYLE shapeWithStyle = (SHAPEWITHSTYLE) shape; + _fillStyles.addAll(Arrays.asList(shapeWithStyle.fillStyles.fillStyles)); + _lineStyles.addAll(Arrays.asList(shapeWithStyle.lineStyles.lineStyles)); + } + } + + public void export() { + // Create edge maps + _fillEdgeMaps = new ArrayList<>(); + _lineEdgeMaps = new ArrayList<>(); + createEdgeMaps(_fillStyles, _lineStyles, _fillEdgeMaps, _lineEdgeMaps); + + // Let the doc handler know that a shape export starts + beginShape(); + // Export fills and strokes for each group separately + for (int i = 0; i < _lineEdgeMaps.size(); i++) { + // Export fills first + exportFillPath(i); + // Export strokes last + exportLinePath(i); + } + // Let the doc handler know that we're done exporting a shape + endShape(); + } + + protected void createEdgeMaps(List fillStyles, List lineStyles, + List>> fillEdgeMaps, List>> lineEdgeMaps) { + if (!edgeMapsCreated) { + int xPos = 0; + int yPos = 0; + int fillStyleIdxOffset = 0; + int lineStyleIdxOffset = 0; + int currentFillStyleIdx0 = 0; + int currentFillStyleIdx1 = 0; + int currentLineStyleIdx = 0; + List subPath = new ArrayList<>(); + Map> currentFillEdgeMap = new HashMap<>(); + Map> currentLineEdgeMap = new HashMap<>(); + List records = shape.shapeRecords; + for (int i = 0; i < records.size(); i++) { + SHAPERECORD shapeRecord = records.get(i); + if (shapeRecord instanceof StyleChangeRecord) { + StyleChangeRecord styleChangeRecord = (StyleChangeRecord) shapeRecord; + if (styleChangeRecord.stateLineStyle || styleChangeRecord.stateFillStyle0 || styleChangeRecord.stateFillStyle1) { + processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); + subPath = new ArrayList<>(); + } + if (styleChangeRecord.stateNewStyles) { + fillStyleIdxOffset = fillStyles.size(); + lineStyleIdxOffset = lineStyles.size(); + appendFillStyles(fillStyles, styleChangeRecord.fillStyles.fillStyles); + appendLineStyles(lineStyles, styleChangeRecord.lineStyles.lineStyles); + } + // Check if all styles are reset to 0. + // This (probably) means that a new group starts with the next record + if (styleChangeRecord.stateLineStyle && styleChangeRecord.lineStyle == 0 + && styleChangeRecord.stateFillStyle0 && styleChangeRecord.fillStyle0 == 0 + && styleChangeRecord.stateFillStyle1 && styleChangeRecord.fillStyle1 == 0) { + cleanEdgeMap(currentFillEdgeMap); + cleanEdgeMap(currentLineEdgeMap); + fillEdgeMaps.add(currentFillEdgeMap); + lineEdgeMaps.add(currentLineEdgeMap); + currentFillEdgeMap = new HashMap<>(); + currentLineEdgeMap = new HashMap<>(); + currentLineStyleIdx = 0; + currentFillStyleIdx0 = 0; + currentFillStyleIdx1 = 0; + } else { + if (styleChangeRecord.stateLineStyle) { + currentLineStyleIdx = styleChangeRecord.lineStyle; + if (currentLineStyleIdx > 0) { + currentLineStyleIdx += lineStyleIdxOffset; + } + } + if (styleChangeRecord.stateFillStyle0) { + currentFillStyleIdx0 = styleChangeRecord.fillStyle0; + if (currentFillStyleIdx0 > 0) { + currentFillStyleIdx0 += fillStyleIdxOffset; + } + } + if (styleChangeRecord.stateFillStyle1) { + currentFillStyleIdx1 = styleChangeRecord.fillStyle1; + if (currentFillStyleIdx1 > 0) { + currentFillStyleIdx1 += fillStyleIdxOffset; + } + } + } + if (styleChangeRecord.stateMoveTo) { + xPos = styleChangeRecord.moveDeltaX; + yPos = styleChangeRecord.moveDeltaY; + } + } else if (shapeRecord instanceof StraightEdgeRecord) { + StraightEdgeRecord straightEdgeRecord = (StraightEdgeRecord) shapeRecord; + PointInt from = new PointInt(xPos, yPos); + if (straightEdgeRecord.generalLineFlag) { + xPos += straightEdgeRecord.deltaX; + yPos += straightEdgeRecord.deltaY; + } else { + if (straightEdgeRecord.vertLineFlag) { + yPos += straightEdgeRecord.deltaY; + } else { + xPos += straightEdgeRecord.deltaX; + } + } + PointInt to = new PointInt(xPos, yPos); + subPath.add(new StraightEdge(from, to, currentLineStyleIdx, currentFillStyleIdx1)); + } else if (shapeRecord instanceof CurvedEdgeRecord) { + CurvedEdgeRecord curvedEdgeRecord = (CurvedEdgeRecord) shapeRecord; + PointInt from = new PointInt(xPos, yPos); + int xPosControl = xPos + curvedEdgeRecord.controlDeltaX; + int yPosControl = yPos + curvedEdgeRecord.controlDeltaY; + xPos = xPosControl + curvedEdgeRecord.anchorDeltaX; + yPos = yPosControl + curvedEdgeRecord.anchorDeltaY; + PointInt control = new PointInt(xPosControl, yPosControl); + PointInt to = new PointInt(xPos, yPos); + subPath.add(new CurvedEdge(from, control, to, currentLineStyleIdx, currentFillStyleIdx1)); + } else if (shapeRecord instanceof EndShapeRecord) { + // We're done. Process the last subpath, if any + processSubPath(subPath, currentLineStyleIdx, currentFillStyleIdx0, currentFillStyleIdx1, currentFillEdgeMap, currentLineEdgeMap); + cleanEdgeMap(currentFillEdgeMap); + cleanEdgeMap(currentLineEdgeMap); + fillEdgeMaps.add(currentFillEdgeMap); + lineEdgeMaps.add(currentLineEdgeMap); + } + } + edgeMapsCreated = true; + } + } + + protected void processSubPath(List subPath, int lineStyleIdx, int fillStyleIdx0, int fillStyleIdx1, + Map> currentFillEdgeMap, Map> currentLineEdgeMap) { + List path; + if (fillStyleIdx0 != 0) { + path = currentFillEdgeMap.get(fillStyleIdx0); + if (path == null) { + path = new ArrayList<>(); + currentFillEdgeMap.put(fillStyleIdx0, path); + } + for (int j = subPath.size() - 1; j >= 0; j--) { + path.add(subPath.get(j).reverseWithNewFillStyle(fillStyleIdx0)); + } + } + if (fillStyleIdx1 != 0) { + path = currentFillEdgeMap.get(fillStyleIdx1); + if (path == null) { + path = new ArrayList<>(); + currentFillEdgeMap.put(fillStyleIdx1, path); + } + appendEdges(path, subPath); + } + if (lineStyleIdx != 0) { + path = currentLineEdgeMap.get(lineStyleIdx); + if (path == null) { + path = new ArrayList<>(); + currentLineEdgeMap.put(lineStyleIdx, path); + } + appendEdges(path, subPath); + } + } + + protected void exportFillPath(int groupIndex) { + List path = createPathFromEdgeMap(_fillEdgeMaps.get(groupIndex)); + PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + int fillStyleIdx = Integer.MAX_VALUE; + if (path.size() > 0) { + beginFills(); + for (int i = 0; i < path.size(); i++) { + IEdge e = path.get(i); + if (fillStyleIdx != e.getFillStyleIdx()) { + if (fillStyleIdx != Integer.MAX_VALUE) { + endFill(); + } + fillStyleIdx = e.getFillStyleIdx(); + pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + try { + Matrix matrix; + FILLSTYLE fillStyle = _fillStyles.get(fillStyleIdx - 1); + switch (fillStyle.fillStyleType) { + case FILLSTYLE.SOLID: + // Solid fill + beginFill(colorTransform.apply(fillStyle.color)); + break; + case FILLSTYLE.LINEAR_GRADIENT: + case FILLSTYLE.RADIAL_GRADIENT: + case FILLSTYLE.FOCAL_RADIAL_GRADIENT: + // Gradient fill + matrix = new Matrix(fillStyle.gradientMatrix); + beginGradientFill( + fillStyle.fillStyleType, + colorTransform.apply(fillStyle.gradient.gradientRecords), + matrix, + fillStyle.gradient.spreadMode, + fillStyle.gradient.interpolationMode, + (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0 + ); + break; + case FILLSTYLE.REPEATING_BITMAP: + case FILLSTYLE.CLIPPED_BITMAP: + case FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP: + case FILLSTYLE.NON_SMOOTHED_CLIPPED_BITMAP: + // Bitmap fill + matrix = new Matrix(fillStyle.bitmapMatrix); + beginBitmapFill( + fillStyle.bitmapId, + matrix, + (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.NON_SMOOTHED_REPEATING_BITMAP), + (fillStyle.fillStyleType == FILLSTYLE.REPEATING_BITMAP || fillStyle.fillStyleType == FILLSTYLE.CLIPPED_BITMAP), + colorTransform + ); + break; + } + } catch (Exception ex) { + // Font shapes define no fillstyles per se, but do reference fillstyle index 1, + // which represents the font color. We just report null in this case. + beginFill(null); + } + } + if (!pos.equals(e.getFrom())) { + moveTo(e.getFrom().x, e.getFrom().y); + } + if (e instanceof CurvedEdge) { + CurvedEdge c = (CurvedEdge) e; + curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y); + } else { + lineTo(e.getTo().x, e.getTo().y); + } + pos = e.getTo(); + } + if (fillStyleIdx != Integer.MAX_VALUE) { + endFill(); + } + endFills(); + } + } + + protected void exportLinePath(int groupIndex) { + List path = createPathFromEdgeMap(_lineEdgeMaps.get(groupIndex)); + PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + int lineStyleIdx = Integer.MAX_VALUE; + if (path.size() > 0) { + beginLines(); + for (int i = 0; i < path.size(); i++) { + IEdge e = path.get(i); + if (lineStyleIdx != e.getLineStyleIdx()) { + lineStyleIdx = e.getLineStyleIdx(); + pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); + LINESTYLE lineStyle = null; + try { + lineStyle = _lineStyles.get(lineStyleIdx - 1); + } catch (Exception ex) { + } + if (lineStyle != null) { + String scaleMode = "NORMAL"; + boolean pixelHintingFlag = false; + int startCapStyle = LINESTYLE2.ROUND_CAP; + int endCapStyle = LINESTYLE2.ROUND_CAP; + int joinStyle = LINESTYLE2.ROUND_JOIN; + int miterLimitFactor = 3; + boolean hasFillFlag = false; + if (lineStyle instanceof LINESTYLE2) { + LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; + if (lineStyle2.noHScaleFlag && lineStyle2.noVScaleFlag) { + scaleMode = "NONE"; + } else if (lineStyle2.noHScaleFlag) { + scaleMode = "HORIZONTAL"; + } else if (lineStyle2.noVScaleFlag) { + scaleMode = "VERTICAL"; + } + pixelHintingFlag = lineStyle2.pixelHintingFlag; + startCapStyle = lineStyle2.startCapStyle; + endCapStyle = lineStyle2.endCapStyle; + joinStyle = lineStyle2.joinStyle; + miterLimitFactor = lineStyle2.miterLimitFactor; + hasFillFlag = lineStyle2.hasFillFlag; + } + lineStyle( + lineStyle.width, + colorTransform.apply(lineStyle.color), + pixelHintingFlag, + scaleMode, + startCapStyle, + endCapStyle, + joinStyle, + miterLimitFactor); + + if (hasFillFlag) { + LINESTYLE2 lineStyle2 = (LINESTYLE2) lineStyle; + FILLSTYLE fillStyle = lineStyle2.fillType; + switch (fillStyle.fillStyleType) { + case FILLSTYLE.LINEAR_GRADIENT: + case FILLSTYLE.RADIAL_GRADIENT: + case FILLSTYLE.FOCAL_RADIAL_GRADIENT: + // Gradient fill + Matrix matrix = new Matrix(fillStyle.gradientMatrix); + lineGradientStyle( + fillStyle.fillStyleType, + fillStyle.gradient.gradientRecords, + matrix, + fillStyle.gradient.spreadMode, + fillStyle.gradient.interpolationMode, + (fillStyle.gradient instanceof FOCALGRADIENT) ? ((FOCALGRADIENT) fillStyle.gradient).focalPoint : 0 + ); + break; + } + } + } else { + // We should never get here + lineStyle(1, new RGB(Color.BLACK), false, "NORMAL", 0, 0, 0, 3); + } + } + if (!e.getFrom().equals(pos)) { + moveTo(e.getFrom().x, e.getFrom().y); + } + if (e instanceof CurvedEdge) { + CurvedEdge c = (CurvedEdge) e; + curveTo(c.getControl().x, c.getControl().y, c.to.x, c.to.y); + } else { + lineTo(e.getTo().x, e.getTo().y); + } + pos = e.getTo(); + } + endLines(); + } + } + + protected List createPathFromEdgeMap(Map> edgeMap) { + List newPath = new ArrayList<>(); + List styleIdxArray = new ArrayList<>(); + for (Integer styleIdx : edgeMap.keySet()) { + styleIdxArray.add(styleIdx); + } + Collections.sort(styleIdxArray); + for (int i = 0; i < styleIdxArray.size(); i++) { + appendEdges(newPath, edgeMap.get(styleIdxArray.get(i))); + } + return newPath; + } + + protected void cleanEdgeMap(Map> edgeMap) { + for (Integer styleIdx : edgeMap.keySet()) { + List subPath = edgeMap.get(styleIdx); + if (subPath != null && subPath.size() > 0) { + int idx; + IEdge prevEdge = null; + List tmpPath = new ArrayList<>(); + Map> coordMap = createCoordMap(subPath); + while (subPath.size() > 0) { + idx = 0; + while (idx < subPath.size()) { + if (prevEdge == null || prevEdge.getTo().equals(subPath.get(idx).getFrom())) { + IEdge edge = subPath.remove(idx); + tmpPath.add(edge); + removeEdgeFromCoordMap(coordMap, edge); + prevEdge = edge; + } else { + IEdge edge = findNextEdgeInCoordMap(coordMap, prevEdge); + if (edge != null) { + idx = subPath.indexOf(edge); + } else { + idx = 0; + prevEdge = null; + } + } + } + } + edgeMap.put(styleIdx, tmpPath); + } + } + } + + protected Map> createCoordMap(List path) { + Map> coordMap = new HashMap<>(); + for (int i = 0; i < path.size(); i++) { + PointInt from = path.get(i).getFrom(); + String key = from.x + "_" + from.y; + List coordMapArray = coordMap.get(key); + if (coordMapArray == null) { + List list = new ArrayList<>(); + list.add(path.get(i)); + coordMap.put(key, list); + } else { + coordMapArray.add(path.get(i)); + } + } + return coordMap; + } + + protected void removeEdgeFromCoordMap(Map> coordMap, IEdge edge) { + String key = edge.getFrom().x + "_" + edge.getFrom().y; + List coordMapArray = coordMap.get(key); + if (coordMapArray != null) { + if (coordMapArray.size() == 1) { + coordMap.remove(key); + } else { + int i = coordMapArray.indexOf(edge); + if (i > -1) { + coordMapArray.remove(i); + } + } + } + } + + protected IEdge findNextEdgeInCoordMap(Map> coordMap, IEdge edge) { + String key = edge.getTo().x + "_" + edge.getTo().y; + List coordMapArray = coordMap.get(key); + if (coordMapArray != null && coordMapArray.size() > 0) { + return coordMapArray.get(0); + } + return null; + } + + protected void appendFillStyles(List v1, FILLSTYLE[] v2) { + v1.addAll(Arrays.asList(v2)); + } + + protected void appendLineStyles(List v1, LINESTYLE[] v2) { + v1.addAll(Arrays.asList(v2)); + } + + protected void appendEdges(List v1, List v2) { + for (int i = 0; i < v2.size(); i++) { + v1.add(v2.get(i)); + } + } +} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java similarity index 58% rename from src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java index 81309d856..37c6beb58 100644 --- a/src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/StraightEdge.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public class StraightEdge implements IEdge { - - protected final PointInt from; - protected final PointInt to; - protected final int lineStyleIdx; - private final int fillStyleIdx; - - StraightEdge(PointInt from, PointInt to, int lineStyleIdx, int fillStyleIdx) { - this.from = from; - this.to = to; - this.lineStyleIdx = lineStyleIdx; - this.fillStyleIdx = fillStyleIdx; - } - - @Override - public PointInt getFrom() { - return from; - } - - @Override - public PointInt getTo() { - return to; - } - - @Override - public int getLineStyleIdx() { - return lineStyleIdx; - } - - @Override - public int getFillStyleIdx() { - return fillStyleIdx; - } - - @Override - public IEdge reverseWithNewFillStyle(int newFillStyleIdx) { - return new StraightEdge(to, from, lineStyleIdx, newFillStyleIdx); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.exporters.shape; + +import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; + +/** + * + * @author JPEXS + */ +public class StraightEdge implements IEdge { + + protected final PointInt from; + protected final PointInt to; + protected final int lineStyleIdx; + private final int fillStyleIdx; + + StraightEdge(PointInt from, PointInt to, int lineStyleIdx, int fillStyleIdx) { + this.from = from; + this.to = to; + this.lineStyleIdx = lineStyleIdx; + this.fillStyleIdx = fillStyleIdx; + } + + @Override + public PointInt getFrom() { + return from; + } + + @Override + public PointInt getTo() { + return to; + } + + @Override + public int getLineStyleIdx() { + return lineStyleIdx; + } + + @Override + public int getFillStyleIdx() { + return fillStyleIdx; + } + + @Override + public IEdge reverseWithNewFillStyle(int newFillStyleIdx) { + return new StraightEdge(to, from, lineStyleIdx, newFillStyleIdx); + } +} diff --git a/src/com/jpexs/decompiler/flash/flv/AUDIODATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/AUDIODATA.java similarity index 72% rename from src/com/jpexs/decompiler/flash/flv/AUDIODATA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/AUDIODATA.java index 37a696482..bb5143e42 100644 --- a/src/com/jpexs/decompiler/flash/flv/AUDIODATA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/AUDIODATA.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public class AUDIODATA extends DATA { - - public static final int SOUNDFORMAT_UNCOMPRESSED_NE = 0; - public static final int SOUNDFORMAT_ADPCM = 1; - public static final int SOUNDFORMAT_MP3 = 2; - public static final int SOUNDFORMAT_UNCOMPRESSED_LE = 3; - public static final int SOUNDFORMAT_NELLYMOSER_16 = 4; - public static final int SOUNDFORMAT_NELLYMOSER_8 = 5; - public static final int SOUNDFORMAT_NELLYMOSER = 6; - public static final int SOUNDFORMAT_SPEEX = 11; - public static final int SOUNDRATE_5K5 = 0; - public static final int SOUNDRATE_11K = 1; - public static final int SOUNDRATE_22K = 2; - public static final int SOUNDRATE_44K = 3; - public static final int SOUNDSIZE_8BIT = 0; - public static final int SOUNDSIZE_16BIT = 1; - public static final int SOUNDTYPE_MONO = 0; - public static final int SOUNDTYPE_STEREO = 1; - public int soundFormat; - public int soundRate; - public boolean soundSize; - public boolean soundType; - public byte[] soundData; - - public AUDIODATA(int soundFormat, int soundRate, boolean soundSize, boolean soundType, byte[] soundData) { - this.soundFormat = soundFormat; - this.soundRate = soundRate; - this.soundSize = soundSize; - this.soundType = soundType; - this.soundData = soundData; - } - - @Override - public byte[] getBytes() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try { - FLVOutputStream flv = new FLVOutputStream(baos); - flv.writeUB(4, soundFormat); - flv.writeUB(2, soundRate); - flv.writeUB(1, soundSize ? 1 : 0); - flv.writeUB(1, soundType ? 1 : 0); - flv.write(soundData); - } catch (IOException ex) { - //ignore - } - return baos.toByteArray(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public class AUDIODATA extends DATA { + + public static final int SOUNDFORMAT_UNCOMPRESSED_NE = 0; + public static final int SOUNDFORMAT_ADPCM = 1; + public static final int SOUNDFORMAT_MP3 = 2; + public static final int SOUNDFORMAT_UNCOMPRESSED_LE = 3; + public static final int SOUNDFORMAT_NELLYMOSER_16 = 4; + public static final int SOUNDFORMAT_NELLYMOSER_8 = 5; + public static final int SOUNDFORMAT_NELLYMOSER = 6; + public static final int SOUNDFORMAT_SPEEX = 11; + public static final int SOUNDRATE_5K5 = 0; + public static final int SOUNDRATE_11K = 1; + public static final int SOUNDRATE_22K = 2; + public static final int SOUNDRATE_44K = 3; + public static final int SOUNDSIZE_8BIT = 0; + public static final int SOUNDSIZE_16BIT = 1; + public static final int SOUNDTYPE_MONO = 0; + public static final int SOUNDTYPE_STEREO = 1; + public int soundFormat; + public int soundRate; + public boolean soundSize; + public boolean soundType; + public byte[] soundData; + + public AUDIODATA(int soundFormat, int soundRate, boolean soundSize, boolean soundType, byte[] soundData) { + this.soundFormat = soundFormat; + this.soundRate = soundRate; + this.soundSize = soundSize; + this.soundType = soundType; + this.soundData = soundData; + } + + @Override + public byte[] getBytes() { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + FLVOutputStream flv = new FLVOutputStream(baos); + flv.writeUB(4, soundFormat); + flv.writeUB(2, soundRate); + flv.writeUB(1, soundSize ? 1 : 0); + flv.writeUB(1, soundType ? 1 : 0); + flv.write(soundData); + } catch (IOException ex) { + //ignore + } + return baos.toByteArray(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/DATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/DATA.java new file mode 100644 index 000000000..4d7869320 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/DATA.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public abstract class DATA { + + public abstract byte[] getBytes(); +} diff --git a/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java similarity index 88% rename from src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java index 0512ae3c4..071cad452 100644 --- a/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java @@ -1,262 +1,261 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -import com.jpexs.helpers.utf8.Utf8Helper; -import java.io.IOException; -import java.io.OutputStream; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class FLVOutputStream extends OutputStream { - - private final OutputStream os; - private int bitPos = 0; - private int tempByte = 0; - private long pos = 0; - - public FLVOutputStream(OutputStream os) { - this.os = os; - } - - public long getPos() { - return pos; - } - - /** - * Writes byte to the stream - * - * @param b byte to write - * @throws IOException - */ - @Override - public void write(int b) throws IOException { - alignByte(); - os.write(b); - pos++; - } - - private void alignByte() throws IOException { - if (bitPos > 0) { - bitPos = 0; - write(tempByte); - tempByte = 0; - } - } - - /** - * Writes UI8 (Unsigned 8bit integer) value to the stream - * - * @param val UI8 value to write - * @throws IOException - */ - public void writeUI8(int val) throws IOException { - write(val); - } - - /** - * Writes UI24 (Unsigned 24bit integer) value to the stream - * - * @param value UI32 value - * @throws IOException - */ - public void writeUI24(long value) throws IOException { - write((int) ((value >> 16) & 0xff)); - write((int) ((value >> 8) & 0xff)); - write((int) (value & 0xff)); - - } - - /** - * Writes UI32 (Unsigned 32bit integer) value to the stream - * - * @param value UI32 value - * @throws IOException - */ - public void writeUI32(long value) throws IOException { - write((int) ((value >> 24) & 0xff)); - write((int) ((value >> 16) & 0xff)); - write((int) ((value >> 8) & 0xff)); - write((int) (value & 0xff)); - } - - /** - * Writes UI16 (Unsigned 16bit integer) value to the stream - * - * @param value UI16 value - * @throws IOException - */ - public void writeUI16(int value) throws IOException { - write((int) ((value >> 8) & 0xff)); - write((int) (value & 0xff)); - } - - /** - * Writes UB[nBits] (Unsigned-bit value) value to the stream - * - * @param nBits Number of bits which represent value - * @param value Unsigned value to write - * @throws IOException - */ - public void writeUB(int nBits, long value) throws IOException { - for (int bit = 0; bit < nBits; bit++) { - int nb = (int) ((value >> (nBits - 1 - bit)) & 1); - tempByte += nb * (1 << (7 - bitPos)); - bitPos++; - if (bitPos == 8) { - bitPos = 0; - write(tempByte); - tempByte = 0; - } - } - } - - public void writeHeader(boolean audio, boolean video) throws IOException { - write("FLV".getBytes()); - write(1); //version - writeUB(5, 0); //must be 0 - writeUB(1, audio ? 1 : 0); //audio present - writeUB(1, 0); //reserved - writeUB(1, video ? 1 : 0); //video present - writeUI32(9); //header size - writeUI32(0); - } - - public void writeTag(FLVTAG tag) throws IOException { - long posBefore = getPos(); - writeUI8(tag.tagType); - byte[] data = tag.data.getBytes(); - writeUI24(data.length); - writeUI24(tag.timeStamp & 0xffffff); - writeUI8((int) ((tag.timeStamp >> 24) & 0xff)); - writeUI24(0); - write(data); //codecId 4, frameType 1 - long posAfter = getPos(); - long size = posAfter - posBefore; - writeUI32(size); - } - - public void writeSCRIPTDATASTRING(String s) throws IOException { - byte[] bytes = Utf8Helper.getBytes(s); - writeUI16(bytes.length); - write(bytes); - } - - public void writeSCRIPTDATALONGSTRING(String s) throws IOException { - byte[] bytes = Utf8Helper.getBytes(s); - writeUI32(bytes.length); - write(bytes); - } - - private void writeLong(long value) throws IOException { - byte[] writeBuffer = new byte[8]; - writeBuffer[3] = (byte) (value >>> 56); - writeBuffer[2] = (byte) (value >>> 48); - writeBuffer[1] = (byte) (value >>> 40); - writeBuffer[0] = (byte) (value >>> 32); - writeBuffer[7] = (byte) (value >>> 24); - writeBuffer[6] = (byte) (value >>> 16); - writeBuffer[5] = (byte) (value >>> 8); - writeBuffer[4] = (byte) (value); - write(writeBuffer); - } - - public void writeDOUBLE(double value) throws IOException { - writeLong(Double.doubleToLongBits(value)); - } - - public void writeSCRIPTDATAOBJECT(SCRIPTDATAOBJECT o) throws IOException { - writeSCRIPTDATASTRING(o.objectName); - writeSCRIPTDATAVALUE(o.objectData); - } - - public void writeSCRIPTDATAVARIABLE(SCRIPTDATAVARIABLE v) throws IOException { - writeSCRIPTDATASTRING(v.variableName); - writeSCRIPTDATAVALUE(v.variableData); - } - - public void writeSCRIPTDATAVALUE(SCRIPTDATAVALUE v) throws IOException { - writeUI8(v.type); - switch (v.type) { - case 0: - writeDOUBLE((double) (Double) v.value); - break; - case 1: - writeUI8((boolean) (Boolean) v.value ? 1 : 0); - break; - case 2: - writeSCRIPTDATASTRING((String) v.value); - break; - case 3: - @SuppressWarnings("unchecked") List objects = (List) v.value; - for (SCRIPTDATAOBJECT o : objects) { - writeSCRIPTDATAOBJECT(o); - } - writeUI24(9);//SCRIPTDATAOBJECTEND - break; - case 4: - writeSCRIPTDATASTRING((String) v.value); - break; - case 5: - //null - break; - case 6: - //undefined - break; - case 7: - writeUI16((int) (Integer) v.value); - break; - case 8: - @SuppressWarnings("unchecked") List variables = (List) v.value; - writeUI32(variables.size()); - for (SCRIPTDATAVARIABLE var : variables) { - writeSCRIPTDATAVARIABLE(var); - } - writeUI24(9);//SCRIPTDATAVARIABLEEND - break; - case 9: - //reserved - break; - case 10: - @SuppressWarnings("unchecked") List stvariables = (List) v.value; - writeUI32(stvariables.size()); - for (SCRIPTDATAVARIABLE var : stvariables) { - writeSCRIPTDATAVARIABLE(var); - } - break; - case 11: - writeSCRIPTDATADATE((SCRIPTDATADATE) v.value); - break; - case 12: - writeSCRIPTDATALONGSTRING((String) v.value); - break; - - } - } - - public void writeSI16(int value) throws IOException { - writeUI16(value); - } - - public void writeSCRIPTDATADATE(SCRIPTDATADATE d) throws IOException { - writeDOUBLE(d.dateTime); - writeSI16(d.localDateTimeOffset); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +import com.jpexs.helpers.utf8.Utf8Helper; +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class FLVOutputStream extends OutputStream { + + private final OutputStream os; + private int bitPos = 0; + private int tempByte = 0; + private long pos = 0; + + public FLVOutputStream(OutputStream os) { + this.os = os; + } + + public long getPos() { + return pos; + } + + /** + * Writes byte to the stream + * + * @param b byte to write + * @throws IOException + */ + @Override + public void write(int b) throws IOException { + alignByte(); + os.write(b); + pos++; + } + + private void alignByte() throws IOException { + if (bitPos > 0) { + bitPos = 0; + write(tempByte); + tempByte = 0; + } + } + + /** + * Writes UI8 (Unsigned 8bit integer) value to the stream + * + * @param val UI8 value to write + * @throws IOException + */ + public void writeUI8(int val) throws IOException { + write(val); + } + + /** + * Writes UI24 (Unsigned 24bit integer) value to the stream + * + * @param value UI32 value + * @throws IOException + */ + public void writeUI24(long value) throws IOException { + write((int) ((value >> 16) & 0xff)); + write((int) ((value >> 8) & 0xff)); + write((int) (value & 0xff)); + + } + + /** + * Writes UI32 (Unsigned 32bit integer) value to the stream + * + * @param value UI32 value + * @throws IOException + */ + public void writeUI32(long value) throws IOException { + write((int) ((value >> 24) & 0xff)); + write((int) ((value >> 16) & 0xff)); + write((int) ((value >> 8) & 0xff)); + write((int) (value & 0xff)); + } + + /** + * Writes UI16 (Unsigned 16bit integer) value to the stream + * + * @param value UI16 value + * @throws IOException + */ + public void writeUI16(int value) throws IOException { + write((int) ((value >> 8) & 0xff)); + write((int) (value & 0xff)); + } + + /** + * Writes UB[nBits] (Unsigned-bit value) value to the stream + * + * @param nBits Number of bits which represent value + * @param value Unsigned value to write + * @throws IOException + */ + public void writeUB(int nBits, long value) throws IOException { + for (int bit = 0; bit < nBits; bit++) { + int nb = (int) ((value >> (nBits - 1 - bit)) & 1); + tempByte += nb * (1 << (7 - bitPos)); + bitPos++; + if (bitPos == 8) { + bitPos = 0; + write(tempByte); + tempByte = 0; + } + } + } + + public void writeHeader(boolean audio, boolean video) throws IOException { + write("FLV".getBytes()); + write(1); //version + writeUB(5, 0); //must be 0 + writeUB(1, audio ? 1 : 0); //audio present + writeUB(1, 0); //reserved + writeUB(1, video ? 1 : 0); //video present + writeUI32(9); //header size + writeUI32(0); + } + + public void writeTag(FLVTAG tag) throws IOException { + long posBefore = getPos(); + writeUI8(tag.tagType); + byte[] data = tag.data.getBytes(); + writeUI24(data.length); + writeUI24(tag.timeStamp & 0xffffff); + writeUI8((int) ((tag.timeStamp >> 24) & 0xff)); + writeUI24(0); + write(data); //codecId 4, frameType 1 + long posAfter = getPos(); + long size = posAfter - posBefore; + writeUI32(size); + } + + public void writeSCRIPTDATASTRING(String s) throws IOException { + byte[] bytes = Utf8Helper.getBytes(s); + writeUI16(bytes.length); + write(bytes); + } + + public void writeSCRIPTDATALONGSTRING(String s) throws IOException { + byte[] bytes = Utf8Helper.getBytes(s); + writeUI32(bytes.length); + write(bytes); + } + + private void writeLong(long value) throws IOException { + byte[] writeBuffer = new byte[8]; + writeBuffer[3] = (byte) (value >>> 56); + writeBuffer[2] = (byte) (value >>> 48); + writeBuffer[1] = (byte) (value >>> 40); + writeBuffer[0] = (byte) (value >>> 32); + writeBuffer[7] = (byte) (value >>> 24); + writeBuffer[6] = (byte) (value >>> 16); + writeBuffer[5] = (byte) (value >>> 8); + writeBuffer[4] = (byte) (value); + write(writeBuffer); + } + + public void writeDOUBLE(double value) throws IOException { + writeLong(Double.doubleToLongBits(value)); + } + + public void writeSCRIPTDATAOBJECT(SCRIPTDATAOBJECT o) throws IOException { + writeSCRIPTDATASTRING(o.objectName); + writeSCRIPTDATAVALUE(o.objectData); + } + + public void writeSCRIPTDATAVARIABLE(SCRIPTDATAVARIABLE v) throws IOException { + writeSCRIPTDATASTRING(v.variableName); + writeSCRIPTDATAVALUE(v.variableData); + } + + public void writeSCRIPTDATAVALUE(SCRIPTDATAVALUE v) throws IOException { + writeUI8(v.type); + switch (v.type) { + case 0: + writeDOUBLE((double) (Double) v.value); + break; + case 1: + writeUI8((boolean) (Boolean) v.value ? 1 : 0); + break; + case 2: + writeSCRIPTDATASTRING((String) v.value); + break; + case 3: + @SuppressWarnings("unchecked") List objects = (List) v.value; + for (SCRIPTDATAOBJECT o : objects) { + writeSCRIPTDATAOBJECT(o); + } + writeUI24(9);//SCRIPTDATAOBJECTEND + break; + case 4: + writeSCRIPTDATASTRING((String) v.value); + break; + case 5: + //null + break; + case 6: + //undefined + break; + case 7: + writeUI16((int) (Integer) v.value); + break; + case 8: + @SuppressWarnings("unchecked") List variables = (List) v.value; + writeUI32(variables.size()); + for (SCRIPTDATAVARIABLE var : variables) { + writeSCRIPTDATAVARIABLE(var); + } + writeUI24(9);//SCRIPTDATAVARIABLEEND + break; + case 9: + //reserved + break; + case 10: + @SuppressWarnings("unchecked") List stvariables = (List) v.value; + writeUI32(stvariables.size()); + for (SCRIPTDATAVARIABLE var : stvariables) { + writeSCRIPTDATAVARIABLE(var); + } + break; + case 11: + writeSCRIPTDATADATE((SCRIPTDATADATE) v.value); + break; + case 12: + writeSCRIPTDATALONGSTRING((String) v.value); + break; + + } + } + + public void writeSI16(int value) throws IOException { + writeUI16(value); + } + + public void writeSCRIPTDATADATE(SCRIPTDATADATE d) throws IOException { + writeDOUBLE(d.dateTime); + writeSI16(d.localDateTimeOffset); + } +} diff --git a/src/com/jpexs/decompiler/flash/flv/FLVTAG.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVTAG.java similarity index 51% rename from src/com/jpexs/decompiler/flash/flv/FLVTAG.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVTAG.java index 3f4ffd026..ecd17c12c 100644 --- a/src/com/jpexs/decompiler/flash/flv/FLVTAG.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/FLVTAG.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public class FLVTAG { - - public int tagType; - public long timeStamp; - public DATA data; - public static final int DATATYPE_VIDEO = 9; - public static final int DATATYPE_AUDIO = 8; - public static final int DATATYPE_SCRIPT_DATA = 18; - - public FLVTAG(long timeStamp, SCRIPTDATA data) { - tagType = DATATYPE_SCRIPT_DATA; - this.data = data; - } - - public FLVTAG(long timeStamp, VIDEODATA data) { - this.tagType = DATATYPE_VIDEO; - this.timeStamp = timeStamp; - this.data = data; - } - - public FLVTAG(long timeStamp, AUDIODATA data) { - this.tagType = DATATYPE_AUDIO; - this.timeStamp = timeStamp; - this.data = data; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public class FLVTAG { + + public int tagType; + public long timeStamp; + public DATA data; + public static final int DATATYPE_VIDEO = 9; + public static final int DATATYPE_AUDIO = 8; + public static final int DATATYPE_SCRIPT_DATA = 18; + + public FLVTAG(long timeStamp, SCRIPTDATA data) { + tagType = DATATYPE_SCRIPT_DATA; + this.data = data; + } + + public FLVTAG(long timeStamp, VIDEODATA data) { + this.tagType = DATATYPE_VIDEO; + this.timeStamp = timeStamp; + this.data = data; + } + + public FLVTAG(long timeStamp, AUDIODATA data) { + this.tagType = DATATYPE_AUDIO; + this.timeStamp = timeStamp; + this.data = data; + } +} diff --git a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java similarity index 77% rename from src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java index 26eeb3640..a9830b635 100644 --- a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATA.java @@ -1,72 +1,71 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - */ -public class SCRIPTDATA extends DATA { - - public List data; - - public SCRIPTDATA(List data) { - this.data = data; - } - - @Override - public byte[] getBytes() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (FLVOutputStream fos = new FLVOutputStream(baos)) { - for (SCRIPTDATAOBJECT d : data) { - fos.writeSCRIPTDATAOBJECT(d); - } - fos.writeUI24(9); //SCRIPTDATAOBJECTEND - } catch (IOException ex) { - Logger.getLogger(SCRIPTDATA.class.getName()).log(Level.SEVERE, "i/o error", ex); - } - return baos.toByteArray(); - } - - public static SCRIPTDATA onMetaData(double duration, double width, double height, double videodatarate, double framerate, double videocodecid, double audiosamplerate, double audiosamplesize, boolean stereo, double audiocodecid, double filesize) { - List list = new ArrayList<>(); - List values = new ArrayList<>(); - values.add(new SCRIPTDATAVARIABLE("duration", new SCRIPTDATAVALUE(duration))); - values.add(new SCRIPTDATAVARIABLE("width", new SCRIPTDATAVALUE(width))); - values.add(new SCRIPTDATAVARIABLE("height", new SCRIPTDATAVALUE(height))); - values.add(new SCRIPTDATAVARIABLE("videodatarate", new SCRIPTDATAVALUE(videodatarate))); - values.add(new SCRIPTDATAVARIABLE("framerate", new SCRIPTDATAVALUE(framerate))); - values.add(new SCRIPTDATAVARIABLE("videocodecid", new SCRIPTDATAVALUE(videocodecid))); - values.add(new SCRIPTDATAVARIABLE("audiosamplerate", new SCRIPTDATAVALUE(audiosamplerate))); - values.add(new SCRIPTDATAVARIABLE("audiosamplesize", new SCRIPTDATAVALUE(audiosamplesize))); - values.add(new SCRIPTDATAVARIABLE("stereo", new SCRIPTDATAVALUE(stereo))); - values.add(new SCRIPTDATAVARIABLE("audiocodecid", new SCRIPTDATAVALUE(audiocodecid))); - values.add(new SCRIPTDATAVARIABLE("filesize", new SCRIPTDATAVALUE(filesize))); - SCRIPTDATAVALUE valuesList = new SCRIPTDATAVALUE(8, values); - SCRIPTDATAOBJECT metaData = new SCRIPTDATAOBJECT("onMetaData", valuesList); - list.add(metaData); - SCRIPTDATA ret = new SCRIPTDATA(list); - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + */ +public class SCRIPTDATA extends DATA { + + public List data; + + public SCRIPTDATA(List data) { + this.data = data; + } + + @Override + public byte[] getBytes() { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (FLVOutputStream fos = new FLVOutputStream(baos)) { + for (SCRIPTDATAOBJECT d : data) { + fos.writeSCRIPTDATAOBJECT(d); + } + fos.writeUI24(9); //SCRIPTDATAOBJECTEND + } catch (IOException ex) { + Logger.getLogger(SCRIPTDATA.class.getName()).log(Level.SEVERE, "i/o error", ex); + } + return baos.toByteArray(); + } + + public static SCRIPTDATA onMetaData(double duration, double width, double height, double videodatarate, double framerate, double videocodecid, double audiosamplerate, double audiosamplesize, boolean stereo, double audiocodecid, double filesize) { + List list = new ArrayList<>(); + List values = new ArrayList<>(); + values.add(new SCRIPTDATAVARIABLE("duration", new SCRIPTDATAVALUE(duration))); + values.add(new SCRIPTDATAVARIABLE("width", new SCRIPTDATAVALUE(width))); + values.add(new SCRIPTDATAVARIABLE("height", new SCRIPTDATAVALUE(height))); + values.add(new SCRIPTDATAVARIABLE("videodatarate", new SCRIPTDATAVALUE(videodatarate))); + values.add(new SCRIPTDATAVARIABLE("framerate", new SCRIPTDATAVALUE(framerate))); + values.add(new SCRIPTDATAVARIABLE("videocodecid", new SCRIPTDATAVALUE(videocodecid))); + values.add(new SCRIPTDATAVARIABLE("audiosamplerate", new SCRIPTDATAVALUE(audiosamplerate))); + values.add(new SCRIPTDATAVARIABLE("audiosamplesize", new SCRIPTDATAVALUE(audiosamplesize))); + values.add(new SCRIPTDATAVARIABLE("stereo", new SCRIPTDATAVALUE(stereo))); + values.add(new SCRIPTDATAVARIABLE("audiocodecid", new SCRIPTDATAVALUE(audiocodecid))); + values.add(new SCRIPTDATAVARIABLE("filesize", new SCRIPTDATAVALUE(filesize))); + SCRIPTDATAVALUE valuesList = new SCRIPTDATAVALUE(8, values); + SCRIPTDATAOBJECT metaData = new SCRIPTDATAOBJECT("onMetaData", valuesList); + list.add(metaData); + SCRIPTDATA ret = new SCRIPTDATA(list); + return ret; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java new file mode 100644 index 000000000..eb86cf739 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public class SCRIPTDATADATE { + + public double dateTime; + public int localDateTimeOffset; + + public SCRIPTDATADATE(double dateTime, int localDateTimeOffset) { + this.dateTime = dateTime; + this.localDateTimeOffset = localDateTimeOffset; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java new file mode 100644 index 000000000..4a7ca254f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public class SCRIPTDATAOBJECT { + + public String objectName; + public SCRIPTDATAVALUE objectData; + + public SCRIPTDATAOBJECT(String objectName, SCRIPTDATAVALUE objectData) { + this.objectName = objectName; + this.objectData = objectData; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java new file mode 100644 index 000000000..1fb3e1ad7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public class SCRIPTDATAVALUE { + + public int type; + public Object value; + + public SCRIPTDATAVALUE(int type, Object value) { + this.type = type; + this.value = value; + } + + public SCRIPTDATAVALUE(boolean b) { + this.value = (Boolean) b; + type = 1; + } + + public SCRIPTDATAVALUE(double d) { + this.value = (Double) d; + type = 0; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java new file mode 100644 index 000000000..2999d6e32 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +/** + * + * @author JPEXS + */ +public class SCRIPTDATAVARIABLE { + + public String variableName; + public SCRIPTDATAVALUE variableData; + + public SCRIPTDATAVARIABLE(String variableName, SCRIPTDATAVALUE variableData) { + this.variableName = variableName; + this.variableData = variableData; + } +} diff --git a/src/com/jpexs/decompiler/flash/flv/VIDEODATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/VIDEODATA.java similarity index 53% rename from src/com/jpexs/decompiler/flash/flv/VIDEODATA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/VIDEODATA.java index 5559df0ef..e1c2ba4f3 100644 --- a/src/com/jpexs/decompiler/flash/flv/VIDEODATA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/flv/VIDEODATA.java @@ -1,51 +1,50 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public class VIDEODATA extends DATA { - - public int frameType; - public int codecId; - public byte[] videoData; - - public VIDEODATA(int frameType, int codecId, byte[] videoData) { - this.frameType = frameType; - this.codecId = codecId; - this.videoData = videoData; - } - - @Override - public byte[] getBytes() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try { - FLVOutputStream flv = new FLVOutputStream(baos); - flv.writeUB(4, frameType); - flv.writeUB(4, codecId); - flv.write(videoData); - } catch (IOException ex) { - //ignore - } - return baos.toByteArray(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.flv; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public class VIDEODATA extends DATA { + + public int frameType; + public int codecId; + public byte[] videoData; + + public VIDEODATA(int frameType, int codecId, byte[] videoData) { + this.frameType = frameType; + this.codecId = codecId; + this.videoData = videoData; + } + + @Override + public byte[] getBytes() { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + FLVOutputStream flv = new FLVOutputStream(baos); + flv.writeUB(4, frameType); + flv.writeUB(4, codecId); + flv.write(videoData); + } catch (IOException ex) { + //ignore + } + return baos.toByteArray(); + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java similarity index 75% rename from src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java index 2c794aef5..bba3df8d8 100644 --- a/src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/CodeFormatting.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -/** - * - * @author JPEXS - */ -public class CodeFormatting { - - public String newLineChars = "\r\n"; - public String indentString = " "; - public boolean beginBlockOnNewLine = true; - - // spaces - // before parentheses - public boolean spaceBeforeParenthesesMethodCallParentheses = false; - public boolean spaceBeforeParenthesesMethodCallEmptyParentheses = false; - public boolean spaceBeforeArrayAccessBrackets = false; - public boolean spaceBeforeParenthesesMethodDeclarationParentheses = false; - public boolean spaceBeforeParenthesesMethodDeclarationEmptyParentheses = false; - public boolean spaceBeforeParenthesesIfParentheses = false; - public boolean spaceBeforeParenthesesWithParentheses = false; - public boolean spaceBeforeParenthesesWhileParentheses = false; - public boolean spaceBeforeParenthesesCatchParentheses = false; - public boolean spaceBeforeParenthesesSwitchParentheses = false; - public boolean spaceBeforeParenthesesForParentheses = false; - public boolean spaceBeforeParenthesesForEachParentheses = false; - - // around operators - public boolean spaceAroundOperatorsAssignmentOperators = false; // =, +=,... - public boolean spaceAroundOperatorsLogicalOperators = false; // &&, || - public boolean spaceAroundOperatorsEqualityOperators = false; // ==, != - public boolean spaceAroundOperatorsRelationalOperator = false; // <, >, <=, >= - public boolean spaceAroundOperatorsBitwiseOperator = false; // &, |, ^ - public boolean spaceAroundOperatorsAdditiveOperator = false; // +, - - public boolean spaceAroundOperatorsMultiplicativeOperator = false; // *, /, % - public boolean spaceAroundOperatorsShiftOperator = false; // <<, >> -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +/** + * + * @author JPEXS + */ +public class CodeFormatting { + + public String newLineChars = "\r\n"; + public String indentString = " "; + public boolean beginBlockOnNewLine = true; + + // spaces + // before parentheses + public boolean spaceBeforeParenthesesMethodCallParentheses = false; + public boolean spaceBeforeParenthesesMethodCallEmptyParentheses = false; + public boolean spaceBeforeArrayAccessBrackets = false; + public boolean spaceBeforeParenthesesMethodDeclarationParentheses = false; + public boolean spaceBeforeParenthesesMethodDeclarationEmptyParentheses = false; + public boolean spaceBeforeParenthesesIfParentheses = false; + public boolean spaceBeforeParenthesesWithParentheses = false; + public boolean spaceBeforeParenthesesWhileParentheses = false; + public boolean spaceBeforeParenthesesCatchParentheses = false; + public boolean spaceBeforeParenthesesSwitchParentheses = false; + public boolean spaceBeforeParenthesesForParentheses = false; + public boolean spaceBeforeParenthesesForEachParentheses = false; + + // around operators + public boolean spaceAroundOperatorsAssignmentOperators = false; // =, +=,... + public boolean spaceAroundOperatorsLogicalOperators = false; // &&, || + public boolean spaceAroundOperatorsEqualityOperators = false; // ==, != + public boolean spaceAroundOperatorsRelationalOperator = false; // <, >, <=, >= + public boolean spaceAroundOperatorsBitwiseOperator = false; // &, |, ^ + public boolean spaceAroundOperatorsAdditiveOperator = false; // +, - + public boolean spaceAroundOperatorsMultiplicativeOperator = false; // *, /, % + public boolean spaceAroundOperatorsShiftOperator = false; // <<, >> +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java new file mode 100644 index 000000000..bfb8bac56 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.action.ActionList; + +/** + * + * @author JPEXS + */ +public class EmptySWFDecompilerListener implements SWFDecompilerListener { + + @Override + public void actionListParsed(ActionList actions, SWF swf) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff --git a/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java similarity index 76% rename from src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java index 6956da598..8479ba44f 100644 --- a/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java @@ -1,132 +1,131 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.helpers.utf8.Utf8OutputStreamWriter; -import java.io.BufferedWriter; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.Writer; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class FileTextWriter extends GraphTextWriter implements AutoCloseable { - - private final Writer writer; - private boolean newLine = true; - private int indent; - private int writtenBytes; - - public FileTextWriter(CodeFormatting formatting, FileOutputStream fos) { - super(formatting); - this.writer = new BufferedWriter(new Utf8OutputStreamWriter(fos)); - } - - @Override - public FileTextWriter hilightSpecial(String text, String type) { - writeToFile(text); - return this; - } - - @Override - public FileTextWriter hilightSpecial(String text, String type, int index) { - writeToFile(text); - return this; - } - - @Override - public FileTextWriter append(String str) { - writeToFile(str); - return this; - } - - @Override - public FileTextWriter append(String str, long offset) { - writeToFile(str); - return this; - } - - @Override - public FileTextWriter appendNoHilight(int i) { - writeToFile(Integer.toString(i)); - return this; - } - - @Override - public FileTextWriter appendNoHilight(String str) { - writeToFile(str); - return this; - } - - @Override - public FileTextWriter indent() { - indent++; - return this; - } - - @Override - public FileTextWriter unindent() { - indent--; - return this; - } - - @Override - public FileTextWriter newLine() { - writeToFile(formatting.newLineChars); - newLine = true; - return this; - } - - @Override - public int getLength() { - return writtenBytes; - } - - @Override - public int getIndent() { - return indent; - } - - private void writeToFile(String str) { - if (newLine) { - newLine = false; - appendIndent(); - } - try { - writer.write(str); - writtenBytes += str.length(); - } catch (IOException ex) { - Logger.getLogger(FileTextWriter.class.getName()).log(Level.SEVERE, null, ex); - } - } - - private void appendIndent() { - for (int i = 0; i < indent; i++) { - writeToFile(formatting.indentString); - } - } - - @Override - public void close() throws IOException { - writer.close(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.helpers.utf8.Utf8OutputStreamWriter; +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Writer; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class FileTextWriter extends GraphTextWriter implements AutoCloseable { + + private final Writer writer; + private boolean newLine = true; + private int indent; + private int writtenBytes; + + public FileTextWriter(CodeFormatting formatting, FileOutputStream fos) { + super(formatting); + this.writer = new BufferedWriter(new Utf8OutputStreamWriter(fos)); + } + + @Override + public FileTextWriter hilightSpecial(String text, String type) { + writeToFile(text); + return this; + } + + @Override + public FileTextWriter hilightSpecial(String text, String type, int index) { + writeToFile(text); + return this; + } + + @Override + public FileTextWriter append(String str) { + writeToFile(str); + return this; + } + + @Override + public FileTextWriter append(String str, long offset) { + writeToFile(str); + return this; + } + + @Override + public FileTextWriter appendNoHilight(int i) { + writeToFile(Integer.toString(i)); + return this; + } + + @Override + public FileTextWriter appendNoHilight(String str) { + writeToFile(str); + return this; + } + + @Override + public FileTextWriter indent() { + indent++; + return this; + } + + @Override + public FileTextWriter unindent() { + indent--; + return this; + } + + @Override + public FileTextWriter newLine() { + writeToFile(formatting.newLineChars); + newLine = true; + return this; + } + + @Override + public int getLength() { + return writtenBytes; + } + + @Override + public int getIndent() { + return indent; + } + + private void writeToFile(String str) { + if (newLine) { + newLine = false; + appendIndent(); + } + try { + writer.write(str); + writtenBytes += str.length(); + } catch (IOException ex) { + Logger.getLogger(FileTextWriter.class.getName()).log(Level.SEVERE, null, ex); + } + } + + private void appendIndent() { + for (int i = 0; i < indent; i++) { + writeToFile(formatting.indentString); + } + } + + @Override + public void close() throws IOException { + writer.close(); + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/FontHelper.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FontHelper.java similarity index 62% rename from src/com/jpexs/decompiler/flash/helpers/FontHelper.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FontHelper.java index 9056aeeb8..7a55e8240 100644 --- a/src/com/jpexs/decompiler/flash/helpers/FontHelper.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FontHelper.java @@ -1,46 +1,45 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.sun.jna.Platform; -import java.awt.GraphicsEnvironment; -import java.util.Locale; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - */ -public class FontHelper { - - public static String[] getInstalledFontFamilyNames() { - // todo: cannot load newly installed fonts, so this feature is disabled until i find a solution for font loading problem - if (Platform.isWindows()) { - try { - Class clW32Fm = Class.forName("sun.awt.Win32FontManager"); - Class clSunFm = Class.forName("sun.font.SunFontManager"); - Object fm = clW32Fm.newInstance(); - return (String[]) clSunFm.getDeclaredMethod("getInstalledFontFamilyNames", Locale.class).invoke(fm, Locale.getDefault()); - } catch (Throwable ex) { - // catch everything to avoid class not found problems, because Win32FontManager is an internal proprietary API - Logger.getLogger(FontHelper.class.getName()).log(Level.SEVERE, null, ex); - } - } - return GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.sun.jna.Platform; +import java.awt.GraphicsEnvironment; +import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + */ +public class FontHelper { + + public static String[] getInstalledFontFamilyNames() { + // todo: cannot load newly installed fonts, so this feature is disabled until i find a solution for font loading problem + if (Platform.isWindows()) { + try { + Class clW32Fm = Class.forName("sun.awt.Win32FontManager"); + Class clSunFm = Class.forName("sun.font.SunFontManager"); + Object fm = clW32Fm.newInstance(); + return (String[]) clSunFm.getDeclaredMethod("getInstalledFontFamilyNames", Locale.class).invoke(fm, Locale.getDefault()); + } catch (Throwable ex) { + // catch everything to avoid class not found problems, because Win32FontManager is an internal proprietary API + Logger.getLogger(FontHelper.class.getName()).log(Level.SEVERE, null, ex); + } + } + return GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/Freed.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/Freed.java new file mode 100644 index 000000000..070f50f97 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/Freed.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +/** + * + * @author JPEXS + */ +public interface Freed { + + public boolean isFreeing(); + + public void free(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java new file mode 100644 index 000000000..bd71903b4 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.graph.GraphSourceItem; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class GraphSourceItemPosition { + + public GraphSourceItem graphSourceItem; + public int position; + +} diff --git a/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java similarity index 81% rename from src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java index 542105a50..bb40a696a 100644 --- a/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java @@ -1,193 +1,192 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.graph.GraphSourceItem; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public abstract class GraphTextWriter { - - protected long startTime; - protected long suspendTime; - protected CodeFormatting formatting; - - public CodeFormatting getFormatting() { - return formatting; - } - - public GraphTextWriter(CodeFormatting formatting) { - startTime = System.currentTimeMillis(); - this.formatting = formatting; - } - - public boolean getIsHighlighted() { - return false; - } - - /** - * Highlights specified text as instruction - * - * @param src - * @param pos Offset of instruction - * @return GraphTextWriter - */ - public GraphTextWriter startOffset(GraphSourceItem src, int pos) { - return this; - } - - public GraphTextWriter endOffset() { - return this; - } - - /** - * Highlights specified text as method - * - * @param index MethodInfo index - * @return GraphTextWriter - */ - public GraphTextWriter startMethod(long index) { - return this; - } - - public GraphTextWriter endMethod() { - return this; - } - - /** - * Highlights specified text as class - * - * @param index Class index - * @return GraphTextWriter - */ - public GraphTextWriter startClass(long index) { - return this; - } - - public GraphTextWriter endClass() { - return this; - } - - /** - * Highlights specified text as trait - * - * @param index Trait index - * @return GraphTextWriter - */ - public GraphTextWriter startTrait(long index) { - return this; - } - - public GraphTextWriter endTrait() { - return this; - } - - public GraphTextWriter hilightSpecial(String text, String type) { - return this; - } - - public GraphTextWriter hilightSpecial(String text, String type, int index) { - return this; - } - - public static String hilighOffset(String text, long offset) { - return ""; - } - - public abstract GraphTextWriter append(String str); - - public abstract GraphTextWriter append(String str, long offset); - - public abstract GraphTextWriter appendNoHilight(int i); - - public abstract GraphTextWriter appendNoHilight(String str); - - public GraphTextWriter indent() { - return this; - } - - public GraphTextWriter unindent() { - return this; - } - - public GraphTextWriter newLine() { - return this; - } - - public int getLength() { - return 0; - } - - public int getIndent() { - return 0; - } - - public void suspendMeasure() { - suspendTime = System.currentTimeMillis(); - } - - public void continueMeasure() { - long time = System.currentTimeMillis(); - startTime += time - suspendTime; - } - - @Override - public String toString() { - return ""; - } - - private GraphTextWriter startBlock(String opening) { - if (formatting.beginBlockOnNewLine) { - newLine(); - } else { - append(" "); - } - return append(opening).newLine().indent(); - } - - public GraphTextWriter startBlock() { - return startBlock("{"); - } - - private GraphTextWriter endBlock(String closing) { - return unindent().append(closing); - } - - public GraphTextWriter endBlock() { - return endBlock("}"); - } - - public GraphTextWriter space() { - return append(" "); - } - - public GraphTextWriter spaceBeforeCallParenthesies(int argCount) { - if (argCount > 0) { - if (formatting.spaceBeforeParenthesesMethodCallParentheses) { - space(); - } - } else { - if (formatting.spaceBeforeParenthesesMethodCallEmptyParentheses) { - space(); - } - } - return this; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.graph.GraphSourceItem; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public abstract class GraphTextWriter { + + protected long startTime; + protected long suspendTime; + protected CodeFormatting formatting; + + public CodeFormatting getFormatting() { + return formatting; + } + + public GraphTextWriter(CodeFormatting formatting) { + startTime = System.currentTimeMillis(); + this.formatting = formatting; + } + + public boolean getIsHighlighted() { + return false; + } + + /** + * Highlights specified text as instruction + * + * @param src + * @param pos Offset of instruction + * @return GraphTextWriter + */ + public GraphTextWriter startOffset(GraphSourceItem src, int pos) { + return this; + } + + public GraphTextWriter endOffset() { + return this; + } + + /** + * Highlights specified text as method + * + * @param index MethodInfo index + * @return GraphTextWriter + */ + public GraphTextWriter startMethod(long index) { + return this; + } + + public GraphTextWriter endMethod() { + return this; + } + + /** + * Highlights specified text as class + * + * @param index Class index + * @return GraphTextWriter + */ + public GraphTextWriter startClass(long index) { + return this; + } + + public GraphTextWriter endClass() { + return this; + } + + /** + * Highlights specified text as trait + * + * @param index Trait index + * @return GraphTextWriter + */ + public GraphTextWriter startTrait(long index) { + return this; + } + + public GraphTextWriter endTrait() { + return this; + } + + public GraphTextWriter hilightSpecial(String text, String type) { + return this; + } + + public GraphTextWriter hilightSpecial(String text, String type, int index) { + return this; + } + + public static String hilighOffset(String text, long offset) { + return ""; + } + + public abstract GraphTextWriter append(String str); + + public abstract GraphTextWriter append(String str, long offset); + + public abstract GraphTextWriter appendNoHilight(int i); + + public abstract GraphTextWriter appendNoHilight(String str); + + public GraphTextWriter indent() { + return this; + } + + public GraphTextWriter unindent() { + return this; + } + + public GraphTextWriter newLine() { + return this; + } + + public int getLength() { + return 0; + } + + public int getIndent() { + return 0; + } + + public void suspendMeasure() { + suspendTime = System.currentTimeMillis(); + } + + public void continueMeasure() { + long time = System.currentTimeMillis(); + startTime += time - suspendTime; + } + + @Override + public String toString() { + return ""; + } + + private GraphTextWriter startBlock(String opening) { + if (formatting.beginBlockOnNewLine) { + newLine(); + } else { + append(" "); + } + return append(opening).newLine().indent(); + } + + public GraphTextWriter startBlock() { + return startBlock("{"); + } + + private GraphTextWriter endBlock(String closing) { + return unindent().append(closing); + } + + public GraphTextWriter endBlock() { + return endBlock("}"); + } + + public GraphTextWriter space() { + return append(" "); + } + + public GraphTextWriter spaceBeforeCallParenthesies(int argCount) { + if (argCount > 0) { + if (formatting.spaceBeforeParenthesesMethodCallParentheses) { + space(); + } + } else { + if (formatting.spaceBeforeParenthesesMethodCallEmptyParentheses) { + space(); + } + } + return this; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightType.java new file mode 100644 index 000000000..0ae78288a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightType.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public enum HilightType { + + TRAIT, CLASS, METHOD, OFFSET, SPECIAL + +} diff --git a/src/com/jpexs/decompiler/flash/helpers/HilightedText.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedText.java similarity index 68% rename from src/com/jpexs/decompiler/flash/helpers/HilightedText.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedText.java index 7e36d1fc0..13224d3ae 100644 --- a/src/com/jpexs/decompiler/flash/helpers/HilightedText.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedText.java @@ -1,71 +1,70 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.flash.helpers.hilight.Highlighting; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class HilightedText implements Serializable { - - public String text; - public List traitHilights; - public List classHilights; - public List methodHilights; - public List instructionHilights; - public List specialHilights; - - public List getTraitHighlights() { - return traitHilights; - } - - public List getMethodHighlights() { - return methodHilights; - } - - public List getClassHighlights() { - return classHilights; - } - - public List getSpecialHighligths() { - return specialHilights; - } - - public HilightedText(HilightedTextWriter writer) { - this.text = writer.toString(); - this.traitHilights = writer.traitHilights; - this.classHilights = writer.classHilights; - this.methodHilights = writer.methodHilights; - this.instructionHilights = writer.instructionHilights; - this.specialHilights = writer.specialHilights; - } - - public HilightedText(String text) { - this.text = text; - this.traitHilights = new ArrayList<>(); - this.classHilights = new ArrayList<>(); - this.methodHilights = new ArrayList<>(); - this.instructionHilights = new ArrayList<>(); - this.specialHilights = new ArrayList<>(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.flash.helpers.hilight.Highlighting; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class HilightedText implements Serializable { + + public String text; + public List traitHilights; + public List classHilights; + public List methodHilights; + public List instructionHilights; + public List specialHilights; + + public List getTraitHighlights() { + return traitHilights; + } + + public List getMethodHighlights() { + return methodHilights; + } + + public List getClassHighlights() { + return classHilights; + } + + public List getSpecialHighligths() { + return specialHilights; + } + + public HilightedText(HilightedTextWriter writer) { + this.text = writer.toString(); + this.traitHilights = writer.traitHilights; + this.classHilights = writer.classHilights; + this.methodHilights = writer.methodHilights; + this.instructionHilights = writer.instructionHilights; + this.specialHilights = writer.specialHilights; + } + + public HilightedText(String text) { + this.text = text; + this.traitHilights = new ArrayList<>(); + this.classHilights = new ArrayList<>(); + this.methodHilights = new ArrayList<>(); + this.instructionHilights = new ArrayList<>(); + this.specialHilights = new ArrayList<>(); + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java similarity index 89% rename from src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java index e0ed9f94c..9027ee6cf 100644 --- a/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java @@ -1,304 +1,303 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.helpers.hilight.Highlighting; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.helpers.Helper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Stack; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class HilightedTextWriter extends GraphTextWriter { - - private final StringBuilder sb = new StringBuilder(); - private final boolean hilight; - private boolean newLine = true; - private int indent = 0; - private final Stack offsets = new Stack<>(); - private boolean toStringCalled = false; - private int newLineCount = 0; - - private final Stack hilightStack = new Stack<>(); - public List traitHilights = new ArrayList<>(); - public List classHilights = new ArrayList<>(); - public List methodHilights = new ArrayList<>(); - public List instructionHilights = new ArrayList<>(); - public List specialHilights = new ArrayList<>(); - - public HilightedTextWriter(CodeFormatting formatting, boolean hilight) { - super(formatting); - this.hilight = hilight; - } - - public HilightedTextWriter(CodeFormatting formatting, boolean hilight, int indent) { - super(formatting); - this.hilight = hilight; - this.indent = indent; - } - - @Override - public boolean getIsHighlighted() { - return hilight; - } - - /** - * Highlights specified text as instruction by adding special tags - * - * @param src - * @param pos Offset of instruction - * @return HilightedTextWriter - */ - @Override - public HilightedTextWriter startOffset(GraphSourceItem src, int pos) { - GraphSourceItemPosition itemPos = new GraphSourceItemPosition(); - itemPos.graphSourceItem = src; - itemPos.position = pos; - offsets.add(itemPos); - return this; - } - - @Override - public HilightedTextWriter endOffset() { - offsets.pop(); - return this; - } - - /** - * Highlights specified text as method by adding special tags - * - * @param index MethodInfo index - * @return HilightedTextWriter - */ - @Override - public HilightedTextWriter startMethod(long index) { - Map data = new HashMap<>(); - data.put("index", Long.toString(index)); - return start(data, HilightType.METHOD); - } - - @Override - public HilightedTextWriter endMethod() { - return end(HilightType.METHOD); - } - - /** - * Highlights specified text as class by adding special tags - * - * @param index Class index - * @return HilightedTextWriter - */ - @Override - public HilightedTextWriter startClass(long index) { - Map data = new HashMap<>(); - data.put("index", Long.toString(index)); - return start(data, HilightType.CLASS); - } - - @Override - public HilightedTextWriter endClass() { - return end(HilightType.CLASS); - } - - /** - * Highlights specified text as trait by adding special tags - * - * @param index Trait index - * @return HilightedTextWriter - */ - @Override - public HilightedTextWriter startTrait(long index) { - Map data = new HashMap<>(); - data.put("index", Long.toString(index)); - return start(data, HilightType.TRAIT); - } - - @Override - public HilightedTextWriter endTrait() { - return end(HilightType.TRAIT); - } - - @Override - public HilightedTextWriter hilightSpecial(String text, String type) { - return hilightSpecial(text, type, 0); - } - - @Override - public HilightedTextWriter hilightSpecial(String text, String type, int index) { - Map data = new HashMap<>(); - data.put("subtype", type); - data.put("index", Long.toString(index)); - start(data, HilightType.SPECIAL); - appendNoHilight(text); - return end(HilightType.SPECIAL); - } - - @Override - public HilightedTextWriter append(String str) { - Highlighting h = null; - if (!offsets.empty()) { - GraphSourceItemPosition itemPos = offsets.peek(); - GraphSourceItem src = itemPos.graphSourceItem; - int pos = itemPos.position; - if (src != null && hilight) { - Map data = new HashMap<>(); - data.put("offset", Long.toString(src.getOffset() + pos + 1)); - h = new Highlighting(sb.length() - newLineCount, data, HilightType.OFFSET, str); - instructionHilights.add(h); - } - } - appendToSb(str); - if (h != null) { - h.len = sb.length() - newLineCount - h.startPos; - } - return this; - } - - @Override - public HilightedTextWriter append(String str, long offset) { - Highlighting h = null; - if (hilight) { - Map data = new HashMap<>(); - data.put("offset", Long.toString(offset)); - h = new Highlighting(sb.length() - newLineCount, data, HilightType.OFFSET, str); - instructionHilights.add(h); - } - appendToSb(str); - if (h != null) { - h.len = sb.length() - newLineCount - h.startPos; - } - return this; - } - - @Override - public HilightedTextWriter appendNoHilight(int i) { - appendNoHilight(Integer.toString(i)); - return this; - } - - @Override - public HilightedTextWriter appendNoHilight(String str) { - appendToSb(str); - return this; - } - - @Override - public HilightedTextWriter indent() { - indent++; - return this; - } - - @Override - public HilightedTextWriter unindent() { - indent--; - return this; - } - - @Override - public HilightedTextWriter newLine() { - appendToSb(formatting.newLineChars); - newLine = true; - newLineCount++; - return this; - } - - @Override - public int getLength() { - return sb.length(); - } - - @Override - public int getIndent() { - return indent; - } - - @Override - public String toString() { - if (toStringCalled) { - throw new Error("HilightedTextWriter.toString() was already called."); - } - if (Configuration.debugMode.get()) { - long stopTime = System.currentTimeMillis(); - long time = stopTime - startTime; - if (time > 500) { - System.out.println("Rendering is too slow: " + Helper.formatTimeSec(time) + " length: " + sb.length()); - } - } - toStringCalled = true; - return sb.toString(); - } - - private HilightedTextWriter start(Map data, HilightType type) { - if (hilight) { - Highlighting h = new Highlighting(sb.length() - newLineCount, data, type, null); - hilightStack.add(h); - } - return this; - } - - private HilightedTextWriter end(HilightType expectedType) { - if (hilight) { - Highlighting h = hilightStack.pop(); - h.len = sb.length() - newLineCount - h.startPos; - - if (!expectedType.equals(h.type)) { - throw new Error("Hilighting mismatch."); - } - - switch (h.type) { - case CLASS: - classHilights.add(h); - break; - case METHOD: - methodHilights.add(h); - break; - case TRAIT: - traitHilights.add(h); - break; - case SPECIAL: - specialHilights.add(h); - break; - case OFFSET: - instructionHilights.add(h); - break; - } - } - return this; - } - - private void appendToSb(String str) { - if (newLine) { - newLine = false; - appendIndent(); - } - sb.append(str); - } - - private void appendIndent() { - for (int i = 0; i < indent; i++) { - appendNoHilight(formatting.indentString); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.helpers.hilight.Highlighting; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.helpers.Helper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Stack; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class HilightedTextWriter extends GraphTextWriter { + + private final StringBuilder sb = new StringBuilder(); + private final boolean hilight; + private boolean newLine = true; + private int indent = 0; + private final Stack offsets = new Stack<>(); + private boolean toStringCalled = false; + private int newLineCount = 0; + + private final Stack hilightStack = new Stack<>(); + public List traitHilights = new ArrayList<>(); + public List classHilights = new ArrayList<>(); + public List methodHilights = new ArrayList<>(); + public List instructionHilights = new ArrayList<>(); + public List specialHilights = new ArrayList<>(); + + public HilightedTextWriter(CodeFormatting formatting, boolean hilight) { + super(formatting); + this.hilight = hilight; + } + + public HilightedTextWriter(CodeFormatting formatting, boolean hilight, int indent) { + super(formatting); + this.hilight = hilight; + this.indent = indent; + } + + @Override + public boolean getIsHighlighted() { + return hilight; + } + + /** + * Highlights specified text as instruction by adding special tags + * + * @param src + * @param pos Offset of instruction + * @return HilightedTextWriter + */ + @Override + public HilightedTextWriter startOffset(GraphSourceItem src, int pos) { + GraphSourceItemPosition itemPos = new GraphSourceItemPosition(); + itemPos.graphSourceItem = src; + itemPos.position = pos; + offsets.add(itemPos); + return this; + } + + @Override + public HilightedTextWriter endOffset() { + offsets.pop(); + return this; + } + + /** + * Highlights specified text as method by adding special tags + * + * @param index MethodInfo index + * @return HilightedTextWriter + */ + @Override + public HilightedTextWriter startMethod(long index) { + Map data = new HashMap<>(); + data.put("index", Long.toString(index)); + return start(data, HilightType.METHOD); + } + + @Override + public HilightedTextWriter endMethod() { + return end(HilightType.METHOD); + } + + /** + * Highlights specified text as class by adding special tags + * + * @param index Class index + * @return HilightedTextWriter + */ + @Override + public HilightedTextWriter startClass(long index) { + Map data = new HashMap<>(); + data.put("index", Long.toString(index)); + return start(data, HilightType.CLASS); + } + + @Override + public HilightedTextWriter endClass() { + return end(HilightType.CLASS); + } + + /** + * Highlights specified text as trait by adding special tags + * + * @param index Trait index + * @return HilightedTextWriter + */ + @Override + public HilightedTextWriter startTrait(long index) { + Map data = new HashMap<>(); + data.put("index", Long.toString(index)); + return start(data, HilightType.TRAIT); + } + + @Override + public HilightedTextWriter endTrait() { + return end(HilightType.TRAIT); + } + + @Override + public HilightedTextWriter hilightSpecial(String text, String type) { + return hilightSpecial(text, type, 0); + } + + @Override + public HilightedTextWriter hilightSpecial(String text, String type, int index) { + Map data = new HashMap<>(); + data.put("subtype", type); + data.put("index", Long.toString(index)); + start(data, HilightType.SPECIAL); + appendNoHilight(text); + return end(HilightType.SPECIAL); + } + + @Override + public HilightedTextWriter append(String str) { + Highlighting h = null; + if (!offsets.empty()) { + GraphSourceItemPosition itemPos = offsets.peek(); + GraphSourceItem src = itemPos.graphSourceItem; + int pos = itemPos.position; + if (src != null && hilight) { + Map data = new HashMap<>(); + data.put("offset", Long.toString(src.getOffset() + pos + 1)); + h = new Highlighting(sb.length() - newLineCount, data, HilightType.OFFSET, str); + instructionHilights.add(h); + } + } + appendToSb(str); + if (h != null) { + h.len = sb.length() - newLineCount - h.startPos; + } + return this; + } + + @Override + public HilightedTextWriter append(String str, long offset) { + Highlighting h = null; + if (hilight) { + Map data = new HashMap<>(); + data.put("offset", Long.toString(offset)); + h = new Highlighting(sb.length() - newLineCount, data, HilightType.OFFSET, str); + instructionHilights.add(h); + } + appendToSb(str); + if (h != null) { + h.len = sb.length() - newLineCount - h.startPos; + } + return this; + } + + @Override + public HilightedTextWriter appendNoHilight(int i) { + appendNoHilight(Integer.toString(i)); + return this; + } + + @Override + public HilightedTextWriter appendNoHilight(String str) { + appendToSb(str); + return this; + } + + @Override + public HilightedTextWriter indent() { + indent++; + return this; + } + + @Override + public HilightedTextWriter unindent() { + indent--; + return this; + } + + @Override + public HilightedTextWriter newLine() { + appendToSb(formatting.newLineChars); + newLine = true; + newLineCount++; + return this; + } + + @Override + public int getLength() { + return sb.length(); + } + + @Override + public int getIndent() { + return indent; + } + + @Override + public String toString() { + if (toStringCalled) { + throw new Error("HilightedTextWriter.toString() was already called."); + } + if (Configuration.debugMode.get()) { + long stopTime = System.currentTimeMillis(); + long time = stopTime - startTime; + if (time > 500) { + System.out.println("Rendering is too slow: " + Helper.formatTimeSec(time) + " length: " + sb.length()); + } + } + toStringCalled = true; + return sb.toString(); + } + + private HilightedTextWriter start(Map data, HilightType type) { + if (hilight) { + Highlighting h = new Highlighting(sb.length() - newLineCount, data, type, null); + hilightStack.add(h); + } + return this; + } + + private HilightedTextWriter end(HilightType expectedType) { + if (hilight) { + Highlighting h = hilightStack.pop(); + h.len = sb.length() - newLineCount - h.startPos; + + if (!expectedType.equals(h.type)) { + throw new Error("Hilighting mismatch."); + } + + switch (h.type) { + case CLASS: + classHilights.add(h); + break; + case METHOD: + methodHilights.add(h); + break; + case TRAIT: + traitHilights.add(h); + break; + case SPECIAL: + specialHilights.add(h); + break; + case OFFSET: + instructionHilights.add(h); + break; + } + } + return this; + } + + private void appendToSb(String str) { + if (newLine) { + newLine = false; + appendIndent(); + } + sb.append(str); + } + + private void appendIndent() { + for (int i = 0; i < indent; i++) { + appendNoHilight(formatting.indentString); + } + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java new file mode 100644 index 000000000..ee34aff49 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class LoopWithType { + + public static int LOOP_TYPE_LOOP = 0; + public static int LOOP_TYPE_SWITCH = 1; + + public long loopId; + public int type; + public boolean used; + +} diff --git a/src/com/jpexs/decompiler/flash/helpers/NulWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java similarity index 77% rename from src/com/jpexs/decompiler/flash/helpers/NulWriter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java index 39df879b3..3d19e866a 100644 --- a/src/com/jpexs/decompiler/flash/helpers/NulWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java @@ -1,140 +1,139 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import java.util.Stack; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class NulWriter extends GraphTextWriter { - - private final Stack loopStack = new Stack<>(); - private final Stack stringAddedStack = new Stack<>(); - private boolean stringAdded = false; - - public NulWriter() { - super(new CodeFormatting()); - } - - public void startLoop(long loopId, int loopType) { - LoopWithType loop = new LoopWithType(); - loop.loopId = loopId; - loop.type = loopType; - loopStack.add(loop); - } - - public LoopWithType endLoop(long loopId) { - LoopWithType loopIdInStack = loopStack.pop(); - if (loopId != loopIdInStack.loopId) { - throw new Error("LoopId mismatch"); - } - return loopIdInStack; - } - - public long getLoop() { - if (loopStack.isEmpty()) { - return -1; - } - return loopStack.peek().loopId; - } - - public long getNonSwitchLoop() { - if (loopStack.isEmpty()) { - return -1; - } - - int pos = loopStack.size() - 1; - LoopWithType loop; - do { - loop = loopStack.get(pos); - pos--; - } while ((pos >= 0) && (loop.type == LoopWithType.LOOP_TYPE_SWITCH)); - - if (loop.type == LoopWithType.LOOP_TYPE_SWITCH) { - return -1; - } - - return loop.loopId; - } - - public void setLoopUsed(long loopId) { - if (loopStack.isEmpty()) { - return; - } - - int pos = loopStack.size() - 1; - LoopWithType loop = null; - do { - loop = loopStack.get(pos); - pos--; - } while ((pos >= 0) && (loop.loopId != loopId)); - - if (loop.loopId == loopId) { - loop.used = true; - } - } - - @Override - public NulWriter hilightSpecial(String text, String type) { - stringAdded = true; - return this; - } - - @Override - public NulWriter hilightSpecial(String text, String type, int index) { - stringAdded = true; - return this; - } - - @Override - public NulWriter append(String str) { - stringAdded = true; - return this; - } - - @Override - public NulWriter append(String str, long offset) { - stringAdded = true; - return this; - } - - @Override - public NulWriter appendNoHilight(int i) { - stringAdded = true; - return this; - } - - @Override - public NulWriter appendNoHilight(String str) { - stringAdded = true; - return this; - } - - public void mark() { - stringAddedStack.add(stringAdded); - stringAdded = false; - } - - public boolean getMark() { - boolean result = stringAdded; - stringAdded = stringAddedStack.pop() || result; - return result; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import java.util.Stack; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class NulWriter extends GraphTextWriter { + + private final Stack loopStack = new Stack<>(); + private final Stack stringAddedStack = new Stack<>(); + private boolean stringAdded = false; + + public NulWriter() { + super(new CodeFormatting()); + } + + public void startLoop(long loopId, int loopType) { + LoopWithType loop = new LoopWithType(); + loop.loopId = loopId; + loop.type = loopType; + loopStack.add(loop); + } + + public LoopWithType endLoop(long loopId) { + LoopWithType loopIdInStack = loopStack.pop(); + if (loopId != loopIdInStack.loopId) { + throw new Error("LoopId mismatch"); + } + return loopIdInStack; + } + + public long getLoop() { + if (loopStack.isEmpty()) { + return -1; + } + return loopStack.peek().loopId; + } + + public long getNonSwitchLoop() { + if (loopStack.isEmpty()) { + return -1; + } + + int pos = loopStack.size() - 1; + LoopWithType loop; + do { + loop = loopStack.get(pos); + pos--; + } while ((pos >= 0) && (loop.type == LoopWithType.LOOP_TYPE_SWITCH)); + + if (loop.type == LoopWithType.LOOP_TYPE_SWITCH) { + return -1; + } + + return loop.loopId; + } + + public void setLoopUsed(long loopId) { + if (loopStack.isEmpty()) { + return; + } + + int pos = loopStack.size() - 1; + LoopWithType loop = null; + do { + loop = loopStack.get(pos); + pos--; + } while ((pos >= 0) && (loop.loopId != loopId)); + + if (loop.loopId == loopId) { + loop.used = true; + } + } + + @Override + public NulWriter hilightSpecial(String text, String type) { + stringAdded = true; + return this; + } + + @Override + public NulWriter hilightSpecial(String text, String type, int index) { + stringAdded = true; + return this; + } + + @Override + public NulWriter append(String str) { + stringAdded = true; + return this; + } + + @Override + public NulWriter append(String str, long offset) { + stringAdded = true; + return this; + } + + @Override + public NulWriter appendNoHilight(int i) { + stringAdded = true; + return this; + } + + @Override + public NulWriter appendNoHilight(String str) { + stringAdded = true; + return this; + } + + public void mark() { + stringAddedStack.add(stringAdded); + stringAdded = false; + } + + public boolean getMark() { + boolean result = stringAdded; + stringAdded = stringAddedStack.pop() || result; + return result; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java new file mode 100644 index 000000000..8f8da08da --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.action.ActionList; + +/** + * + * @author JPEXS + */ +public interface SWFDecompilerListener { + + void actionListParsed(ActionList actions, SWF swf); +} diff --git a/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java similarity index 77% rename from src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java index 9c8edf6a0..e843395fd 100644 --- a/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerPlugin.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS, Miron Sadziak + * Copyright (C) 2010-2014 JPEXS, Miron Sadziak, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.helpers; import com.jpexs.helpers.Helper; diff --git a/src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java similarity index 64% rename from src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java index a49643bfb..5d344fde1 100644 --- a/src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyEntry.java @@ -1,85 +1,84 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers.collections; - -import java.util.Map.Entry; -import java.util.Objects; - -/** - * - * @param Key - * @param Value - * @author JPEXS - */ -public class MyEntry implements Entry { - - public K key; - public V value; - - public MyEntry(K key, V value) { - this.key = key; - this.value = value; - } - - @Override - public String toString() { - return key.toString() + " = " + value.toString(); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 61 * hash + Objects.hashCode(this.key); - hash = 61 * hash + Objects.hashCode(this.value); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - @SuppressWarnings("unchecked") - final MyEntry other = (MyEntry) obj; - if (!Objects.equals(this.key, other.key)) { - return false; - } - if (!Objects.equals(this.value, other.value)) { - return false; - } - return true; - } - - @Override - public K getKey() { - return key; - } - - @Override - public V getValue() { - return value; - } - - @Override - public V setValue(V value) { - this.value = value; - return value; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers.collections; + +import java.util.Map.Entry; +import java.util.Objects; + +/** + * + * @param Key + * @param Value + * @author JPEXS + */ +public class MyEntry implements Entry { + + public K key; + public V value; + + public MyEntry(K key, V value) { + this.key = key; + this.value = value; + } + + @Override + public String toString() { + return key.toString() + " = " + value.toString(); + } + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.key); + hash = 61 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + @SuppressWarnings("unchecked") + final MyEntry other = (MyEntry) obj; + if (!Objects.equals(this.key, other.key)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public K getKey() { + return key; + } + + @Override + public V getValue() { + return value; + } + + @Override + public V setValue(V value) { + this.value = value; + return value; + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java similarity index 75% rename from src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java index 277352105..e046c84ec 100644 --- a/src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MyMap.java @@ -1,135 +1,134 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers.collections; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * - * @param - * @param - * @author JPEXS - */ -public class MyMap implements Map { - - List> values = new ArrayList<>(); - - @Override - public int size() { - return values.size(); - } - - @Override - public boolean isEmpty() { - return values.isEmpty(); - } - - @Override - public boolean containsKey(Object key) { - for (MyEntry kv : values) { - if (kv.key.equals(key)) { - return true; - } - } - return false; - } - - @Override - public boolean containsValue(Object value) { - for (MyEntry kv : values) { - if (kv.value.equals(value)) { - return true; - } - } - return false; - } - - @Override - public V get(Object key) { - for (MyEntry kv : values) { - if (kv.key.equals(key)) { - return kv.value; - } - } - return null; - } - - @Override - public V put(K key, V value) { - for (MyEntry kv : values) { - if (kv.key.equals(key)) { - kv.value = value; - return value; - } - } - values.add(new MyEntry<>(key, value)); - return value; - } - - @Override - public V remove(Object key) { - for (int i = 0; i < values.size(); i++) { - MyEntry kv = values.get(i); - if (kv.key.equals(key)) { - values.remove(i); - return kv.value; - } - } - return null; - } - - @Override - public void putAll(Map m) { - for (K k : m.keySet()) { - put(k, m.get(k)); - } - } - - @Override - public void clear() { - values.clear(); - } - - @Override - public Set keySet() { - Set ret = new MySet<>(); - for (MyEntry kv : values) { - ret.add(kv.key); - } - return ret; - } - - @Override - public Collection values() { - Collection ret = new ArrayList<>(); - for (MyEntry kv : values) { - ret.add(kv.value); - } - return ret; - } - - @Override - public Set> entrySet() { - Set> ret = new MySet<>(); - ret.addAll(values); - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers.collections; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * + * @param + * @param + * @author JPEXS + */ +public class MyMap implements Map { + + List> values = new ArrayList<>(); + + @Override + public int size() { + return values.size(); + } + + @Override + public boolean isEmpty() { + return values.isEmpty(); + } + + @Override + public boolean containsKey(Object key) { + for (MyEntry kv : values) { + if (kv.key.equals(key)) { + return true; + } + } + return false; + } + + @Override + public boolean containsValue(Object value) { + for (MyEntry kv : values) { + if (kv.value.equals(value)) { + return true; + } + } + return false; + } + + @Override + public V get(Object key) { + for (MyEntry kv : values) { + if (kv.key.equals(key)) { + return kv.value; + } + } + return null; + } + + @Override + public V put(K key, V value) { + for (MyEntry kv : values) { + if (kv.key.equals(key)) { + kv.value = value; + return value; + } + } + values.add(new MyEntry<>(key, value)); + return value; + } + + @Override + public V remove(Object key) { + for (int i = 0; i < values.size(); i++) { + MyEntry kv = values.get(i); + if (kv.key.equals(key)) { + values.remove(i); + return kv.value; + } + } + return null; + } + + @Override + public void putAll(Map m) { + for (K k : m.keySet()) { + put(k, m.get(k)); + } + } + + @Override + public void clear() { + values.clear(); + } + + @Override + public Set keySet() { + Set ret = new MySet<>(); + for (MyEntry kv : values) { + ret.add(kv.key); + } + return ret; + } + + @Override + public Collection values() { + Collection ret = new ArrayList<>(); + for (MyEntry kv : values) { + ret.add(kv.value); + } + return ret; + } + + @Override + public Set> entrySet() { + Set> ret = new MySet<>(); + ret.addAll(values); + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/collections/MySet.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MySet.java similarity index 78% rename from src/com/jpexs/decompiler/flash/helpers/collections/MySet.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MySet.java index 6545b5df1..3b277b7a3 100644 --- a/src/com/jpexs/decompiler/flash/helpers/collections/MySet.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/collections/MySet.java @@ -1,149 +1,148 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers.collections; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -/** - * - * @param - * @author JPEXS - */ -public class MySet implements Set { - - List items = new ArrayList<>(); - - @Override - public int size() { - return items.size(); - } - - @Override - public boolean isEmpty() { - return items.isEmpty(); - } - - @Override - public boolean contains(Object o) { - for (T t : items) { - if (t.equals(o)) { - return true; - } - } - return false; - } - - @Override - public Iterator iterator() { - return new Iterator() { - int pos = 0; - - @Override - public boolean hasNext() { - return pos + 1 < items.size(); - } - - @Override - public T next() { - return items.get(pos++); - } - - @Override - public void remove() { - items.remove(pos--); - } - }; - } - - @Override - public Object[] toArray() { - Object[] ret = new Object[items.size()]; - for (int i = 0; i < items.size(); i++) { - ret[i] = items.get(i); - } - return ret; - } - - @Override - public T[] toArray(T[] a) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public boolean add(T e) { - items.add(e); - return true; - } - - @Override - public boolean remove(Object o) { - for (int i = 0; i < items.size(); i++) { - if (items.get(i).equals(o)) { - items.remove(i); - return true; - } - } - return false; - } - - @Override - public boolean containsAll(Collection c) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public boolean addAll(Collection c) { - for (T t : c) { - add(t); - } - return true; - } - - @Override - public boolean retainAll(Collection c) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public void clear() { - items.clear(); - } - - @Override - public String toString() { - String ret = "["; - boolean first = true; - for (T t : items) { - if (!first) { - ret += ", "; - } - ret += t.toString(); - first = false; - } - ret += "]"; - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers.collections; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +/** + * + * @param + * @author JPEXS + */ +public class MySet implements Set { + + List items = new ArrayList<>(); + + @Override + public int size() { + return items.size(); + } + + @Override + public boolean isEmpty() { + return items.isEmpty(); + } + + @Override + public boolean contains(Object o) { + for (T t : items) { + if (t.equals(o)) { + return true; + } + } + return false; + } + + @Override + public Iterator iterator() { + return new Iterator() { + int pos = 0; + + @Override + public boolean hasNext() { + return pos + 1 < items.size(); + } + + @Override + public T next() { + return items.get(pos++); + } + + @Override + public void remove() { + items.remove(pos--); + } + }; + } + + @Override + public Object[] toArray() { + Object[] ret = new Object[items.size()]; + for (int i = 0; i < items.size(); i++) { + ret[i] = items.get(i); + } + return ret; + } + + @Override + public T[] toArray(T[] a) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public boolean add(T e) { + items.add(e); + return true; + } + + @Override + public boolean remove(Object o) { + for (int i = 0; i < items.size(); i++) { + if (items.get(i).equals(o)) { + items.remove(i); + return true; + } + } + return false; + } + + @Override + public boolean containsAll(Collection c) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public boolean addAll(Collection c) { + for (T t : c) { + add(t); + } + return true; + } + + @Override + public boolean retainAll(Collection c) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public boolean removeAll(Collection c) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void clear() { + items.clear(); + } + + @Override + public String toString() { + String ret = "["; + boolean first = true; + for (T t : items) { + if (!first) { + ret += ", "; + } + ret += t.toString(); + first = false; + } + ret += "]"; + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java similarity index 81% rename from src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java index 780d9146f..fb8428cc7 100644 --- a/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java @@ -1,141 +1,140 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers.hilight; - -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.helpers.HilightType; -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class Highlighting implements Serializable { - - public HilightType type; - public String hilightedText; - /** - * Starting position - */ - public int startPos; - /** - * Length of highlighted text - */ - public int len; - private final Map properties; - - public Long getPropertyLong(String key) { - String dataStr = getPropertyString(key); - if (dataStr == null) { - return null; - } - try { - return Long.parseLong(dataStr); - } catch (NumberFormatException nfe) { - return null; - } - } - - public String getPropertyString(String key) { - return properties.get(key); - } - - public static Highlighting search(List list, long pos) { - return search(list, pos, null, null, -1, -1); - } - - public static Highlighting search(List list, String property, String value) { - return search(list, -1, property, value, -1, -1); - } - - public static Highlighting search(List list, String property, String value, int from, int to) { - return search(list, -1, property, value, from, to); - } - - public static Highlighting search(List list, long pos, String property, String value, long from, long to) { - Highlighting ret = null; - for (Highlighting h : list) { - if (property != null) { - String v = h.getPropertyString(property); - if (v == null) { - if (value != null) { - continue; - } - } else { - if (!v.equals(value)) { - continue; - } - } - } - if (from > -1) { - if (h.startPos < from) { - continue; - } - } - if (to > -1) { - if (h.startPos > to) { - continue; - } - } - if (pos == -1 || (pos >= h.startPos && (pos < h.startPos + h.len))) { - if (ret == null || h.startPos > ret.startPos) { //get the closest one - ret = h; - } - } - if (pos == -1 && ret != null) { - return ret; - } - } - - if (Configuration.debugMode.get()) { - if (ret != null) { - System.out.println("Highlight found: " + ret.hilightedText); - } - } - - return ret; - } - - /** - * Returns a string representation of the object - * - * @return a string representation of the object. - */ - @Override - public String toString() { - return startPos + "-" + (startPos + len) + " type:" + type; - } - - /** - * - * @param startPos Starting position - * @param data Highlighting data - * @param type Highlighting type - * @param text - */ - public Highlighting(int startPos, Map data, HilightType type, String text) { - this.startPos = startPos; - this.type = type; - if (Configuration.debugMode.get()) { - this.hilightedText = text; - } - this.properties = data; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.helpers.hilight; + +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.helpers.HilightType; +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * Provides methods for highlighting positions of instructions in the text. + * + * @author JPEXS + */ +public class Highlighting implements Serializable { + + public HilightType type; + public String hilightedText; + /** + * Starting position + */ + public int startPos; + /** + * Length of highlighted text + */ + public int len; + private final Map properties; + + public Long getPropertyLong(String key) { + String dataStr = getPropertyString(key); + if (dataStr == null) { + return null; + } + try { + return Long.parseLong(dataStr); + } catch (NumberFormatException nfe) { + return null; + } + } + + public String getPropertyString(String key) { + return properties.get(key); + } + + public static Highlighting search(List list, long pos) { + return search(list, pos, null, null, -1, -1); + } + + public static Highlighting search(List list, String property, String value) { + return search(list, -1, property, value, -1, -1); + } + + public static Highlighting search(List list, String property, String value, int from, int to) { + return search(list, -1, property, value, from, to); + } + + public static Highlighting search(List list, long pos, String property, String value, long from, long to) { + Highlighting ret = null; + for (Highlighting h : list) { + if (property != null) { + String v = h.getPropertyString(property); + if (v == null) { + if (value != null) { + continue; + } + } else { + if (!v.equals(value)) { + continue; + } + } + } + if (from > -1) { + if (h.startPos < from) { + continue; + } + } + if (to > -1) { + if (h.startPos > to) { + continue; + } + } + if (pos == -1 || (pos >= h.startPos && (pos < h.startPos + h.len))) { + if (ret == null || h.startPos > ret.startPos) { //get the closest one + ret = h; + } + } + if (pos == -1 && ret != null) { + return ret; + } + } + + if (Configuration.debugMode.get()) { + if (ret != null) { + System.out.println("Highlight found: " + ret.hilightedText); + } + } + + return ret; + } + + /** + * Returns a string representation of the object + * + * @return a string representation of the object. + */ + @Override + public String toString() { + return startPos + "-" + (startPos + len) + " type:" + type; + } + + /** + * + * @param startPos Starting position + * @param data Highlighting data + * @param type Highlighting type + * @param text + */ + public Highlighting(int startPos, Map data, HilightType type, String text) { + this.startPos = startPos; + this.type = type; + if (Configuration.debugMode.get()) { + this.hilightedText = text; + } + this.properties = data; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java new file mode 100644 index 000000000..fae41e885 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags; + +import com.jpexs.decompiler.flash.abc.ABC; + +/** + * + * @author JPEXS + */ +public interface ABCContainerTag extends Comparable { + + public ABC getABC(); +} diff --git a/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java index 9b72b06e0..2736eb883 100644 --- a/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java similarity index 66% rename from src/com/jpexs/decompiler/flash/tags/DebugIDTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java index f30311d79..0c997c57a 100644 --- a/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java similarity index 71% rename from src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java index bdd9a7f9d..af0cbcf1d 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java index c42415997..d708d4dc3 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java similarity index 85% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java index f9940f0cc..e2617d1ab 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java similarity index 85% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java index c70a367c8..9a88666e6 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java similarity index 91% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java index ec9101bbb..5f01f42f1 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java similarity index 92% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java index 0c944000b..4a5fbdd2b 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java similarity index 83% rename from src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java index 1edac1515..0888d4d8a 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java similarity index 93% rename from src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index 4e4973348..9c9ec8493 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java similarity index 69% rename from src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index ea4c97885..fb518ad9a 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java similarity index 82% rename from src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index affacc716..67ff40a90 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 826d3d050..5e9fbe16c 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java similarity index 98% rename from src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index f21ffa5c0..7c562e21f 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 3c04879b8..d9e332739 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index 5acf4988a..0e4885187 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java similarity index 77% rename from src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java index c96daa566..a1a6f8a26 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java similarity index 76% rename from src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java index dcc9e7ec3..c3612d4b9 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java similarity index 84% rename from src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index b1d3008a7..29f339807 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java similarity index 84% rename from src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index b187999f0..ad6a79456 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java similarity index 68% rename from src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java index 06ef77f04..bccafad1f 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java similarity index 92% rename from src/com/jpexs/decompiler/flash/tags/DefineFontTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java index ed64a07c1..8de95693f 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index efa230ba6..e220d75b6 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index 1c26e8cf5..f1d16c53f 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java similarity index 67% rename from src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index 3e75d7cbc..d6946c38e 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java similarity index 81% rename from src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index 4f2dfd41d..c31faac55 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java similarity index 78% rename from src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index 932891b0a..c7f51c07e 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java similarity index 78% rename from src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index c9f30db0e..6d11e199d 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java similarity index 83% rename from src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index b76cd7d84..9dc9917b3 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java similarity index 78% rename from src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index b6e2dcb62..b4e6b9b71 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index d4df5026f..2cae3d8b8 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index b049e97d3..38c79703b 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java similarity index 96% rename from src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java index 6162639cc..29c98102c 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java similarity index 97% rename from src/com/jpexs/decompiler/flash/tags/DefineTextTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index cb7d9d3ac..be1e781ff 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.AppStrings; diff --git a/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java similarity index 82% rename from src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index 9eb28ab3c..13a7b1d22 100644 --- a/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java similarity index 82% rename from src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index 6e6a72a2a..a40b959a0 100644 --- a/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java similarity index 76% rename from src/com/jpexs/decompiler/flash/tags/DoABCTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index faf7673cc..a5cf87dd0 100644 --- a/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java similarity index 88% rename from src/com/jpexs/decompiler/flash/tags/DoActionTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index e7168f233..e31738704 100644 --- a/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java similarity index 90% rename from src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 6fdc7c379..81e984a83 100644 --- a/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java similarity index 70% rename from src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index 560d219a1..2af82adf0 100644 --- a/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java similarity index 66% rename from src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index a06ec82f4..3106589a9 100644 --- a/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java similarity index 72% rename from src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java index 626654d76..5e2c40323 100644 --- a/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/EndTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java similarity index 52% rename from src/com/jpexs/decompiler/flash/tags/EndTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java index 9475ee3e2..182d4c745 100644 --- a/src/com/jpexs/decompiler/flash/tags/EndTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java similarity index 77% rename from src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index 8cfb6cc7a..81d671dd3 100644 --- a/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java index 32a7f2f88..25f638120 100644 --- a/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java similarity index 68% rename from src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java index 4a28e42e2..db85ae1bd 100644 --- a/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java similarity index 81% rename from src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 898e21b76..68f4530a5 100644 --- a/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index 5a05192e4..61f92d494 100644 --- a/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java similarity index 62% rename from src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java index fb161b747..0e88e1e8f 100644 --- a/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java similarity index 63% rename from src/com/jpexs/decompiler/flash/tags/MetadataTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index c562bd0e3..ac63c4be1 100644 --- a/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java index 98fe25bf8..31ff99153 100644 --- a/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java index 07e5f1671..52949d2d4 100644 --- a/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.EndOfStreamException; diff --git a/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 3255d21fb..787cc010f 100644 --- a/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.EndOfStreamException; diff --git a/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java similarity index 87% rename from src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java index f0b71faea..5a75e7be3 100644 --- a/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java index 9edcf660a..62661e2f2 100644 --- a/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java similarity index 68% rename from src/com/jpexs/decompiler/flash/tags/ProtectTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index a4ae1d8e9..8f4a91f85 100644 --- a/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java similarity index 66% rename from src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java index 8f158ced9..51e3201b7 100644 --- a/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java similarity index 73% rename from src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java index 5070ce8db..1df3548a9 100644 --- a/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java similarity index 67% rename from src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java index 5d52c1381..82559d80e 100644 --- a/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java similarity index 64% rename from src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java index de56813e6..889ba2b4e 100644 --- a/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java similarity index 70% rename from src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java index f61b5b281..8a5b2594c 100644 --- a/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java similarity index 68% rename from src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java index 0e5473886..1fc1ca0ed 100644 --- a/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java similarity index 66% rename from src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java index f6ba6c3b4..09fcff7dd 100644 --- a/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java similarity index 90% rename from src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java index b1b3baf6d..239d16c7c 100644 --- a/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java similarity index 91% rename from src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index c5300ac2d..8cbb489cc 100644 --- a/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java similarity index 65% rename from src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java index 8ad51dc98..46b00e2de 100644 --- a/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java similarity index 68% rename from src/com/jpexs/decompiler/flash/tags/StartSoundTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java index 87342aa25..0ca33daa8 100644 --- a/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java similarity index 73% rename from src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java index 9a8a20ba4..d9ae99f7d 100644 --- a/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java similarity index 95% rename from src/com/jpexs/decompiler/flash/tags/Tag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java index e13e0ea4c..5f9f94bb8 100644 --- a/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/TagStub.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java similarity index 55% rename from src/com/jpexs/decompiler/flash/tags/TagStub.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java index 5cece4c0f..7a45c1da3 100644 --- a/src/com/jpexs/decompiler/flash/tags/TagStub.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/UnknownTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/UnknownTag.java new file mode 100644 index 000000000..0639380b3 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/UnknownTag.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.helpers.ByteArrayRange; + +/** + * + * @author JPEXS + */ +public class UnknownTag extends Tag { + + public UnknownTag(SWF swf, int id, ByteArrayRange data) { + super(swf, id, "Unknown", data); + } + + /** + * Gets data bytes + * + * @return Bytes of data + */ + @Override + public byte[] getData() { + return getOriginalRange().getRangeData(); + } + + @Override + public String toString() { + return super.toString() + " (ID=" + id + ")"; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java similarity index 70% rename from src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java index 6c4a3d255..880b0a083 100644 --- a/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java similarity index 75% rename from src/com/jpexs/decompiler/flash/tags/base/ASMSource.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java index 276fbe4e0..58828d64b 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java new file mode 100644 index 000000000..914f1b3d1 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +/** + * + * @author JPEXS + */ +public interface AloneTag { +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java new file mode 100644 index 000000000..174b4a39f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.types.RECT; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public interface BoundedTag { + + public RECT getRect(Set added); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java similarity index 78% rename from src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java index 93ae4a389..0d8adc676 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java similarity index 72% rename from src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java index 7e12b4f61..dc9dfc260 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterIdTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java similarity index 64% rename from src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java index e443766ff..37da1dd43 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.SWF; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Container.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Container.java new file mode 100644 index 000000000..8f1cfa8d0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Container.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.treeitems.TreeItem; +import java.util.List; + +/** + * Object which contains other objects + * + * @author JPEXS + */ +public interface Container extends TreeItem { + + /** + * Returns all sub-items + * + * @return List of sub-items + */ + public List getSubItems(); + + /** + * Returns number of sub-items + * + * @return Number of sub-items + */ + public int getItemCount(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java new file mode 100644 index 000000000..00eb3f112 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.treeitems.TreeItem; + +/** + * Object which contains other objects + * + * @author JPEXS + */ +public interface ContainerItem extends TreeItem { + +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java similarity index 58% rename from src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java index d705264d4..de7a95c8e 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/DrawableTag.java @@ -1,44 +1,43 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; -import com.jpexs.decompiler.flash.timeline.DepthState; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.helpers.SerializableImage; -import java.awt.Shape; -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public interface DrawableTag extends BoundedTag { - - public void toImage(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, SerializableImage image, Matrix transformation, ColorTransform colorTransform); - - public void toSVG(SVGExporter exporter, int ratio, ColorTransform colorTransform, int level) throws IOException; - - public String toHtmlCanvas(double unitDivisor); - - public int getNumFrames(); - - public boolean isSingleFrame(); - - public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; +import com.jpexs.decompiler.flash.timeline.DepthState; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.helpers.SerializableImage; +import java.awt.Shape; +import java.io.IOException; + +/** + * + * @author JPEXS + */ +public interface DrawableTag extends BoundedTag { + + public void toImage(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, SerializableImage image, Matrix transformation, ColorTransform colorTransform); + + public void toSVG(SVGExporter exporter, int ratio, ColorTransform colorTransform, int level) throws IOException; + + public String toHtmlCanvas(double unitDivisor); + + public int getNumFrames(); + + public boolean isSingleFrame(); + + public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Exportable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Exportable.java new file mode 100644 index 000000000..77f13c0a6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/Exportable.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +/** + * + * @author JPEXS + */ +public interface Exportable { + + public String getExportFileName(); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/FontTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java similarity index 93% rename from src/com/jpexs/decompiler/flash/tags/base/FontTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java index 2de2edb60..d5109b21a 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/FontTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java similarity index 90% rename from src/com/jpexs/decompiler/flash/tags/base/ImageTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java index 0b0c24418..96af60488 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.base; import com.jpexs.decompiler.flash.SWF; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java new file mode 100644 index 000000000..5bd59d6bf --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import java.util.Map; + +/** + * + * @author JPEXS + */ +public interface ImportTag { + + public String getUrl(); + + public Map getAssets(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java new file mode 100644 index 000000000..b2cf935dc --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import java.awt.Font; + +/** + * + * @author JPEXS + */ +public class MissingCharacterHandler { + + public boolean handle(FontTag font, char character) { + String fontName = font.getFontName(); + if (!FontTag.fontNames.contains(fontName)) { + return false; + } + Font f = new Font(fontName, font.getFontStyle(), 18); + if (!f.canDisplay(character)) { + return false; + } + font.addCharacter(character, fontName); + return true; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java similarity index 50% rename from src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java index 43fbfe90e..40709b965 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/MorphShapeTag.java @@ -1,46 +1,45 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY; -import com.jpexs.decompiler.flash.types.MORPHLINESTYLEARRAY; -import com.jpexs.decompiler.flash.types.RECT; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; - -/** - * - * @author JPEXS - */ -public interface MorphShapeTag extends DrawableTag { - - public RECT getStartBounds(); - - public RECT getEndBounds(); - - public MORPHFILLSTYLEARRAY getFillStyles(); - - public MORPHLINESTYLEARRAY getLineStyles(); - - public SHAPE getStartEdges(); - - public SHAPE getEndEdges(); - - public int getShapeNum(); - - public SHAPEWITHSTYLE getShapeAtRatio(int ratio); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; + +/** + * + * @author JPEXS + */ +public interface MorphShapeTag extends DrawableTag { + + public RECT getStartBounds(); + + public RECT getEndBounds(); + + public MORPHFILLSTYLEARRAY getFillStyles(); + + public MORPHLINESTYLEARRAY getLineStyles(); + + public SHAPE getStartEdges(); + + public SHAPE getEndEdges(); + + public int getShapeNum(); + + public SHAPEWITHSTYLE getShapeAtRatio(int ratio); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java new file mode 100644 index 000000000..267636865 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import java.util.Set; + +/** + * + * @author JPEXS + */ +public interface NeedsCharacters { + + public void getNeededCharacters(Set needed); + + public boolean removeCharacter(int characterId); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java similarity index 57% rename from src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java index 4b9db035c..47995a2c9 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/PlaceObjectTypeTag.java @@ -1,65 +1,64 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.types.CLIPACTIONS; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.MATRIX; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.filters.FILTER; -import java.util.List; - -/** - * - * @author JPEXS - */ -public interface PlaceObjectTypeTag { - - public int getCharacterId(); - - public int getDepth(); - - public MATRIX getMatrix(); - - public String getInstanceName(); - - public void setInstanceName(String name); - - public void setClassName(String className); - - public ColorTransform getColorTransform(); - - public int getBlendMode(); - - public List getFilters(); - - public int getClipDepth(); - - public String getClassName(); - - public boolean cacheAsBitmap(); - - public boolean isVisible(); - - public RGBA getBackgroundColor(); - - public boolean flagMove(); - - public int getRatio(); - - public CLIPACTIONS getClipActions(); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.types.CLIPACTIONS; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.MATRIX; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.filters.FILTER; +import java.util.List; + +/** + * + * @author JPEXS + */ +public interface PlaceObjectTypeTag { + + public int getCharacterId(); + + public int getDepth(); + + public MATRIX getMatrix(); + + public String getInstanceName(); + + public void setInstanceName(String name); + + public void setClassName(String className); + + public ColorTransform getColorTransform(); + + public int getBlendMode(); + + public List getFilters(); + + public int getClipDepth(); + + public String getClassName(); + + public boolean cacheAsBitmap(); + + public boolean isVisible(); + + public RGBA getBackgroundColor(); + + public boolean flagMove(); + + public int getRatio(); + + public CLIPACTIONS getClipActions(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java new file mode 100644 index 000000000..ce00eda6d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +/** + * + * @author JPEXS + */ +public interface RemoveTag { + + public int getDepth(); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java similarity index 75% rename from src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java index b3f71c17c..7161d8411 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java @@ -1,80 +1,79 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; -import com.jpexs.decompiler.flash.exporters.shape.BitmapExporter; -import com.jpexs.decompiler.flash.exporters.shape.CanvasShapeExporter; -import com.jpexs.decompiler.flash.exporters.shape.SVGShapeExporter; -import com.jpexs.decompiler.flash.timeline.DepthState; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; -import com.jpexs.helpers.ByteArrayRange; -import com.jpexs.helpers.SerializableImage; -import java.awt.Shape; -import java.io.IOException; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public abstract class ShapeTag extends CharacterTag implements DrawableTag { - - public ShapeTag(SWF swf, int id, String name, ByteArrayRange data) { - super(swf, id, name, data); - } - - public abstract SHAPEWITHSTYLE getShapes(); - - public abstract int getShapeNum(); - - @Override - public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation) { - return transformation.toTransform().createTransformedShape(getShapes().getOutline()); - } - - @Override - public void toImage(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, SerializableImage image, Matrix transformation, ColorTransform colorTransform) { - BitmapExporter.export(swf, getShapes(), null, image, transformation, colorTransform); - } - - @Override - public void toSVG(SVGExporter exporter, int ratio, ColorTransform colorTransform, int level) throws IOException { - SVGShapeExporter shapeExporter = new SVGShapeExporter(swf, getShapes(), exporter, null, colorTransform); - shapeExporter.export(); - } - - @Override - public String toHtmlCanvas(double unitDivisor) { - CanvasShapeExporter cse = new CanvasShapeExporter(null, unitDivisor, swf, getShapes(), new ColorTransform(), 0, 0); - cse.export(); - return cse.getShapeData(); - } - - @Override - public void getNeededCharacters(Set needed) { - getShapes().getNeededCharacters(needed); - } - - @Override - public boolean removeCharacter(int characterId) { - return getShapes().removeCharacter(characterId); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; +import com.jpexs.decompiler.flash.exporters.shape.BitmapExporter; +import com.jpexs.decompiler.flash.exporters.shape.CanvasShapeExporter; +import com.jpexs.decompiler.flash.exporters.shape.SVGShapeExporter; +import com.jpexs.decompiler.flash.timeline.DepthState; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.helpers.ByteArrayRange; +import com.jpexs.helpers.SerializableImage; +import java.awt.Shape; +import java.io.IOException; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public abstract class ShapeTag extends CharacterTag implements DrawableTag { + + public ShapeTag(SWF swf, int id, String name, ByteArrayRange data) { + super(swf, id, name, data); + } + + public abstract SHAPEWITHSTYLE getShapes(); + + public abstract int getShapeNum(); + + @Override + public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation) { + return transformation.toTransform().createTransformedShape(getShapes().getOutline()); + } + + @Override + public void toImage(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, SerializableImage image, Matrix transformation, ColorTransform colorTransform) { + BitmapExporter.export(swf, getShapes(), null, image, transformation, colorTransform); + } + + @Override + public void toSVG(SVGExporter exporter, int ratio, ColorTransform colorTransform, int level) throws IOException { + SVGShapeExporter shapeExporter = new SVGShapeExporter(swf, getShapes(), exporter, null, colorTransform); + shapeExporter.export(); + } + + @Override + public String toHtmlCanvas(double unitDivisor) { + CanvasShapeExporter cse = new CanvasShapeExporter(null, unitDivisor, swf, getShapes(), new ColorTransform(), 0, 0); + cse.export(); + return cse.getShapeData(); + } + + @Override + public void getNeededCharacters(Set needed) { + getShapes().getNeededCharacters(needed); + } + + @Override + public boolean removeCharacter(int characterId) { + return getShapes().removeCharacter(characterId); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java new file mode 100644 index 000000000..788d7a7fe --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag; +import java.util.List; + +/** + * + * @author JPEXS + */ +public interface SoundStreamHeadTypeTag extends SoundTag { + + @Override + public boolean getSoundSize(); + + public long getSoundSampleCount(); + + public void setVirtualCharacterId(int ch); + + public int getCharacterId(); + + public List getBlocks(); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/SoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundTag.java similarity index 56% rename from src/com/jpexs/decompiler/flash/tags/base/SoundTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundTag.java index 0b9ba2f96..280b31e24 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/SoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/SoundTag.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.types.sound.SoundFormat; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public interface SoundTag { - - public String getExportFormat(); - - public boolean importSupported(); - - public boolean setSound(InputStream is, int newSoundFormat); - - public int getSoundRate(); - - public boolean getSoundType(); - - public byte[] getRawSoundData(); - - public int getSoundFormatId(); - - public long getTotalSoundSampleCount(); - - public boolean getSoundSize(); - - public String getCharacterExportFileName(); - - public SoundFormat getSoundFormat(); -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.types.sound.SoundFormat; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public interface SoundTag { + + public String getExportFormat(); + + public boolean importSupported(); + + public boolean setSound(InputStream is, int newSoundFormat); + + public int getSoundRate(); + + public boolean getSoundType(); + + public byte[] getRawSoundData(); + + public int getSoundFormatId(); + + public long getTotalSoundSampleCount(); + + public boolean getSoundSize(); + + public String getCharacterExportFileName(); + + public SoundFormat getSoundFormat(); +} diff --git a/src/com/jpexs/decompiler/flash/tags/base/TextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/base/TextTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java index 90b1bff36..0e3c1617b 100644 --- a/src/com/jpexs/decompiler/flash/tags/base/TextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java @@ -1,490 +1,489 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.exporters.FontExporter; -import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; -import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; -import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; -import com.jpexs.decompiler.flash.exporters.shape.BitmapExporter; -import com.jpexs.decompiler.flash.exporters.shape.CanvasShapeExporter; -import com.jpexs.decompiler.flash.exporters.shape.SVGShapeExporter; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.tags.text.ParseException; -import com.jpexs.decompiler.flash.timeline.DepthState; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.FILLSTYLE; -import com.jpexs.decompiler.flash.types.FILLSTYLEARRAY; -import com.jpexs.decompiler.flash.types.GLYPHENTRY; -import com.jpexs.decompiler.flash.types.LINESTYLE; -import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; -import com.jpexs.decompiler.flash.types.MATRIX; -import com.jpexs.decompiler.flash.types.RECT; -import com.jpexs.decompiler.flash.types.RGB; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.SHAPE; -import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; -import com.jpexs.decompiler.flash.types.TEXTRECORD; -import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; -import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; -import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; -import com.jpexs.helpers.ByteArrayRange; -import com.jpexs.helpers.Helper; -import com.jpexs.helpers.SerializableImage; -import java.awt.Color; -import java.awt.Font; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Rectangle; -import java.awt.Shape; -import java.awt.font.LineMetrics; -import java.awt.image.BufferedImage; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.w3c.dom.Element; - -/** - * - * @author JPEXS - */ -public abstract class TextTag extends CharacterTag implements DrawableTag { - - public TextTag(SWF swf, int id, String name, ByteArrayRange data) { - super(swf, id, name, data); - } - - public abstract MATRIX getTextMatrix(); - - public abstract String getText(String separator); - - public abstract List getFontIds(); - - public abstract String getFormattedText(); - - // use the texts from the "texts" argument when it is not null - public abstract boolean setFormattedText(MissingCharacterHandler missingCharHandler, String formattedText, String[] texts) throws ParseException; - - @Override - public abstract int getCharacterId(); - - public abstract RECT getBounds(); - - public abstract void setBounds(RECT r); - - private static void updateRect(RECT ret, int x, int y) { - if (x < ret.Xmin) { - ret.Xmin = x; - } - if (x > ret.Xmax) { - ret.Xmax = x; - } - if (y < ret.Ymin) { - ret.Ymin = y; - } - if (y > ret.Ymax) { - ret.Ymax = y; - } - } - - public static Map getTextRecordsAttributes(List list, List tags) { - Map att = new HashMap<>(); - RECT textBounds = new RECT(Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE); - FontTag font = null; - int x = 0; - int y = 0; - int textHeight = 12; - int lineSpacing = 0; - double leading = 0; - double ascent = 0; - double descent = 0; - double lineDistance = 0; - - List glyphs = new ArrayList<>(); - boolean firstLine = true; - double top = 0; - List allLeftMargins = new ArrayList<>(); - List allLetterSpacings = new ArrayList<>(); - FontMetrics fontMetrics; - BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); - Graphics graphics = bi.getGraphics(); - Font aFont = null; - int currentLeftMargin; - for (int r = 0; r < list.size(); r++) { - TEXTRECORD rec = list.get(r); - if (rec.styleFlagsHasFont) { - for (Tag t : tags) { - if (t instanceof FontTag) { - FontTag ft = (FontTag) t; - if (ft.getFontId() == rec.fontId) { - font = ft; - } - } - } - textHeight = rec.textHeight; - glyphs = font.getGlyphShapeTable(); - - if (!font.hasLayout()) { - String fontName = FontTag.getFontNameWithFallback(font.getFontName()); - aFont = new Font(fontName, font.getFontStyle(), (int) (textHeight / SWF.unitDivisor)); - fontMetrics = graphics.getFontMetrics(aFont); - LineMetrics lm = fontMetrics.getLineMetrics("A", graphics); - ascent = lm.getAscent(); - descent = lm.getDescent(); - leading = lm.getLeading(); - lineDistance = ascent + descent; - } else { - leading = ((double) font.getLeading() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); - ascent = ((double) font.getAscent() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); - descent = ((double) font.getDescent() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); - lineDistance = ascent + descent; - } - } - currentLeftMargin = 0; - if (rec.styleFlagsHasXOffset) { - x = rec.xOffset; - currentLeftMargin = x; - } - if (rec.styleFlagsHasYOffset) { - if (!firstLine) { - top += ascent + descent; - int topint = (int) (Math.round(top) * SWF.unitDivisor); - lineSpacing = rec.yOffset - topint; - top += lineSpacing / SWF.unitDivisor; - } else { - top = ascent; - } - y = rec.yOffset; - } - firstLine = false; - allLeftMargins.add(currentLeftMargin); - int letterSpacing = 0; - for (int e = 0; e < rec.glyphEntries.length; e++) { - GLYPHENTRY entry = rec.glyphEntries[e]; - GLYPHENTRY nextEntry = null; - if (e < rec.glyphEntries.length - 1) { - nextEntry = rec.glyphEntries[e + 1]; - } - RECT rect = SHAPERECORD.getBounds(glyphs.get(entry.glyphIndex).shapeRecords); - rect.Xmax = (int) Math.round(((double) rect.Xmax * textHeight) / (font.getDivider() * 1024)); - rect.Xmin = (int) Math.round(((double) rect.Xmin * textHeight) / (font.getDivider() * 1024)); - rect.Ymax = (int) Math.round(((double) rect.Ymax * textHeight) / (font.getDivider() * 1024)); - rect.Ymin = (int) Math.round(((double) rect.Ymin * textHeight) / (font.getDivider() * 1024)); - updateRect(textBounds, x + rect.Xmin, y + rect.Ymin); - updateRect(textBounds, x + rect.Xmax, y + rect.Ymax); - int adv = entry.glyphAdvance; - - int defaultAdvance; - if (font.hasLayout()) { - int kerningAdjustment = 0; - if (nextEntry != null) { - kerningAdjustment = font.getGlyphKerningAdjustment(entry.glyphIndex, nextEntry.glyphIndex); - } - defaultAdvance = (int) Math.round(textHeight * (font.getGlyphAdvance(entry.glyphIndex) + kerningAdjustment) / 1024.0); - } else { - defaultAdvance = (int) Math.round(SWF.unitDivisor * FontTag.getSystemFontAdvance(aFont, font.glyphToChar(entry.glyphIndex), nextEntry == null ? null : font.glyphToChar(nextEntry.glyphIndex))); - } - letterSpacing = adv - defaultAdvance; - x += adv / (font.getDivider()); - } - allLetterSpacings.add(letterSpacing); - } - att.put("indent", 0); //? - att.put("rightMargin", 0); //? - att.put("lineSpacing", lineSpacing); - att.put("textBounds", textBounds); - att.put("allLeftMargins", allLeftMargins); - att.put("allLetterSpacings", allLetterSpacings); - return att; - } - - public static SHAPE getBorderShape(RGB borderColor, RGB fillColor, RECT rect) { - SHAPEWITHSTYLE shape = new SHAPEWITHSTYLE(); - shape.fillStyles = new FILLSTYLEARRAY(); - if (fillColor != null) { - shape.fillStyles.fillStyles = new FILLSTYLE[1]; - FILLSTYLE fillStyle = new FILLSTYLE(); - fillStyle.fillStyleType = FILLSTYLE.SOLID; - fillStyle.color = fillColor; - shape.fillStyles.fillStyles[0] = fillStyle; - } else { - shape.fillStyles.fillStyles = new FILLSTYLE[0]; - } - shape.lineStyles = new LINESTYLEARRAY(); - shape.lineStyles.lineStyles = new LINESTYLE[1]; - LINESTYLE lineStyle = new LINESTYLE(); - lineStyle.color = borderColor; - lineStyle.width = 20; - shape.lineStyles.lineStyles[0] = lineStyle; - shape.shapeRecords = new ArrayList<>(); - StyleChangeRecord style = new StyleChangeRecord(); - style.lineStyle = 1; - style.stateLineStyle = true; - if (fillColor != null) { - style.stateFillStyle0 = true; - style.fillStyle0 = 1; - } - style.stateMoveTo = true; - shape.shapeRecords.add(style); - StraightEdgeRecord top = new StraightEdgeRecord(); - top.generalLineFlag = true; - top.deltaX = rect.getWidth(); - StraightEdgeRecord right = new StraightEdgeRecord(); - right.generalLineFlag = true; - right.deltaY = rect.getHeight(); - StraightEdgeRecord bottom = new StraightEdgeRecord(); - bottom.generalLineFlag = true; - bottom.deltaX = -rect.getWidth(); - StraightEdgeRecord left = new StraightEdgeRecord(); - left.generalLineFlag = true; - left.deltaY = -rect.getHeight(); - shape.shapeRecords.add(top); - shape.shapeRecords.add(right); - shape.shapeRecords.add(bottom); - shape.shapeRecords.add(left); - shape.shapeRecords.add(new EndShapeRecord()); - return shape; - } - - public static void drawBorder(SWF swf, SerializableImage image, RGB borderColor, RGB fillColor, RECT rect, MATRIX textMatrix, Matrix transformation, ColorTransform colorTransform) { - Graphics2D g = (Graphics2D) image.getGraphics(); - Matrix mat = transformation.clone(); - mat = mat.concatenate(new Matrix(textMatrix)); - BitmapExporter.export(swf, getBorderShape(borderColor, fillColor, rect), null, image, mat, colorTransform); - } - - public static void staticTextToImage(SWF swf, List textRecords, int numText, SerializableImage image, MATRIX textMatrix, Matrix transformation, ColorTransform colorTransform) { - Color textColor = new Color(0, 0, 0); - FontTag font = null; - int textHeight = 12; - int x = 0; - int y = 0; - List glyphs = new ArrayList<>(); - for (TEXTRECORD rec : textRecords) { - if (rec.styleFlagsHasColor) { - if (numText == 2) { - textColor = colorTransform.apply(rec.textColorA.toColor()); - } else { - textColor = colorTransform.apply(rec.textColor.toColor()); - } - } - if (rec.styleFlagsHasFont) { - font = (FontTag) swf.characters.get(rec.fontId); - glyphs = font.getGlyphShapeTable(); - textHeight = rec.textHeight; - } - if (rec.styleFlagsHasXOffset) { - x = rec.xOffset; - } - if (rec.styleFlagsHasYOffset) { - y = rec.yOffset; - } - - double rat = textHeight / 1024.0 / font.getDivider(); - - for (GLYPHENTRY entry : rec.glyphEntries) { - Matrix mat = transformation.clone(); - mat = mat.concatenate(new Matrix(textMatrix)); - Matrix matTr = Matrix.getTranslateInstance(x, y); - mat = mat.concatenate(matTr); - mat = mat.concatenate(Matrix.getScaleInstance(rat)); - if (entry.glyphIndex != -1) { - // shapeNum: 1 - SHAPE shape = glyphs.get(entry.glyphIndex); - BitmapExporter.export(swf, shape, textColor, image, mat, colorTransform); - x += entry.glyphAdvance; - } - } - } - } - - public static String staticTextToHtmlCanvas(double unitDivisor, SWF swf, List textRecords, int numText, RECT bounds, MATRIX textMatrix, ColorTransform colorTransform) { - Color textColor = new Color(0, 0, 0); - String ret = ""; - FontTag font = null; - int fontId = -1; - int textHeight = 12; - int x = 0; - int y = 0; - - List glyphs = new ArrayList<>(); - for (TEXTRECORD rec : textRecords) { - if (rec.styleFlagsHasColor) { - if (numText == 2) { - textColor = colorTransform.apply(rec.textColorA.toColor()); - } else { - textColor = colorTransform.apply(rec.textColor.toColor()); - } - } - if (rec.styleFlagsHasFont) { - font = (FontTag) swf.characters.get(rec.fontId); - fontId = rec.fontId; - glyphs = font.getGlyphShapeTable(); - textHeight = rec.textHeight; - } - if (rec.styleFlagsHasXOffset) { - x = rec.xOffset; - } - if (rec.styleFlagsHasYOffset) { - y = rec.yOffset; - } - - double rat = textHeight / 1024.0 / font.getDivider(); - - ret += "\tvar textColor = " + CanvasShapeExporter.color(textColor) + ";\r\n"; - for (GLYPHENTRY entry : rec.glyphEntries) { - Matrix mat = (new Matrix(textMatrix).concatenate(Matrix.getTranslateInstance(x, y))).concatenate(Matrix.getScaleInstance(rat)); - if (entry.glyphIndex != -1) { - // shapeNum: 1 - ret += "\tctx.save();\r\n"; - ret += "\tctx.transform(" + mat.scaleX + "," + mat.rotateSkew0 + "," + mat.rotateSkew1 + "," + mat.scaleY + "," + mat.translateX + "," + mat.translateY + ");\r\n"; - ret += "\tfont" + fontId + "(ctx,\"" + ("" + font.glyphToChar(entry.glyphIndex)).replace("\\", "\\\\").replace("\"", "\\\"") + "\",textColor);\r\n"; - ret += "\tctx.restore();\r\n"; - x += entry.glyphAdvance; - } - } - } - return ret; - } - - public static void staticTextToSVG(SWF swf, List textRecords, int numText, SVGExporter exporter, RECT bounds, MATRIX textMatrix, ColorTransform colorTransform) { - Color textColor = new Color(0, 0, 0); - FontTag font = null; - int textHeight = 12; - int x = 0; - int y = 0; - List glyphs = new ArrayList<>(); - for (TEXTRECORD rec : textRecords) { - if (rec.styleFlagsHasColor) { - if (numText == 2) { - textColor = colorTransform.apply(rec.textColorA.toColor()); - } else { - textColor = colorTransform.apply(rec.textColor.toColor()); - } - } - if (rec.styleFlagsHasFont) { - font = (FontTag) swf.characters.get(rec.fontId); - glyphs = font.getGlyphShapeTable(); - textHeight = rec.textHeight; - } - int offsetX = 0; - int offsetY = 0; - if (rec.styleFlagsHasXOffset) { - offsetX = rec.xOffset; - x = offsetX; - } - if (rec.styleFlagsHasYOffset) { - offsetY = rec.yOffset; - y = offsetY; - } - - double rat = textHeight / 1024.0 / font.getDivider(); - - exporter.createSubGroup(new Matrix(textMatrix), null); - if (exporter.useTextTag) { - StringBuilder text = new StringBuilder(); - int totalAdvance = 0; - for (GLYPHENTRY entry : rec.glyphEntries) { - if (entry.glyphIndex != -1) { - char ch = font.glyphToChar(entry.glyphIndex); - text.append(ch); - totalAdvance += entry.glyphAdvance; - } - } - - boolean hasOffset = offsetX != 0 || offsetY != 0; - if (hasOffset) { - exporter.createSubGroup(Matrix.getTranslateInstance(offsetX, offsetY), null); - } - - Element textElement = exporter.createElement("text"); - textElement.setAttribute("font-size", Double.toString(rat * 1024)); - textElement.setAttribute("font-family", font.getFontName()); - textElement.setAttribute("textLength", Double.toString(totalAdvance / SWF.unitDivisor)); - textElement.setAttribute("lengthAdjust", "spacing"); - textElement.setTextContent(text.toString()); - - if (textColor != null) { - RGBA colorA = new RGBA(textColor); - textElement.setAttribute("fill", colorA.toHexRGB()); - if (colorA.alpha != 255) { - textElement.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); - } - } - - exporter.addToGroup(textElement); - FontExportMode fontExportMode = FontExportMode.WOFF; - exporter.addStyle(font.getFontName(), new FontExporter().exportFont(font, fontExportMode), fontExportMode); - - if (hasOffset) { - exporter.endGroup(); - } - } else { - for (GLYPHENTRY entry : rec.glyphEntries) { - Matrix mat = Matrix.getTranslateInstance(x, y).concatenate(Matrix.getScaleInstance(rat)); - if (entry.glyphIndex != -1) { - // shapeNum: 1 - SHAPE shape = glyphs.get(entry.glyphIndex); - char ch = font.glyphToChar(entry.glyphIndex); - - String charId = null; - Map chs; - if (exporter.exportedChars.containsKey(font)) { - chs = exporter.exportedChars.get(font); - if (chs.containsKey(ch)) { - charId = chs.get(ch); - } - } else { - chs = new HashMap<>(); - exporter.exportedChars.put(font, chs); - } - - if (charId == null) { - charId = exporter.getUniqueId(Helper.getValidHtmlId("font_" + font.getFontName() + "_" + ch)); - exporter.createDefGroup(null, charId); - SVGShapeExporter shapeExporter = new SVGShapeExporter(swf, shape, exporter, null, colorTransform); - shapeExporter.export(); - exporter.endGroup(); - chs.put(ch, charId); - } - - Element charImage = exporter.addUse(mat, bounds, charId); - if (textColor != null) { - RGBA colorA = new RGBA(textColor); - charImage.setAttribute("fill", colorA.toHexRGB()); - if (colorA.alpha != 255) { - charImage.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); - } - } - x += entry.glyphAdvance; - } - } - } - exporter.endGroup(); - } - } - - @Override - public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation) { - RECT r = getBounds(); - return new Rectangle(r.Xmin, r.Ymin, r.getWidth(), r.getHeight()); //TODO: match character shapes - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.base; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.exporters.FontExporter; +import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; +import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter; +import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; +import com.jpexs.decompiler.flash.exporters.shape.BitmapExporter; +import com.jpexs.decompiler.flash.exporters.shape.CanvasShapeExporter; +import com.jpexs.decompiler.flash.exporters.shape.SVGShapeExporter; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.text.ParseException; +import com.jpexs.decompiler.flash.timeline.DepthState; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.FILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import com.jpexs.decompiler.flash.types.LINESTYLE; +import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.MATRIX; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.TEXTRECORD; +import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; +import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; +import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; +import com.jpexs.helpers.ByteArrayRange; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.SerializableImage; +import java.awt.Color; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Rectangle; +import java.awt.Shape; +import java.awt.font.LineMetrics; +import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.w3c.dom.Element; + +/** + * + * @author JPEXS + */ +public abstract class TextTag extends CharacterTag implements DrawableTag { + + public TextTag(SWF swf, int id, String name, ByteArrayRange data) { + super(swf, id, name, data); + } + + public abstract MATRIX getTextMatrix(); + + public abstract String getText(String separator); + + public abstract List getFontIds(); + + public abstract String getFormattedText(); + + // use the texts from the "texts" argument when it is not null + public abstract boolean setFormattedText(MissingCharacterHandler missingCharHandler, String formattedText, String[] texts) throws ParseException; + + @Override + public abstract int getCharacterId(); + + public abstract RECT getBounds(); + + public abstract void setBounds(RECT r); + + private static void updateRect(RECT ret, int x, int y) { + if (x < ret.Xmin) { + ret.Xmin = x; + } + if (x > ret.Xmax) { + ret.Xmax = x; + } + if (y < ret.Ymin) { + ret.Ymin = y; + } + if (y > ret.Ymax) { + ret.Ymax = y; + } + } + + public static Map getTextRecordsAttributes(List list, List tags) { + Map att = new HashMap<>(); + RECT textBounds = new RECT(Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE); + FontTag font = null; + int x = 0; + int y = 0; + int textHeight = 12; + int lineSpacing = 0; + double leading = 0; + double ascent = 0; + double descent = 0; + double lineDistance = 0; + + List glyphs = new ArrayList<>(); + boolean firstLine = true; + double top = 0; + List allLeftMargins = new ArrayList<>(); + List allLetterSpacings = new ArrayList<>(); + FontMetrics fontMetrics; + BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + Graphics graphics = bi.getGraphics(); + Font aFont = null; + int currentLeftMargin; + for (int r = 0; r < list.size(); r++) { + TEXTRECORD rec = list.get(r); + if (rec.styleFlagsHasFont) { + for (Tag t : tags) { + if (t instanceof FontTag) { + FontTag ft = (FontTag) t; + if (ft.getFontId() == rec.fontId) { + font = ft; + } + } + } + textHeight = rec.textHeight; + glyphs = font.getGlyphShapeTable(); + + if (!font.hasLayout()) { + String fontName = FontTag.getFontNameWithFallback(font.getFontName()); + aFont = new Font(fontName, font.getFontStyle(), (int) (textHeight / SWF.unitDivisor)); + fontMetrics = graphics.getFontMetrics(aFont); + LineMetrics lm = fontMetrics.getLineMetrics("A", graphics); + ascent = lm.getAscent(); + descent = lm.getDescent(); + leading = lm.getLeading(); + lineDistance = ascent + descent; + } else { + leading = ((double) font.getLeading() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); + ascent = ((double) font.getAscent() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); + descent = ((double) font.getDescent() * textHeight / 1024.0 / font.getDivider() / SWF.unitDivisor); + lineDistance = ascent + descent; + } + } + currentLeftMargin = 0; + if (rec.styleFlagsHasXOffset) { + x = rec.xOffset; + currentLeftMargin = x; + } + if (rec.styleFlagsHasYOffset) { + if (!firstLine) { + top += ascent + descent; + int topint = (int) (Math.round(top) * SWF.unitDivisor); + lineSpacing = rec.yOffset - topint; + top += lineSpacing / SWF.unitDivisor; + } else { + top = ascent; + } + y = rec.yOffset; + } + firstLine = false; + allLeftMargins.add(currentLeftMargin); + int letterSpacing = 0; + for (int e = 0; e < rec.glyphEntries.length; e++) { + GLYPHENTRY entry = rec.glyphEntries[e]; + GLYPHENTRY nextEntry = null; + if (e < rec.glyphEntries.length - 1) { + nextEntry = rec.glyphEntries[e + 1]; + } + RECT rect = SHAPERECORD.getBounds(glyphs.get(entry.glyphIndex).shapeRecords); + rect.Xmax = (int) Math.round(((double) rect.Xmax * textHeight) / (font.getDivider() * 1024)); + rect.Xmin = (int) Math.round(((double) rect.Xmin * textHeight) / (font.getDivider() * 1024)); + rect.Ymax = (int) Math.round(((double) rect.Ymax * textHeight) / (font.getDivider() * 1024)); + rect.Ymin = (int) Math.round(((double) rect.Ymin * textHeight) / (font.getDivider() * 1024)); + updateRect(textBounds, x + rect.Xmin, y + rect.Ymin); + updateRect(textBounds, x + rect.Xmax, y + rect.Ymax); + int adv = entry.glyphAdvance; + + int defaultAdvance; + if (font.hasLayout()) { + int kerningAdjustment = 0; + if (nextEntry != null) { + kerningAdjustment = font.getGlyphKerningAdjustment(entry.glyphIndex, nextEntry.glyphIndex); + } + defaultAdvance = (int) Math.round(textHeight * (font.getGlyphAdvance(entry.glyphIndex) + kerningAdjustment) / 1024.0); + } else { + defaultAdvance = (int) Math.round(SWF.unitDivisor * FontTag.getSystemFontAdvance(aFont, font.glyphToChar(entry.glyphIndex), nextEntry == null ? null : font.glyphToChar(nextEntry.glyphIndex))); + } + letterSpacing = adv - defaultAdvance; + x += adv / (font.getDivider()); + } + allLetterSpacings.add(letterSpacing); + } + att.put("indent", 0); //? + att.put("rightMargin", 0); //? + att.put("lineSpacing", lineSpacing); + att.put("textBounds", textBounds); + att.put("allLeftMargins", allLeftMargins); + att.put("allLetterSpacings", allLetterSpacings); + return att; + } + + public static SHAPE getBorderShape(RGB borderColor, RGB fillColor, RECT rect) { + SHAPEWITHSTYLE shape = new SHAPEWITHSTYLE(); + shape.fillStyles = new FILLSTYLEARRAY(); + if (fillColor != null) { + shape.fillStyles.fillStyles = new FILLSTYLE[1]; + FILLSTYLE fillStyle = new FILLSTYLE(); + fillStyle.fillStyleType = FILLSTYLE.SOLID; + fillStyle.color = fillColor; + shape.fillStyles.fillStyles[0] = fillStyle; + } else { + shape.fillStyles.fillStyles = new FILLSTYLE[0]; + } + shape.lineStyles = new LINESTYLEARRAY(); + shape.lineStyles.lineStyles = new LINESTYLE[1]; + LINESTYLE lineStyle = new LINESTYLE(); + lineStyle.color = borderColor; + lineStyle.width = 20; + shape.lineStyles.lineStyles[0] = lineStyle; + shape.shapeRecords = new ArrayList<>(); + StyleChangeRecord style = new StyleChangeRecord(); + style.lineStyle = 1; + style.stateLineStyle = true; + if (fillColor != null) { + style.stateFillStyle0 = true; + style.fillStyle0 = 1; + } + style.stateMoveTo = true; + shape.shapeRecords.add(style); + StraightEdgeRecord top = new StraightEdgeRecord(); + top.generalLineFlag = true; + top.deltaX = rect.getWidth(); + StraightEdgeRecord right = new StraightEdgeRecord(); + right.generalLineFlag = true; + right.deltaY = rect.getHeight(); + StraightEdgeRecord bottom = new StraightEdgeRecord(); + bottom.generalLineFlag = true; + bottom.deltaX = -rect.getWidth(); + StraightEdgeRecord left = new StraightEdgeRecord(); + left.generalLineFlag = true; + left.deltaY = -rect.getHeight(); + shape.shapeRecords.add(top); + shape.shapeRecords.add(right); + shape.shapeRecords.add(bottom); + shape.shapeRecords.add(left); + shape.shapeRecords.add(new EndShapeRecord()); + return shape; + } + + public static void drawBorder(SWF swf, SerializableImage image, RGB borderColor, RGB fillColor, RECT rect, MATRIX textMatrix, Matrix transformation, ColorTransform colorTransform) { + Graphics2D g = (Graphics2D) image.getGraphics(); + Matrix mat = transformation.clone(); + mat = mat.concatenate(new Matrix(textMatrix)); + BitmapExporter.export(swf, getBorderShape(borderColor, fillColor, rect), null, image, mat, colorTransform); + } + + public static void staticTextToImage(SWF swf, List textRecords, int numText, SerializableImage image, MATRIX textMatrix, Matrix transformation, ColorTransform colorTransform) { + Color textColor = new Color(0, 0, 0); + FontTag font = null; + int textHeight = 12; + int x = 0; + int y = 0; + List glyphs = new ArrayList<>(); + for (TEXTRECORD rec : textRecords) { + if (rec.styleFlagsHasColor) { + if (numText == 2) { + textColor = colorTransform.apply(rec.textColorA.toColor()); + } else { + textColor = colorTransform.apply(rec.textColor.toColor()); + } + } + if (rec.styleFlagsHasFont) { + font = (FontTag) swf.characters.get(rec.fontId); + glyphs = font.getGlyphShapeTable(); + textHeight = rec.textHeight; + } + if (rec.styleFlagsHasXOffset) { + x = rec.xOffset; + } + if (rec.styleFlagsHasYOffset) { + y = rec.yOffset; + } + + double rat = textHeight / 1024.0 / font.getDivider(); + + for (GLYPHENTRY entry : rec.glyphEntries) { + Matrix mat = transformation.clone(); + mat = mat.concatenate(new Matrix(textMatrix)); + Matrix matTr = Matrix.getTranslateInstance(x, y); + mat = mat.concatenate(matTr); + mat = mat.concatenate(Matrix.getScaleInstance(rat)); + if (entry.glyphIndex != -1) { + // shapeNum: 1 + SHAPE shape = glyphs.get(entry.glyphIndex); + BitmapExporter.export(swf, shape, textColor, image, mat, colorTransform); + x += entry.glyphAdvance; + } + } + } + } + + public static String staticTextToHtmlCanvas(double unitDivisor, SWF swf, List textRecords, int numText, RECT bounds, MATRIX textMatrix, ColorTransform colorTransform) { + Color textColor = new Color(0, 0, 0); + String ret = ""; + FontTag font = null; + int fontId = -1; + int textHeight = 12; + int x = 0; + int y = 0; + + List glyphs = new ArrayList<>(); + for (TEXTRECORD rec : textRecords) { + if (rec.styleFlagsHasColor) { + if (numText == 2) { + textColor = colorTransform.apply(rec.textColorA.toColor()); + } else { + textColor = colorTransform.apply(rec.textColor.toColor()); + } + } + if (rec.styleFlagsHasFont) { + font = (FontTag) swf.characters.get(rec.fontId); + fontId = rec.fontId; + glyphs = font.getGlyphShapeTable(); + textHeight = rec.textHeight; + } + if (rec.styleFlagsHasXOffset) { + x = rec.xOffset; + } + if (rec.styleFlagsHasYOffset) { + y = rec.yOffset; + } + + double rat = textHeight / 1024.0 / font.getDivider(); + + ret += "\tvar textColor = " + CanvasShapeExporter.color(textColor) + ";\r\n"; + for (GLYPHENTRY entry : rec.glyphEntries) { + Matrix mat = (new Matrix(textMatrix).concatenate(Matrix.getTranslateInstance(x, y))).concatenate(Matrix.getScaleInstance(rat)); + if (entry.glyphIndex != -1) { + // shapeNum: 1 + ret += "\tctx.save();\r\n"; + ret += "\tctx.transform(" + mat.scaleX + "," + mat.rotateSkew0 + "," + mat.rotateSkew1 + "," + mat.scaleY + "," + mat.translateX + "," + mat.translateY + ");\r\n"; + ret += "\tfont" + fontId + "(ctx,\"" + ("" + font.glyphToChar(entry.glyphIndex)).replace("\\", "\\\\").replace("\"", "\\\"") + "\",textColor);\r\n"; + ret += "\tctx.restore();\r\n"; + x += entry.glyphAdvance; + } + } + } + return ret; + } + + public static void staticTextToSVG(SWF swf, List textRecords, int numText, SVGExporter exporter, RECT bounds, MATRIX textMatrix, ColorTransform colorTransform) { + Color textColor = new Color(0, 0, 0); + FontTag font = null; + int textHeight = 12; + int x = 0; + int y = 0; + List glyphs = new ArrayList<>(); + for (TEXTRECORD rec : textRecords) { + if (rec.styleFlagsHasColor) { + if (numText == 2) { + textColor = colorTransform.apply(rec.textColorA.toColor()); + } else { + textColor = colorTransform.apply(rec.textColor.toColor()); + } + } + if (rec.styleFlagsHasFont) { + font = (FontTag) swf.characters.get(rec.fontId); + glyphs = font.getGlyphShapeTable(); + textHeight = rec.textHeight; + } + int offsetX = 0; + int offsetY = 0; + if (rec.styleFlagsHasXOffset) { + offsetX = rec.xOffset; + x = offsetX; + } + if (rec.styleFlagsHasYOffset) { + offsetY = rec.yOffset; + y = offsetY; + } + + double rat = textHeight / 1024.0 / font.getDivider(); + + exporter.createSubGroup(new Matrix(textMatrix), null); + if (exporter.useTextTag) { + StringBuilder text = new StringBuilder(); + int totalAdvance = 0; + for (GLYPHENTRY entry : rec.glyphEntries) { + if (entry.glyphIndex != -1) { + char ch = font.glyphToChar(entry.glyphIndex); + text.append(ch); + totalAdvance += entry.glyphAdvance; + } + } + + boolean hasOffset = offsetX != 0 || offsetY != 0; + if (hasOffset) { + exporter.createSubGroup(Matrix.getTranslateInstance(offsetX, offsetY), null); + } + + Element textElement = exporter.createElement("text"); + textElement.setAttribute("font-size", Double.toString(rat * 1024)); + textElement.setAttribute("font-family", font.getFontName()); + textElement.setAttribute("textLength", Double.toString(totalAdvance / SWF.unitDivisor)); + textElement.setAttribute("lengthAdjust", "spacing"); + textElement.setTextContent(text.toString()); + + if (textColor != null) { + RGBA colorA = new RGBA(textColor); + textElement.setAttribute("fill", colorA.toHexRGB()); + if (colorA.alpha != 255) { + textElement.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); + } + } + + exporter.addToGroup(textElement); + FontExportMode fontExportMode = FontExportMode.WOFF; + exporter.addStyle(font.getFontName(), new FontExporter().exportFont(font, fontExportMode), fontExportMode); + + if (hasOffset) { + exporter.endGroup(); + } + } else { + for (GLYPHENTRY entry : rec.glyphEntries) { + Matrix mat = Matrix.getTranslateInstance(x, y).concatenate(Matrix.getScaleInstance(rat)); + if (entry.glyphIndex != -1) { + // shapeNum: 1 + SHAPE shape = glyphs.get(entry.glyphIndex); + char ch = font.glyphToChar(entry.glyphIndex); + + String charId = null; + Map chs; + if (exporter.exportedChars.containsKey(font)) { + chs = exporter.exportedChars.get(font); + if (chs.containsKey(ch)) { + charId = chs.get(ch); + } + } else { + chs = new HashMap<>(); + exporter.exportedChars.put(font, chs); + } + + if (charId == null) { + charId = exporter.getUniqueId(Helper.getValidHtmlId("font_" + font.getFontName() + "_" + ch)); + exporter.createDefGroup(null, charId); + SVGShapeExporter shapeExporter = new SVGShapeExporter(swf, shape, exporter, null, colorTransform); + shapeExporter.export(); + exporter.endGroup(); + chs.put(ch, charId); + } + + Element charImage = exporter.addUse(mat, bounds, charId); + if (textColor != null) { + RGBA colorA = new RGBA(textColor); + charImage.setAttribute("fill", colorA.toHexRGB()); + if (colorA.alpha != 255) { + charImage.setAttribute("fill-opacity", Float.toString(colorA.getAlphaFloat())); + } + } + x += entry.glyphAdvance; + } + } + } + exporter.endGroup(); + } + } + + @Override + public Shape getOutline(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation) { + RECT r = getBounds(); + return new Rectangle(r.Xmin, r.Ymin, r.getWidth(), r.getHeight()); //TODO: match character shapes + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java new file mode 100644 index 000000000..412b723a2 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +/** + * + * + * @author JPEXS + */ +public class CharacterWithStyle { + + public char character; + + public TextStyle style; +} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java similarity index 60% rename from src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java index 9d6685197..32e214367 100644 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/DynamicTextModel.java @@ -1,77 +1,76 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import com.jpexs.decompiler.flash.types.GLYPHENTRY; -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * @author JPEXS - */ -public class DynamicTextModel { - - public List paragraphs = new ArrayList<>(); - - private Paragraph paragraph; - public TextStyle style; - public int width; - - public DynamicTextModel() { - - } - - public void addGlyph(char character, GLYPHENTRY glyphEntry) { - - if (paragraph == null) { - paragraph = new Paragraph(this); - paragraphs.add(paragraph); - } - paragraph.addGlyph(character, glyphEntry); - } - - public void newParagraph() { - - paragraph = null; - } - - public void newWord() { - - if (paragraph != null) { - paragraph.newWord(); - } - } - - public void newRecord() { - - if (paragraph != null) { - paragraph.newRecord(); - } - } - - public int calculateTexWidths() { - - int width = 0; - for (Paragraph p : paragraphs) { - width += p.calculateTexWidths(); - } - this.width = width; - return width; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import java.util.ArrayList; +import java.util.List; + +/** + * + * + * @author JPEXS + */ +public class DynamicTextModel { + + public List paragraphs = new ArrayList<>(); + + private Paragraph paragraph; + public TextStyle style; + public int width; + + public DynamicTextModel() { + + } + + public void addGlyph(char character, GLYPHENTRY glyphEntry) { + + if (paragraph == null) { + paragraph = new Paragraph(this); + paragraphs.add(paragraph); + } + paragraph.addGlyph(character, glyphEntry); + } + + public void newParagraph() { + + paragraph = null; + } + + public void newWord() { + + if (paragraph != null) { + paragraph.newWord(); + } + } + + public void newRecord() { + + if (paragraph != null) { + paragraph.newRecord(); + } + } + + public int calculateTexWidths() { + + int width = 0; + for (Paragraph p : paragraphs) { + width += p.calculateTexWidths(); + } + this.width = width; + return width; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java new file mode 100644 index 000000000..8a24c97f6 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import com.jpexs.decompiler.flash.types.GLYPHENTRY; + +/** + * + * + * @author JPEXS + */ +public class GlyphCharacter { + + public GLYPHENTRY glyphEntry; + + public char character; + + public GlyphCharacter(char character, GLYPHENTRY glyphEntry) { + + this.character = character; + this.glyphEntry = glyphEntry; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java similarity index 57% rename from src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java index b685084ca..bdcb646a2 100644 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java @@ -1,71 +1,70 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import com.jpexs.decompiler.flash.types.GLYPHENTRY; -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * @author JPEXS - */ -public class Paragraph { - - public List words = new ArrayList<>(); - - private Word word; - private final DynamicTextModel model; - public int width; - - public Paragraph(DynamicTextModel model) { - - this.model = model; - } - - public void addGlyph(char character, GLYPHENTRY glyphEntry) { - - if (word == null) { - word = new Word(model); - words.add(word); - } - word.addGlyph(character, glyphEntry); - } - - public void newWord() { - - word = null; - } - - public void newRecord() { - - if (word != null) { - word.newRecord(); - } - } - - public int calculateTexWidths() { - - int width = 0; - for (Word w : words) { - width += w.calculateTexWidths(); - } - this.width = width; - return width; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import java.util.ArrayList; +import java.util.List; + +/** + * + * + * @author JPEXS + */ +public class Paragraph { + + public List words = new ArrayList<>(); + + private Word word; + private final DynamicTextModel model; + public int width; + + public Paragraph(DynamicTextModel model) { + + this.model = model; + } + + public void addGlyph(char character, GLYPHENTRY glyphEntry) { + + if (word == null) { + word = new Word(model); + words.add(word); + } + word.addGlyph(character, glyphEntry); + } + + public void newWord() { + + word = null; + } + + public void newRecord() { + + if (word != null) { + word.newRecord(); + } + } + + public int calculateTexWidths() { + + int width = 0; + for (Word w : words) { + width += w.calculateTexWidths(); + } + this.width = width; + return width; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java new file mode 100644 index 000000000..d89db2513 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * + * @author JPEXS + */ +public class SameStyleTextRecord { + + public TextStyle style; + + public int xOffset; + + public int width; + + public List glyphEntries = new ArrayList<>(); + + public int calculateTexWidths() { + + int width = 0; + for (GlyphCharacter gc : glyphEntries) { + width += gc.glyphEntry.glyphAdvance; + } + this.width = width; + return width; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java similarity index 50% rename from src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java index 4af976492..05321d605 100644 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/TextStyle.java @@ -1,54 +1,53 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import com.jpexs.decompiler.flash.tags.base.FontTag; -import com.jpexs.decompiler.flash.types.RGBA; - -/** - * - * - * @author JPEXS - */ -public class TextStyle { - - public FontTag font; - - public int fontHeight; - - public int fontLeading; - - public boolean bold; - - public boolean italic; - - public boolean underlined; - - public RGBA textColor; - - @Override - public TextStyle clone() { - TextStyle result = new TextStyle(); - result.font = font; - result.fontHeight = fontHeight; - result.bold = bold; - result.italic = italic; - result.underlined = underlined; - result.textColor = textColor; - return result; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import com.jpexs.decompiler.flash.tags.base.FontTag; +import com.jpexs.decompiler.flash.types.RGBA; + +/** + * + * + * @author JPEXS + */ +public class TextStyle { + + public FontTag font; + + public int fontHeight; + + public int fontLeading; + + public boolean bold; + + public boolean italic; + + public boolean underlined; + + public RGBA textColor; + + @Override + public TextStyle clone() { + TextStyle result = new TextStyle(); + result.font = font; + result.fontHeight = fontHeight; + result.bold = bold; + result.italic = italic; + result.underlined = underlined; + result.textColor = textColor; + return result; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java similarity index 58% rename from src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java index fb14ca240..9e3ec3771 100644 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import com.jpexs.decompiler.flash.types.GLYPHENTRY; -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * @author JPEXS - */ -public class Word { - - public List records = new ArrayList<>(); - - private SameStyleTextRecord record; - private final DynamicTextModel model; - public int width; - - public Word(DynamicTextModel model) { - this.model = model; - } - - public void addGlyph(char character, GLYPHENTRY glyphEntry) { - - if (record == null) { - record = new SameStyleTextRecord(); - record.style = model.style; - records.add(record); - } - record.glyphEntries.add(new GlyphCharacter(character, glyphEntry)); - } - - public void newRecord() { - - record = null; - } - - public int calculateTexWidths() { - - int width = 0; - for (SameStyleTextRecord r : records) { - width += r.calculateTexWidths(); - } - this.width = width; - return width; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.dynamictext; + +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import java.util.ArrayList; +import java.util.List; + +/** + * + * + * @author JPEXS + */ +public class Word { + + public List records = new ArrayList<>(); + + private SameStyleTextRecord record; + private final DynamicTextModel model; + public int width; + + public Word(DynamicTextModel model) { + this.model = model; + } + + public void addGlyph(char character, GLYPHENTRY glyphEntry) { + + if (record == null) { + record = new SameStyleTextRecord(); + record.style = model.style; + records.add(record); + } + record.glyphEntries.add(new GlyphCharacter(character, glyphEntry)); + } + + public void newRecord() { + + record = null; + } + + public int calculateTexWidths() { + + int width = 0; + for (SameStyleTextRecord r : records) { + width += r.calculateTexWidths(); + } + this.width = width; + return width; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java similarity index 80% rename from src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java index f19ce48c6..9fa8be1f0 100644 --- a/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java @@ -1,139 +1,138 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.font; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - */ -public class CharacterRanges { - - public static int rangeCount() { - return languages.size(); - } - - public static String rangeName(int index) { - return languages.get(index).name; - } - - public static int glyphCount(int index) { - List ranges = languages.get(index).ranges; - int cnt = 0; - for (Range r : ranges) { - for (int i = r.from; i <= r.to; i++) { - cnt++; - } - } - return cnt; - } - - public static List rangeNames() { - List ret = new ArrayList<>(); - for (int i = 0; i < rangeCount(); i++) { - ret.add(rangeName(i)); - } - return ret; - } - - public static int[] rangeCodes(int index) { - List ranges = languages.get(index).ranges; - List ret = new ArrayList<>(); - for (Range r : ranges) { - for (int i = r.from; i <= r.to; i++) { - ret.add(i); - } - } - int[] retArr = new int[ret.size()]; - for (int i = 0; i < ret.size(); i++) { - retArr[i] = ret.get(i); - } - return retArr; - } - - private static class Range { - - public int from; - public int to; - - public Range(int fromto) { - from = fromto; - to = fromto; - } - - public Range(int from, int to) { - this.from = from; - this.to = to; - } - - @Override - public String toString() { - if (from == to) { - return "" + from; - } - return "" + from + "-" + to; - } - } - - private static class Language { - - String name; - List ranges; - - public Language(String name) { - this.name = name; - ranges = new ArrayList<>(); - } - - public Language(String name, List ranges) { - this.name = name; - this.ranges = ranges; - } - } - private static final List languages = new ArrayList<>(); - - static { - BufferedReader br = new BufferedReader(new InputStreamReader(CharacterRanges.class.getResourceAsStream("/com/jpexs/decompiler/flash/tags/font/character_ranges.txt"))); - String s; - try { - while ((s = br.readLine()) != null) { - String[] parts = s.split(":"); - Language lng = new Language(parts[0]); - String[] ranges = parts[1].split(","); - for (String r : ranges) { - if (r.contains("-")) { - String[] fromTo = r.split("-"); - lng.ranges.add(new Range(Integer.parseInt(fromTo[0], 16), Integer.parseInt(fromTo[1], 16))); - } else { - lng.ranges.add(new Range(Integer.parseInt(r, 16))); - } - } - languages.add(lng); - } - } catch (IOException ex) { - Logger.getLogger(CharacterRanges.class.getName()).log(Level.SEVERE, "Cannot read unicode character ranges", ex); - } - - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.font; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + */ +public class CharacterRanges { + + public static int rangeCount() { + return languages.size(); + } + + public static String rangeName(int index) { + return languages.get(index).name; + } + + public static int glyphCount(int index) { + List ranges = languages.get(index).ranges; + int cnt = 0; + for (Range r : ranges) { + for (int i = r.from; i <= r.to; i++) { + cnt++; + } + } + return cnt; + } + + public static List rangeNames() { + List ret = new ArrayList<>(); + for (int i = 0; i < rangeCount(); i++) { + ret.add(rangeName(i)); + } + return ret; + } + + public static int[] rangeCodes(int index) { + List ranges = languages.get(index).ranges; + List ret = new ArrayList<>(); + for (Range r : ranges) { + for (int i = r.from; i <= r.to; i++) { + ret.add(i); + } + } + int[] retArr = new int[ret.size()]; + for (int i = 0; i < ret.size(); i++) { + retArr[i] = ret.get(i); + } + return retArr; + } + + private static class Range { + + public int from; + public int to; + + public Range(int fromto) { + from = fromto; + to = fromto; + } + + public Range(int from, int to) { + this.from = from; + this.to = to; + } + + @Override + public String toString() { + if (from == to) { + return "" + from; + } + return "" + from + "-" + to; + } + } + + private static class Language { + + String name; + List ranges; + + public Language(String name) { + this.name = name; + ranges = new ArrayList<>(); + } + + public Language(String name, List ranges) { + this.name = name; + this.ranges = ranges; + } + } + private static final List languages = new ArrayList<>(); + + static { + BufferedReader br = new BufferedReader(new InputStreamReader(CharacterRanges.class.getResourceAsStream("/com/jpexs/decompiler/flash/tags/font/character_ranges.txt"))); + String s; + try { + while ((s = br.readLine()) != null) { + String[] parts = s.split(":"); + Language lng = new Language(parts[0]); + String[] ranges = parts[1].split(","); + for (String r : ranges) { + if (r.contains("-")) { + String[] fromTo = r.split("-"); + lng.ranges.add(new Range(Integer.parseInt(fromTo[0], 16), Integer.parseInt(fromTo[1], 16))); + } else { + lng.ranges.add(new Range(Integer.parseInt(r, 16))); + } + } + languages.add(lng); + } + } catch (IOException ex) { + Logger.getLogger(CharacterRanges.class.getName()).log(Level.SEVERE, "Cannot read unicode character ranges", ex); + } + + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt similarity index 99% rename from src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt index fddf78476..312850cdc 100644 --- a/src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/character_ranges.txt @@ -1,25 +1,25 @@ -Uppercase:0020,0041-005a -Lowercase:0020,0061-007a -Numerals:0030-0039 -Punctuation:0020-002f,003a-0040,005b-0060,007b-007e -Basic Latin:0020-002f,0030-0039,003a-0040,0041-005a,005b-0060,0061-007a,007b-007e -Japanese Kana:3000-303f,3041-309f,30a0-30ff,ff61-ff9f -Japanese Kanji - Level 1:00a7-00a8,00b0-00b1,00b4,00b6,00d7,00f7,2010,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2103,212b,2190-2193,21d2,21d4,2200,2202-2203,2207-2208,220b,221a,221d-221e,2220,2225,2227-222c,2234-2235,223d,2252,2260-2261,2266-2267,226a-226b,2282-2283,2286-2287,22a5,2312,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25ef,2605-2606,2640,2642,266a,266d,266f,3000-3003,3005-3015,309b-309e,30fb-30fe,4e00-4e01,4e03,4e07-4e0b,4e0d-4e0e,4e11,4e14,4e16,4e18-4e19,4e1e,4e21,4e26,4e2d,4e32,4e38-4e39,4e3b,4e43,4e45,4e4b,4e4d-4e4f,4e57,4e59,4e5d-4e5f,4e71,4e73,4e7e,4e80,4e86,4e88-4e89,4e8b-4e8c,4e91-4e92,4e94-4e95,4e98-4e99,4e9b-4e9c,4ea1,4ea4-4ea6,4ea8,4eab-4eae,4eba,4ec0-4ec1,4ec7,4eca-4ecb,4ecf,4ed4-4ed6,4ed8-4ed9,4edd,4ee3-4ee5,4eee,4ef0,4ef2,4ef6,4efb,4f01,4f0a,4f0d-4f11,4f1a,4f1d,4f2f,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46,4f4d-4f51,4f53,4f55,4f59,4f5c,4f73,4f75,4f7c,4f7f,4f83,4f8b,4f8d,4f9b,4f9d,4fa0-4fa1,4fad-4faf,4fb5-4fb6,4fbf,4fc2-4fc4,4fca,4fd7,4fdd,4fe1,4fe3,4fee,4ff3,4ff5,4ff8,4ffa,5009,500b,500d,5012,5016,5019,501f,5023-5024,5026,502b,502d,5036,5039,5049,504f,505c,5065,5072,5074-5076,507d,508d,5091,5098-5099,50ac-50ad,50b5,50b7,50be,50c5,50cd,50cf,50d1,50d5,50da,50e7,50fb,5100,5104,5112,511f,512a,5132,5141,5143-5149,514b,514d-514e,5150,515a,515c,5165,5168,516b-516d,5171,5175-5178,517c,5185-5186,518a,518d,5192,5197,5199,51a0,51a5,51a8,51ac,51b4,51b6-51b7,51c4,51c6,51cb-51cd,51dd,51e1,51e6-51e7,51ea,51f1,51f6,51f8-51fa,51fd,5200,5203,5206-5208,520a,5211,5217,521d,5224-5225,5229,5230,5236-5238,523a-523b,5243,5247,524a,524d,5256,525b,5263-5265,526f-5270,5272,5275,5283,5287,5289,529b,529f-52a0,52a3,52a9-52ab,52b1,52b4,52b9,52be,52c3,52c5,52c7,52c9,52d5,52d8-52d9,52dd,52df,52e2,52e4,52e7,52f2,52fa,52fe-52ff,5301-5302,5305,5316-5317,5319,531d,5320-5321,532a,5339-533b,533f,5341,5343,5347-5348,534a,5351-5354,5357-5358,535a,535c,5360,5366,536f-5371,5373-5375,5378,537f,5384,5398,539a,539f,53a8-53a9,53ad,53b3,53bb,53c2,53c8-53ce,53d4,53d6-53d7,53d9,53db,53e1-53e5,53e9-53ec,53ef-53f3,53f6-53f8,5403-5404,5408-5411,541b,541f-5420,5426,542b,5438-5439,543b,543e,5442,5446,5448-544a,5451,5468,546a,5473,547c-547d,548b-548c,54b2-54b3,54bd,54c0-54c1,54c9,54e1,54e8-54e9,54f2,5504,5506-5507,5510,5516,552f,5531,553e,5544,5546,554f,5553,5584,5589,558b,559a,559c-559d,55a7,55aa-55ac,55b0,55b6,55e3,5606,5609,5617-5618,5629,5631,5642,564c,565b,5668,5674,5678,567a,5687,56a2,56da-56db,56de,56e0,56e3,56f0,56f2-56f3,56fa,56fd,5703,570f,5712,571f,5727-5728,572d,5730,5742,5747,574a,5750-5751,5764,5766,576a,5782,578b,57a2-57a3,57cb,57ce,57dc,57df-57e0,57f4,57f7,57f9-57fa,57fc,5800,5802,5805-5806,5815,5824,582a,5830-5831,5834-5835,583a,5840-5841,584a,5851,5854,5857-585a,585e,5869,586b,5875,587e,5883,5893,5897,589c,58a8,58b3,58be,58c1,58c7,58ca,58cc,58d5,58eb-58ec,58ee,58f0-58f2,58f7,5909,590f,5915-5916,5919-591a,591c,5922,5927,5929-592b,592e,5931,5937,5944,5947-5949,594f,5951,5954,5957,5965,5968,596a,596e,5973-5974,597d,5982-5984,598a,5993,5996,5999,59a5,59a8,59ac,59b9,59bb,59be,59c9,59cb,59d0-59d1,59d3-59d4,59e5-59e6,59ea-59eb,59f6,59fb,59ff,5a01,5a03,5a18,5a20,5a29,5a2f,5a3c,5a41,5a46,5a5a,5a66,5a7f,5a92,5a9b,5ac1,5ac9,5acc,5ae1,5b09,5b22,5b2c,5b30,5b50,5b54,5b57-5b58,5b5c-5b5d,5b5f,5b63-5b64,5b66,5b6b,5b85,5b87-5b89,5b8b-5b8d,5b8f,5b95,5b97-5b9d,5b9f,5ba2-5ba5,5bae,5bb0,5bb3-5bb6,5bb9,5bbf,5bc2,5bc4-5bc6,5bcc,5bd2-5bd3,5bdb,5bdd,5bdf,5be1,5be7,5be9,5bee,5bf5,5bf8,5bfa,5bfe-5bff,5c01-5c02,5c04,5c06,5c09-5c0b,5c0e-5c0f,5c11,5c16,5c1a,5c24,5c2d,5c31,5c3a-5c40,5c45,5c48,5c4a-5c4b,5c4d,5c51,5c55,5c5e,5c60-5c61,5c64-5c65,5c6f,5c71,5c90,5ca1,5ca8-5ca9,5cac,5cb1,5cb3,5cb8,5ce0-5ce1,5ce8,5cef-5cf0,5cf6,5cfb,5d07,5d0e,5d16,5d29,5d50,5d69,5d6f,5d8b,5dba,5dcc,5ddd-5dde,5de1,5de3,5de5-5de8,5dee,5df1,5df3-5df4,5df7,5dfb,5dfd-5dfe,5e02-5e03,5e06,5e0c,5e16,5e1d,5e25,5e2b,5e2d,5e2f-5e30,5e33,5e38,5e3d,5e45,5e4c,5e55,5e61,5e63,5e72-5e74,5e78-5e79,5e7b-5e7e,5e81,5e83-5e84,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ec3,5ec9-5eca,5ed3,5edf-5ee0,5ef6-5ef7,5efa-5efc,5eff,5f01,5f04,5f0a,5f0f-5f10,5f13-5f15,5f17-5f18,5f1b,5f1f,5f25-5f27,5f31,5f35,5f37,5f3c,5f3e,5f4a,5f53,5f62,5f66,5f69-5f6c,5f70-5f71,5f79,5f7c,5f80-5f81,5f84-5f85,5f8b-5f8c,5f90,5f92-5f93,5f97,5fa1,5fa9-5faa,5fae,5fb3-5fb4,5fb9,5fbd,5fc3,5fc5,5fcc-5fcd,5fd7-5fd9,5fdc,5fe0,5feb,5ff5,5ffd,6012,6016,601c-601d,6020,6025,6027-6028,602a,602f,604b,6050,6052,6055,6062,6065,6068-6069,606d,606f-6070,6075,6089,608c,6094,609f-60a0,60a3,60a6,60a9-60aa,60b2,60b6,60bc,60c5,60c7,60d1,60da,60dc,60df,60e3,60e8,60f0,60f3,60f9,6101,6108-6109,610f,611a-611b,611f,6148,614b-614c,614e,6155,6162-6163,6167-6168,616e,6170,6176,617e,6182,618e,6190,61a4,61a7,61a9,61b2,61b6,61be,61c7,61d0,61f2,61f8,620a,620e,6210-6212,6216,621a,621f,6226,622f,6234,6238,623b,623f-6240,6247,6249,624b,624d,6253,6255,6258,626e,6271,6276,6279,627f-6280,6284,628a,6291,6295,6297-6298,629c,629e,62ab,62b1,62b5,62b9,62bc-62bd,62c5,62cd,62d0,62d2-62d3,62d8-62d9,62db,62dd,62e0-62e1,62ec-62ed,62f3,62f6-62f7,62fe,6301,6307,6309,6311,6319,631f,6328,632b,632f,633a,633d,633f,6349,634c,6355,6357,635c,6367-6368,636e,6372,6377,637a-637b,6383,6388,638c,6392,6398,639b,63a0-63a2,63a5,63a7-63aa,63ac,63b2,63b4,63bb,63c3,63cf-63d0,63d6,63da-63db,63e1,63ee,63f4,63fa,640d,642c-642d,643a,643e,6442,6458,6469,6478,647a,6483,6492,649a,649e,64a4,64ab,64ad-64ae,64b0,64b2,64b9,64c1,64cd,64e2,64e6,64ec,64fe,652f,6539,653b,653e-653f,6545,654f,6551,6557,6559,6562-6563,6566,656c,6570,6574-6575,6577,6587,6589,658c,658e,6590-6591,6597,6599,659c,65a1,65a4-65a5,65a7,65ac-65ad,65af-65b0,65b9,65bc-65bd,65c5,65cb,65cf,65d7,65e2,65e5-65e9,65ec-65ed,65fa,6602,6606-6607,660c,660e-660f,6613-6614,661f-6620,6625,6627-6628,662d,662f,663c,6642-6643,664b,6652,6666,6669,666e-666f,6674,6676,667a,6681,6687,6691,6696-6697,66a2,66a6,66ab,66ae,66b4,66c7,66d9,66dc-66dd,66f2-66f4,66f8-66f9,66fd-6700,6708-6709,670b,670d,6714-6715,6717,671b,671d,671f,6728,672a-672d,6731,6734,673a,673d,6749,674e-6751,6753,6756,675c,675f,6761-6762,6765,676d,676f,6771,6775,6777,677e-677f,6787,6790,6795,6797,679a,679c-679d,67a0,67a2,67af,67b6,67c1,67c4,67ca,67cf-67d1,67d3-67d4,67d8,67da,67f1,67f3-67f5,67fb,67fe-67ff,6802-6804,6813,6816-6817,6821-6822,682a,6834,6838-6839,683c-683d,6841-6843,6848,6850-6851,6853-6854,685c-685d,685f,6867,6876,6881,6885,6893,6897,68a2,68a7-68a8,68af-68b1,68b6,68bc,68c4,68c9,68cb,68d2,68da,68df,68ee,68f2,68fa,6900,6905,690b,690d-690e,6919,691b-691c,6934,693f,694a,6953,6955,695a,6960,6962,696d,696f,6973,6975,697c-697d,6982,698a,698e,6994,699b,69cb-69cd,69d8-69d9,69fb,69fd,6a0b,6a17,6a19,6a1f,6a21,6a29-6a2b,6a35,6a39-6a3a,6a3d,6a4b,6a58,6a5f,6a61,6a7f-6a80,6a8e,6ad3,6adb,6ae8,6b04,6b1d,6b20-6b21,6b23,6b27,6b32,6b3a,6b3d-6b3e,6b4c,6b4e,6b53,6b62-6b64,6b66,6b69-6b6a,6b6f,6b73-6b74,6b7b,6b86,6b89-6b8b,6b96,6bb4-6bb5,6bba-6bbb,6bbf,6bc5,6bcd-6bce,6bd2,6bd4,6bd8,6bdb,6c0f,6c11,6c17,6c34,6c37-6c38,6c3e,6c40-6c42,6c4e,6c50,6c57,6c5a,6c5d,6c5f-6c60,6c70,6c72,6c7a,6c7d,6c83,6c88,6c8c,6c93,6c96,6c99,6ca1-6ca2,6cab,6cb3,6cb8-6cb9,6cbb-6cbc,6cbf,6cc1,6cc9-6cca,6ccc,6cd5,6ce1-6ce3,6ce5,6ce8,6cf0,6cf3,6d0b,6d17,6d1b,6d1e,6d25,6d29-6d2a,6d32,6d3b,6d3e,6d41,6d44-6d45,6d5c,6d66,6d69-6d6a,6d6c,6d6e,6d74,6d77-6d78,6d88,6d8c,6d99,6d9b-6d9c,6daf,6db2,6dbc,6dc0,6dcb,6dd1,6dd8,6de1,6deb,6df1,6df3,6df5,6df7,6dfb,6e05,6e07-6e09,6e0b,6e13,6e1a-6e1b,6e20-6e21,6e25-6e26,6e29,6e2c,6e2f,6e4a,6e56,6e58,6e5b,6e67,6e6f,6e7e-6e80,6e8c,6e90,6e96,6e9c-6e9d,6ea2,6eb6,6eba,6ec5,6ecb,6ed1,6edd-6ede,6ef4,6f01-6f02,6f06,6f09,6f0f,6f14-6f15,6f20,6f22-6f23,6f2b-6f2c,6f38,6f45,6f54,6f5c,6f5f,6f64,6f6e,6f70,6f84,6f97,6fb1,6fc0-6fc1,6fc3,6fe0-6fe1,6feb,6fef,7015,701e,7026-7027,702c,7058,706b,706f-7070,7078,707c-707d,7089-708a,708e,70ad,70b9-70ba,70c8,70cf,70f9,7114,711a,7121,7126,7136,713c,7149,714e,7159,7164,7167,7169,716e,717d,718a,7194,719f,71b1,71c3,71c8,71d0,71d5,71e5-71e6,71ed,7206,722a,7235-7236,723a,723d-723e,7247-7248,724c,7252,7259,725b,725d,725f,7261-7262,7267,7269,7272,7279,727d,7280,72a0,72ac,72af,72b6,72c2,72d0,72d7,72d9,72db,72e9,72ec-72ed,72f8,72fc-72fd,731b,731f,732a-732b,732e,7336-7337,733f,7344-7345,7363,7372,7384,7387,7389,738b,7396,73a9,73b2,73c2,73ca,73cd,73e0,73ea,73ed,73fe,7403,7406,7409,7422,7433-7436,745a-745b,745e,7460,7473,7483,74b0,74bd,74dc,74e2,74e6,74f6,7511,7518,751a,751c,751f,7523,7525,7528,752b,7530-7533,7537,753a-753b,754c,754f,7551,7554,7559,755c-755d,7560,7562,7565-7566,756a,7570,7573,7577,757f,758b,758e-758f,7591,75ab,75b2,75b9,75be,75c5,75c7,75d4-75d5,75d8,75db,75e2,75e9,75f4,7642,764c,7652,7656,767a-767b,767d-767e,7684,7686-7687,7690,76ae,76bf,76c3,76c6,76c8,76ca,76d7,76db,76df,76e3-76e4,76ee,76f2,76f4,76f8,76fe,7701,7709,770b-770c,771f-7720,773a,773c,7740,7761,7763,7766,77a5,77ac-77ad,77b3,77db,77e2,77e5,77e7,77e9,77ed,77ef,77f3,7802,7814-7815,7825-7827,7832,7834,783a,783f,785d,786b-786c,786f,7872,7881,7887,788d,7891,7893,7895,7897,78a7,78a9,78ba,78c1,78d0,78e8,78ef,7901,790e,793a,793c,793e,7941,7947-7949,7950,7956,795d-795e,7962,7965,7968,796d,7977,7981,7984-7985,798d-798f,79a6,79b0,79bd-79c1,79cb,79d1-79d2,79d8,79df,79e4,79e6,79e9,79f0,79fb,7a00,7a0b,7a0e,7a14,7a17,7a1a,7a1c,7a2e,7a32,7a3c-7a3d,7a3f-7a40,7a42,7a46,7a4d-7a50,7a63,7a6b,7a74,7a76,7a7a,7a7f,7a81,7a83-7a84,7a92-7a93,7a9f,7aaa,7aae-7aaf,7aba,7ac3,7acb,7adc,7ae0,7ae3,7ae5,7aea,7aef,7af6,7af9-7afa,7aff,7b08,7b11,7b1b,7b20,7b25-7b26,7b2c,7b39,7b46,7b48-7b49,7b4b,7b4f,7b51-7b52,7b54,7b56,7b86-7b87,7b94-7b95,7b97,7ba1,7baa,7bad,7bb1,7bb8,7bc0,7bc4,7bc7,7bc9,7be0,7be4,7bed,7c21,7c38,7c3e-7c3f,7c4d,7c73,7c7e,7c81-7c82,7c89,7c8b,7c8d,7c92,7c95,7c97-7c98,7c9b,7c9f,7ca5,7ca7,7cbe,7cca,7cce,7cd6,7cde-7ce0,7ce7,7cf8,7cfb,7cfe,7d00,7d04-7d05,7d0b,7d0d,7d10,7d14,7d17-7d1b,7d20-7d22,7d2b-7d2c,7d2f-7d30,7d33,7d39-7d3a,7d42-7d44,7d4c,7d50,7d5e,7d61-7d62,7d66,7d71,7d75-7d76,7d79,7d99-7d9a,7d9c,7dac-7dad,7db1-7db2,7db4,7dbb,7dbe-7dbf,7dca-7dcb,7dcf,7dd1-7dd2,7dda,7de0,7de8-7de9,7dec,7def,7df4,7e01,7e04,7e1b,7e1e,7e26,7e2b,7e2e,7e3e,7e41,7e4a-7e4b,7e4d,7e54-7e55,7e6d,7e70,7e82,7e8f,7f36,7f6a-7f6b,7f6e,7f70,7f72,7f75,7f77,7f85,7f8a,7f8e,7fa4,7fa8-7fa9,7fbd,7fc1,7fcc,7fd2,7fe0,7feb,7ff0,7ffb-7ffc,8000-8001,8003,8005,800c,8010,8015,8017,8033,8036,803d,8056,805e,8061,806f,8074,8077,807e,8087,8089,808b-808c,8096,8098,809d,80a1-80a2,80a5,80a9-80aa,80af,80b1-80b2,80b4,80ba,80c3,80c6,80cc,80ce,80de,80e1,80e4,80f4,80f8,80fd,8102,8105-8108,810a,811a,8131,8133,8139,814e,8150,8154-8155,816b,8170,8178-817a,817f,818f,819a,819c-819d,81a8,81b3,81bf,81c6,81d3,81e3,81e5,81e8,81ea,81ed,81f3-81f4,81fc,8208,820c,820e,8217-8218,821b-821c,821e-821f,822a,822c,8235-8237,8239,8247,8266,826e-826f,8272,8276,828b,8299,829d,82a5-82a6,82ad,82af,82b1,82b3,82b8-82b9,82bd,82c5,82d1,82d3-82d4,82d7,82db,82e5-82e7,82eb,82f1,8302,8304-8305,830e,831c,8328,8336,8338,8349-834a,834f,8352,8358,8377,837b,839e,83ab,83b1,83c5,83ca,83cc,83d3,83d6,83dc,83df,83e9,83ef-83f1,8404,840c,840e,8429,8431,843d,8449,844e,8457,845b,8461,8463,8466,846c,8471,8475,847a,848b,8490,8494,8499,849c,84b2,84b8,84bc,84c4,84c9,84cb,84d1,84ec,84ee,8500,8511,8513,851a,8526,852d,8535,853d,8543,8549-854a,854e,8557,8568-856a,8584,8597,8599,85a6,85a9-85ac,85ae-85af,85c1,85cd,85e4,85e9,85f7,85fb,8607,862d,864e,8650,865a,865c,865e,866b,8679,867b,868a,8695,86a4,86c7,86cb,86cd-86ce,86d9,86e4,86ed-86ee,86f8,86fe,8702,8718,871c,8749,874b,8755,8766,8776,877f,878d,87ba,87f9,87fb,8840,8846,884c,8853,8857,885b,885d,8861,8863,8868,8870,8877,887f,8888,888b,8896,88ab,88b4,88b7,88c1-88c2,88c5,88cf,88d5,88dc,88df,88e1,88f3,88f8,88fd-88fe,8907,8910,8912,8956,895f,8972,897f,8981,8986-8987,898b,898f,8996-8997,899a,89a7,89aa,89b3,89d2,89e3,89e6,8a00,8a02,8a08,8a0a,8a0e,8a13,8a17-8a18,8a1f,8a23,8a2a,8a2d,8a31,8a33-8a34,8a3a-8a3c,8a50-8a51,8a54-8a55,8a5e,8a60,8a63,8a66,8a69,8a6b,8a6e,8a70-8a73,8a87,8a89,8a8c-8a8d,8a93,8a95,8a98,8a9e,8aa0,8aa4,8aac-8aad,8ab0,8ab2,8ab9,8abc,8abf,8ac7,8acb-8acc,8acf,8ad2,8ad6,8adc,8ae6,8aed-8aee,8af8,8afa,8afe,8b00-8b02,8b04,8b0e,8b19,8b1b,8b1d,8b21,8b2c,8b39,8b58,8b5c,8b66,8b70,8b72,8b77,8b83,8b90,8c37,8c46,8c4a,8c5a,8c61,8c6a,8c79,8c8c,8c9d-8c9e,8ca0-8ca2,8ca7-8ca9,8cab-8cac,8caf-8cb0,8cb4,8cb7-8cb8,8cbb-8cbc,8cbf-8cc0,8cc2-8cc4,8cc7,8cca,8cce,8cd1,8cd3,8cdb-8cdc,8cde,8ce0,8ce2,8ce6,8cea,8ced,8cfc,8d08,8d0b,8d64,8d66,8d6b,8d70,8d74,8d77,8d85,8d8a,8da3,8da8,8db3,8ddd,8de1,8de8,8def,8df3,8df5,8e0a,8e0f,8e44,8e5f,8e74,8e8d,8eab,8eaf,8eca,8ecc-8ecd,8ed2,8edf,8ee2,8ef8,8efd,8f03,8f09,8f14,8f1d,8f29-8f2a,8f2f,8f38,8f3f,8f44,8f4d,8f5f,8f61,8f9b,8f9e,8fb0-8fb2,8fba-8fbc,8fbf,8fc2,8fc4-8fc5,8fce,8fd1,8fd4,8fe6,8fe9,8feb,8fed,8ff0,8ff7,8ffd,9000-9001,9003,9006,900f-9010,9013-9014,9017,9019-901a,901d,901f-9020,9022-9023,902e,9031-9032,9038,903c,9041-9042,9045,9047,904a-904b,904d-904e,9053-9055,905c,9060-9061,9063,9065,9069,906d-906e,9075,9077-9078,907a,907c,907f,9084,9091,90a3,90a6,90aa,90b8,90c1,90ca,90ce,90e1,90e8,90ed,90f5,90f7,90fd,912d,9149,914b-914e,9152,9154,9162,916a,916c,9175,9177-9178,9187,918d,9190,9192,9197,919c,91a4,91b8,91c6-91c8,91cc-91cf,91d1,91d8,91dc-91dd,91e3,91e6-91e7,920d-920e,9234,9237,9244,925b,9262,9266,9271,927e,9280,9283,9285,9291,9298,929a,92ad,92d2,92e4,92ea,92ed,92f2-92f3,92f8,92fc,9306,9310,9318,9320,9326,9328,932b-932c,932f,9332,934b,934d,9354,935b,936c,9375,937e,938c,9396-9397,939a,93a7,93ae,93d1,93e1,9418-9419,9438,9451,9453,9577,9580,9583,9589,958b,958f,9591,9593,95a2-95a5,95b2,95c7,95d8,961c,962a,9632,963b,963f-9640,9644,964d,9650,965b,9662-9665,966a,9670,9673,9675-9676,9678,967a,967d,9685-9686,9688,968a,968e-968f,9694,9699,969b-969c,96a0,96a3,96b7,96bb-96bc,96c0-96c1,96c4-96c7,96cc,96d1,96db,96e2-96e3,96e8,96ea-96eb,96f0,96f2,96f6-96f7,96fb,9700,9707,970a,971c,971e,9727,9732,9752,9756,9759,975e,9762,9769,976d,9774,9784,978d,9798,97a0,97ad,97d3,97ee,97f3,97fb,97ff,9801-9803,9805-9806,9808,9810-9813,9817-9818,981a,982c-982d,9834,983b-983c,984c-984e,9854-9855,9858,985b,985e,9867,98a8,98db,98df,98e2,98ef,98f2,98f4,98fc-98fe,9905,990a,990c,9910,9913,9928,9957,9996,9999,99a8,99ac,99b3-99b4,99c1,99c4-99c6,99c8,99d0,99d2,99d5,99ff,9a0e,9a12-9a13,9a28,9a30,9a5a,9aa8,9ab8,9ac4,9ad8,9aea,9aed,9b3c,9b41-9b42,9b45,9b54,9b5a,9b6f,9b8e,9b92,9baa-9bab,9bad-9bae,9bc9,9bd6,9bdb,9be8,9bf5,9c0d,9c10,9c2d,9c2f,9c39,9c3b,9c48,9c52,9c57,9ce5,9ce9,9cf3-9cf4,9cf6,9d07,9d0e,9d1b,9d28,9d2b-9d2c,9d3b,9d5c,9d60-9d61,9d6c,9d8f,9db4,9df2,9df9-9dfa,9e78,9e7f,9e93,9e97,9e9f,9ea6,9eb9-9ebb,9ebf,9ec4,9ecd,9ed2,9ed9,9edb,9f0e,9f13,9f20,9f3b,9f62,9f8d,ff01,ff03-ff06,ff08-ff5e,ffe0-ffe3 -Japanese (All):0000-007f,00a7-00a8,00b0-00b1,00b4,00b6,00d7,00f7,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,0401,0410-044f,0451,2010,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2103,2116,2121,212b,2160-2169,2170-2179,2190-2193,21d2,21d4,2200,2202-2203,2207-2208,220b,2211,221a,221d-2220,2225,2227-222c,222e,2234-2235,223d,2252,2260-2261,2266-2267,226a-226b,2282-2283,2286-2287,22a5,22bf,2312,2460-2473,2500-2503,250c,250f-2510,2513-2514,2517-2518,251b-251d,2520,2523-2525,2528,252b-252c,252f-2530,2533-2534,2537-2538,253b-253c,253f,2542,254b,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25ef,2605-2606,2640,2642,266a,266d,266f,3000-3003,3005-3015,301d,301f,3041-3093,309b-309e,30a1-30f6,30fb-30fe,3231-3232,3239,32a4-32a8,3303,330d,3314,3318,3322-3323,3326-3327,332b,3336,333b,3349-334a,334d,3351,3357,337b-337e,338e-338f,339c-339e,33a1,33c4,33cd,4e00-4e01,4e03,4e07-4e0b,4e0d-4e0e,4e10-4e11,4e14-4e19,4e1e,4e21,4e26,4e28,4e2a,4e2d,4e31-4e32,4e36,4e38-4e39,4e3b-4e3c,4e3f,4e42-4e43,4e45,4e4b,4e4d-4e4f,4e55-4e59,4e5d-4e5f,4e62,4e71,4e73,4e7e,4e80,4e82,4e85-4e86,4e88-4e8c,4e8e,4e91-4e92,4e94-4e95,4e98-4e99,4e9b-4e9c,4e9e-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb0,4eb3,4eb6,4eba,4ec0-4ec2,4ec4,4ec6-4ec7,4eca-4ecb,4ecd-4ecf,4ed4-4ed9,4edd-4edf,4ee1,4ee3-4ee5,4eed-4eee,4ef0,4ef2,4ef6-4ef7,4efb-4efc,4f00-4f01,4f03,4f09-4f0a,4f0d-4f11,4f1a,4f1c-4f1d,4f2f-4f30,4f34,4f36,4f38-4f3a,4f3c-4f3d,4f43,4f46-4f47,4f4d-4f51,4f53,4f55-4f57,4f59-4f5e,4f69,4f6f-4f70,4f73,4f75-4f76,4f7b-4f7c,4f7f,4f83,4f86,4f88,4f8a-4f8b,4f8d,4f8f,4f91-4f92,4f94,4f96,4f98,4f9a-4f9b,4f9d,4fa0-4fa1,4fab,4fad-4faf,4fb5-4fb6,4fbf,4fc2-4fc4,4fc9-4fca,4fcd-4fce,4fd0-4fd1,4fd4,4fd7-4fd8,4fda-4fdb,4fdd,4fdf,4fe1,4fe3-4fe5,4fee-4fef,4ff3,4ff5-4ff6,4ff8,4ffa,4ffe-4fff,5005-5006,5009,500b,500d,500f,5011-5012,5014,5016,5019-501a,501e-501f,5021-5026,5028-502d,5036,5039,5040,5042-5043,5046-5049,504f-5050,5055-5056,505a,505c,5065,506c,5070,5072,5074-5076,5078,507d,5080,5085,508d,5091,5094,5098-509a,50ac-50ad,50b2-50b5,50b7,50be,50c2,50c5,50c9-50ca,50cd,50cf,50d1,50d5-50d6,50d8,50da,50de,50e3,50e5,50e7,50ed-50ee,50f4-50f5,50f9,50fb,5100-5102,5104,5109,5112,5114-5116,5118,511a,511f,5121,512a,5132,5137,513a-513c,513f-5141,5143-514e,5150,5152,5154,515a,515c,5162,5164-5165,5168-516e,5171,5175-5178,517c,5180,5182,5185-5186,5189-518a,518c-518d,518f-5193,5195-5197,5199,519d,51a0,51a2,51a4-51a6,51a8-51ac,51b0-51b7,51bd-51be,51c4-51c6,51c9,51cb-51cd,51d6,51db-51dd,51e0-51e1,51e6-51e7,51e9-51ea,51ec-51ed,51f0-51f1,51f5-51f6,51f8-51fa,51fd-51fe,5200,5203-5204,5206-5208,520a-520b,520e,5211,5214-5215,5217,521d,5224-5225,5227,5229-522a,522e,5230,5233,5236-523b,5243-5244,5247,524a-524d,524f,5254,5256,525b,525e,5263-5265,5269-526a,526f-5275,527d,527f,5283,5287-5289,528d,5291-5292,5294,529b-529c,529f-52a0,52a3,52a6,52a9-52ad,52af,52b1,52b4-52b5,52b9,52bc,52be,52c0-52c1,52c3,52c5,52c7,52c9,52cd,52d2,52d5,52d7-52d9,52db,52dd-52e0,52e2-52e4,52e6-52e7,52f2-52f3,52f5,52f8-52fa,52fe-5302,5305-5308,530d,530f-5310,5315-5317,5319-531a,531d,5320-5321,5323-5324,532a,532f,5331,5333,5338-533b,533f-5341,5343,5345-534a,534d,5351-5354,5357-5358,535a,535c,535e,5360,5366,5369,536e-5375,5377-5378,537b,537f,5382,5384,5393,5396,5398,539a,539f-53a0,53a5-53a6,53a8-53a9,53ad-53ae,53b0,53b2-53b3,53b6,53bb,53c2-53c3,53c8-53ce,53d4,53d6-53d7,53d9,53db,53dd,53df,53e1-53e5,53e8-53f3,53f6-53f8,53fa,5401,5403-5404,5408-5411,541b,541d,541f-5420,5426,5429,542b-542e,5436,5438-5439,543b-543e,5440,5442,5446,5448-544a,544e,5451,545f,5468,546a,5470-5471,5473,5475-5477,547b-547d,5480,5484,5486,548a-548c,548e-5490,5492,549c,54a2,54a4-54a5,54a8-54a9,54ab-54ac,54af,54b2-54b3,54b8,54bc-54be,54c0-54c2,54c4,54c7-54c9,54d8,54e1-54e2,54e5-54e6,54e8-54e9,54ed-54ee,54f2,54fa,54fd,54ff,5504,5506-5507,550f-5510,5514,5516,552e-552f,5531,5533,5538-5539,553e,5540,5544-5546,554c,554f,5553,5556-5557,555c-555d,5563,557b-557c,557e,5580,5583-5584,5586-5587,5589-558b,5598-559a,559c-559f,55a7-55ac,55ae,55b0,55b6,55c4-55c5,55c7,55d4,55da,55dc,55df,55e3-55e4,55f7,55f9,55fd-55fe,5606,5609,5614,5616-5618,561b,5629,562f,5631-5632,5634,5636,5638,5642,564c,564e,5650,565b,5664,5668,566a-566c,5674,5678,567a,5680,5686-5687,568a,568f,5694,56a0,56a2,56a5,56ae,56b4,56b6,56bc,56c0-56c3,56c8,56ce,56d1,56d3,56d7-56d8,56da-56db,56de,56e0,56e3,56ee,56f0,56f2-56f3,56f9-56fa,56fd,56ff-5700,5703-5704,5708-5709,570b,570d,570f,5712-5713,5716,5718,571c,571f,5726-5728,572d,5730,5737-5738,573b,5740,5742,5747,574a,574e-5751,5759,5761,5764-5766,5769-576a,577f,5782,5788-5789,578b,5793,57a0,57a2-57a4,57aa,57ac,57b0,57b3,57c0,57c3,57c6-57c8,57cb,57ce,57d2-57d4,57d6,57dc,57df-57e0,57e3,57f4,57f7,57f9-57fa,57fc,5800,5802,5805-5806,580a-580b,5815,5819,581d,5821,5824,582a,582f-5831,5834-5835,583a,583d,5840-5841,584a-584b,5851-5852,5854,5857-585a,585e,5862,5869,586b,5870,5872,5875,5879,587e,5883,5885,5893,5897,589c,589e-589f,58a8,58ab,58ae,58b2-58b3,58b8-58bb,58be,58c1,58c5,58c7,58ca,58cc,58d1,58d3,58d5,58d7-58d9,58dc,58de-58df,58e4-58e5,58eb-58ec,58ee-58f2,58f7,58f9-58fd,5902,5909-590b,590f-5910,5915-5916,5918-591c,5922,5925,5927,5929-592e,5931-5932,5937-5938,593e,5944,5947-5949,594e-5951,5953-5955,5957-5958,595a-595b,595d,5960,5962-5963,5965,5967-596a,596c,596e,5973-5974,5978,597d,5981-5984,598a,598d,5993,5996,5999,599b,599d,59a3-59a5,59a8,59ac,59b2,59b9-59bb,59be,59c6,59c9,59cb,59d0-59d1,59d3-59d4,59d9-59da,59dc,59e5-59e6,59e8,59ea-59eb,59f6,59fb,59ff,5a01,5a03,5a09,5a11,5a18,5a1a,5a1c,5a1f-5a20,5a25,5a29,5a2f,5a35-5a36,5a3c,5a40-5a41,5a46,5a49,5a5a,5a62,5a66,5a6a,5a6c,5a7f,5a92,5a9a-5a9b,5abc-5abe,5ac1-5ac2,5ac9,5acb-5acc,5ad0,5ad6-5ad7,5ae1,5ae3,5ae6,5ae9,5afa-5afb,5b09,5b0b-5b0c,5b16,5b22,5b2a,5b2c,5b30,5b32,5b36,5b3e,5b40,5b43,5b45,5b50-5b51,5b54-5b58,5b5a-5b5d,5b5f,5b63-5b66,5b69,5b6b,5b70-5b71,5b73,5b75,5b78,5b7a,5b80,5b83,5b85,5b87-5b89,5b8b-5b8d,5b8f,5b95,5b97-5b9d,5b9f,5ba2-5ba6,5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf-5bc0,5bc2-5bc7,5bc9,5bcc,5bd0,5bd2-5bd4,5bd8,5bdb,5bdd-5bdf,5be1-5be2,5be4-5be9,5beb-5bec,5bee,5bf0,5bf3,5bf5-5bf6,5bf8,5bfa,5bfe-5bff,5c01-5c02,5c04-5c0b,5c0d-5c0f,5c11,5c13,5c16,5c1a,5c1e,5c20,5c22,5c24,5c28,5c2d,5c31,5c38-5c41,5c45-5c46,5c48,5c4a-5c4b,5c4d-5c51,5c53,5c55,5c5e,5c60-5c61,5c64-5c65,5c6c,5c6e-5c6f,5c71,5c76,5c79,5c8c,5c90-5c91,5c94,5ca1,5ca6,5ca8-5ca9,5cab-5cac,5cb1,5cb3,5cb6-5cb8,5cba-5cbc,5cbe,5cc5,5cc7,5cd9,5ce0-5ce1,5ce8-5cea,5ced,5cef-5cf0,5cf5-5cf6,5cfa-5cfb,5cfd,5d07,5d0b,5d0e,5d11,5d14-5d1b,5d1f,5d22,5d27,5d29,5d42,5d4b-5d4c,5d4e,5d50,5d52-5d53,5d5c,5d69,5d6c-5d6d,5d6f,5d73,5d76,5d82,5d84,5d87,5d8b-5d8c,5d90,5d9d,5da2,5dac,5dae,5db7-5dba,5dbc-5dbd,5dc9,5dcc-5dcd,5dd0,5dd2-5dd3,5dd6,5ddb,5ddd-5dde,5de1,5de3,5de5-5de8,5deb,5dee,5df1-5df5,5df7,5dfb,5dfd-5dfe,5e02-5e03,5e06,5e0b-5e0c,5e11,5e16,5e19-5e1b,5e1d,5e25,5e2b,5e2d,5e2f-5e30,5e33,5e36-5e38,5e3d,5e40,5e43-5e45,5e47,5e4c,5e4e,5e54-5e55,5e57,5e5f,5e61-5e64,5e72-5e76,5e78-5e7f,5e81,5e83-5e84,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea0,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ec1-5ec3,5ec8-5eca,5ecf-5ed0,5ed3,5ed6,5eda-5edb,5edd,5edf-5ee3,5ee8-5ee9,5eec,5ef0-5ef1,5ef3-5ef4,5ef6-5ef8,5efa-5efc,5efe-5eff,5f01,5f03-5f04,5f09-5f0d,5f0f-5f11,5f13-5f18,5f1b,5f1f,5f21,5f25-5f27,5f29,5f2d,5f2f,5f31,5f34-5f35,5f37-5f38,5f3c,5f3e,5f41,5f45,5f48,5f4a,5f4c,5f4e,5f51,5f53,5f56-5f57,5f59,5f5c-5f5d,5f61-5f62,5f66-5f67,5f69-5f6d,5f70-5f71,5f73,5f77,5f79,5f7c,5f7f-5f85,5f87-5f88,5f8a-5f8c,5f90-5f93,5f97-5f99,5f9e,5fa0-5fa1,5fa8-5faa,5fad-5fae,5fb3-5fb4,5fb7,5fb9,5fbc-5fbd,5fc3,5fc5,5fcc-5fcd,5fd6-5fd9,5fdc-5fde,5fe0,5fe4,5feb,5ff0-5ff1,5ff5,5ff8,5ffb,5ffd,5fff,600e-6010,6012,6015-6016,6019,601b-601d,6020-6021,6025-602b,602f,6031,603a,6041-6043,6046,604a-604b,604d,6050,6052,6055,6059-605a,605d,605f-6060,6062-6065,6068-606d,606f-6070,6075,6077,6081,6083-6085,6089-608d,6092,6094,6096-6097,609a-609b,609f-60a0,60a3,60a6-60a7,60a9-60aa,60b2-60b6,60b8,60bc-60bd,60c5-60c7,60d1,60d3,60d5,60d8,60da,60dc,60de-60e1,60e3,60e7-60e8,60f0-60f4,60f6-60f7,60f9-60fb,6100-6101,6103,6106,6108-6109,610d-610f,6111,6115,611a-611b,611f-6121,6127-6128,612c,6130,6134,6137,613c-613f,6142,6144,6147-6148,614a-614e,6153,6155,6158-615a,615d,615f,6162-6163,6165,6167-6168,616b,616e-6171,6173-6177,617e,6182,6187,618a,618e,6190-6191,6194,6196,6198-619a,61a4,61a7,61a9,61ab-61ac,61ae,61b2,61b6,61ba,61be,61c3,61c6-61cd,61d0,61e3,61e6,61f2,61f4,61f6-61f8,61fa,61fc-6200,6208-620a,620c-620e,6210-6214,6216,621a-621b,621d-621f,6221,6226,622a,622e-6230,6232-6234,6238,623b,623f-6241,6247-6249,624b,624d-624e,6253,6255,6258,625b,625e,6260,6263,6268,626e,6271,6276,6279,627c,627e-6280,6282-6284,6289-628a,6291-6298,629b-629c,629e,62a6,62ab-62ac,62b1,62b5,62b9,62bb-62bd,62c2,62c5-62ca,62cc-62cd,62cf-62d4,62d7-62d9,62db-62dd,62e0-62e1,62ec-62ef,62f1,62f3,62f5-62f7,62fe-62ff,6301-6302,6307-6309,630c,6311,6319,631f,6327-6328,632b,632f,633a,633d-633f,6349,634c-634d,634f-6350,6355,6357,635c,6367-6369,636b,636e,6372,6376-6377,637a-637b,6380,6383,6388-6389,638c,638e-638f,6392,6396,6398,639b,639f-63a3,63a5,63a7-63ac,63b2,63b4-63b5,63bb,63be,63c0,63c3-63c4,63c6,63c9,63cf-63d0,63d2,63d6,63da-63db,63e1,63e3,63e9,63ee,63f4-63f6,63fa,6406,640d,640f,6413,6416-6417,641c,6426,6428,642c-642d,6434,6436,643a,643e,6442,644e,6458,6460,6467,6469,646f,6476,6478,647a,6483,6488,6492-6493,6495,649a,649d-649e,64a4-64a5,64a9,64ab,64ad-64ae,64b0,64b2,64b9,64bb-64bc,64c1-64c2,64c5,64c7,64cd-64ce,64d2,64d4,64d8,64da,64e0-64e3,64e6-64e7,64ec,64ef,64f1-64f2,64f4,64f6,64fa,64fd-64fe,6500,6505,6518,651c-651d,6523-6524,652a-652c,652f,6534-6539,653b,653e-653f,6545,6548,654d-654f,6551,6555-6559,655d-655e,6562-6563,6566,656c,6570,6572,6574-6575,6577-6578,6582-6583,6587-6589,658c,658e,6590-6591,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65ab-65ad,65af-65b0,65b7,65b9,65bc-65bd,65c1,65c3-65c6,65cb-65cc,65cf,65d2,65d7,65d9,65db,65e0-65e2,65e5-65e9,65ec-65ed,65f1,65fa-65fb,6600,6602-6603,6606-6607,6609-660a,660c,660e-660f,6613-6615,661c,661e-6620,6624-6625,6627-6628,662d-662f,6631,6634-6636,663b-663c,663f,6641-6644,6649,664b,664f,6652,6657,6659,665d-665f,6662,6664-6669,666e-6670,6673-6674,6676,667a,6681,6683-6684,6687-6689,668e,6691,6696-6699,669d,66a0,66a2,66a6,66ab,66ae,66b2,66b4,66b8-66b9,66bc,66be-66bf,66c1,66c4,66c7,66c9,66d6,66d9-66da,66dc-66dd,66e0,66e6,66e9,66f0,66f2-66f5,66f7-6700,6703,6708-6709,670b,670d-670f,6714-6717,671b,671d-671f,6726-6728,672a-672e,6731,6734,6736-6738,673a,673d,673f,6741,6746,6749,674e-6751,6753,6756,6759,675c,675e-6766,676a,676d,676f-6773,6775,6777,677c,677e-677f,6785,6787,6789,678b-678c,6790,6795,6797,679a,679c-679d,67a0-67a2,67a6,67a9,67af,67b3-67b4,67b6-67b9,67bb,67c0-67c1,67c4,67c6,67ca,67ce-67d1,67d3-67d4,67d8,67da,67dd-67de,67e2,67e4,67e7,67e9,67ec,67ee-67ef,67f1,67f3-67f5,67fb,67fe-67ff,6801-6804,6813,6816-6817,681e,6821-6822,6829-682b,6832,6834,6838-6839,683c-683d,6840-6844,6846,6848,684d-684e,6850-6854,6859,685c-685d,685f,6863,6867,6874,6876-6877,687e-687f,6881,6883,6885,688d,688f,6893-6894,6897,689b,689d,689f-68a0,68a2,68a6-68a8,68ad,68af-68b1,68b3,68b5-68b6,68b9-68ba,68bc,68c4,68c6,68c8-68cb,68cd,68cf,68d2,68d4-68d5,68d7-68d8,68da,68df-68e1,68e3,68e7,68ee-68ef,68f2,68f9-68fa,6900-6901,6904-6905,6908,690b-690f,6912,6919-691c,6921-6923,6925-6926,6928,692a,6930,6934,6936,6939,693d,693f,694a,6953-6955,6959-695a,695c-695e,6960-6962,6968,696a-696b,696d-696f,6973-6975,6977-6979,697c-697e,6981-6982,698a,698e,6991,6994-6995,6998,699b-699c,69a0,69a7,69ae,69b1-69b2,69b4,69bb,69be-69bf,69c1,69c3,69c7,69ca-69ce,69d0,69d3,69d8-69d9,69dd-69de,69e2,69e7-69e8,69eb,69ed,69f2,69f9,69fb,69fd,69ff,6a02,6a05,6a0a-6a0c,6a12-6a14,6a17,6a19,6a1b,6a1e-6a1f,6a21-6a23,6a29-6a2b,6a2e,6a30,6a35-6a36,6a38-6a3a,6a3d,6a44,6a46-6a48,6a4b,6a58-6a59,6a5f,6a61-6a62,6a66,6a6b,6a72-6a73,6a78,6a7e-6a80,6a84,6a8d-6a8e,6a90,6a97,6a9c,6aa0,6aa2-6aa3,6aaa,6aac,6aae,6ab3,6ab8,6abb,6ac1-6ac3,6ad1,6ad3,6ada-6adb,6ade-6adf,6ae2,6ae4,6ae8,6aea,6afa-6afb,6b04-6b05,6b0a,6b12,6b16,6b1d,6b1f-6b21,6b23,6b27,6b32,6b37-6b3a,6b3d-6b3e,6b43,6b47,6b49,6b4c,6b4e,6b50,6b53-6b54,6b59,6b5b,6b5f,6b61-6b64,6b66,6b69-6b6a,6b6f,6b73-6b74,6b78-6b79,6b7b,6b7f-6b80,6b83-6b84,6b86,6b89-6b8b,6b8d,6b95-6b96,6b98,6b9e,6ba4,6baa-6bab,6baf,6bb1-6bb5,6bb7,6bba-6bbc,6bbf-6bc0,6bc5-6bc6,6bcb,6bcd-6bce,6bd2-6bd4,6bd6,6bd8,6bdb,6bdf,6beb-6bec,6bef,6bf3,6c08,6c0f,6c11,6c13-6c14,6c17,6c1b,6c23-6c24,6c34,6c37-6c38,6c3e-6c42,6c4e,6c50,6c55,6c57,6c5a,6c5c-6c60,6c62,6c68,6c6a,6c6f-6c70,6c72-6c73,6c7a,6c7d-6c7e,6c81-6c83,6c86,6c88,6c8c-6c8d,6c90,6c92-6c93,6c96,6c99-6c9b,6ca1-6ca2,6cab,6cae,6cb1,6cb3,6cb8-6cbf,6cc1,6cc4-6cc5,6cc9-6cca,6ccc,6cd3,6cd5,6cd7,6cd9-6cdb,6cdd,6ce1-6ce3,6ce5,6ce8,6cea,6cef-6cf1,6cf3,6d04,6d0b-6d0c,6d12,6d17,6d19,6d1b,6d1e-6d1f,6d25,6d29-6d2b,6d32-6d33,6d35-6d36,6d38,6d3b,6d3d-6d3e,6d41,6d44-6d45,6d59-6d5a,6d5c,6d63-6d64,6d66,6d69-6d6a,6d6c,6d6e-6d6f,6d74,6d77-6d79,6d85,6d87-6d88,6d8c,6d8e,6d93,6d95-6d96,6d99,6d9b-6d9c,6dac,6daf,6db2,6db5,6db8,6dbc,6dc0,6dc5-6dc7,6dcb-6dcc,6dcf,6dd1-6dd2,6dd5,6dd8-6dd9,6dde,6de1,6de4,6de6,6de8,6dea-6dec,6dee,6df1-6df3,6df5,6df7-6dfc,6e05,6e07-6e0b,6e13,6e15,6e19-6e1b,6e1d,6e1f-6e21,6e23-6e27,6e29,6e2b-6e2f,6e38-6e3a,6e3c,6e3e,6e43,6e4a,6e4d-6e4e,6e56,6e58,6e5b-6e5c,6e5f,6e67,6e6b,6e6e-6e6f,6e72,6e76,6e7e-6e80,6e82,6e8c,6e8f-6e90,6e96,6e98,6e9c-6e9d,6e9f,6ea2,6ea5,6eaa,6eaf,6eb2,6eb6-6eb7,6eba,6ebd,6ebf,6ec2,6ec4-6ec5,6ec9,6ecb-6ecc,6ed1,6ed3-6ed5,6edd-6ede,6eec,6eef,6ef2,6ef4,6ef7-6ef8,6efe-6eff,6f01-6f02,6f06,6f09,6f0f,6f11,6f13-6f15,6f20,6f22-6f23,6f2b-6f2c,6f31-6f32,6f38,6f3e-6f3f,6f41,6f45,6f54,6f58,6f5b-6f5c,6f5f,6f64,6f66,6f6d-6f70,6f74,6f78,6f7a,6f7c,6f80-6f82,6f84,6f86,6f88,6f8e,6f91,6f97,6fa1,6fa3-6fa4,6faa,6fb1,6fb3,6fb5,6fb9,6fc0-6fc3,6fc6,6fd4-6fd5,6fd8,6fdb,6fdf-6fe1,6fe4,6feb-6fec,6fee-6fef,6ff1,6ff3,6ff5-6ff6,6ffa,6ffe,7001,7005,7007,7009,700b,700f,7011,7015,7018,701a-701b,701d-701f,7026-7028,702c,7030,7032,703e,704c,7051,7058,7063,706b,706f-7070,7078,707c-707d,7085,7089-708a,708e,7092,7099,70ab-70af,70b3,70b8-70bb,70c8,70cb,70cf,70d9,70dd,70df,70f1,70f9,70fd,7104,7109,710f,7114,7119-711a,711c,7121,7126,7136,713c,7146-7147,7149,714c,714e,7155-7156,7159,715c,7162,7164-7167,7169,716c,716e,717d,7184,7188,718a,718f,7194-7195,7199,719f,71a8,71ac,71b1,71b9,71be,71c1,71c3,71c8-71c9,71ce,71d0,71d2,71d4-71d5,71d7,71df-71e0,71e5-71e7,71ec-71ee,71f5,71f9,71fb-71fc,71fe-71ff,7206,720d,7210,721b,7228,722a,722c-722d,7230,7232,7235-7236,723a-7240,7246-7248,724b-724c,7252,7258-7259,725b,725d,725f,7261-7262,7267,7269,7272,7274,7279,727d-727e,7280-7282,7287,7292,7296,72a0,72a2,72a7,72ac,72af,72b1-72b2,72b6,72b9,72be,72c2-72c4,72c6,72ce,72d0,72d2,72d7,72d9,72db,72e0-72e2,72e9,72ec-72ed,72f7-72f9,72fc-72fd,730a,7316-7317,731b-731d,731f,7324-7325,7329-732b,732e-732f,7334,7336-7337,733e-733f,7344-7345,734e-734f,7357,7363,7368,736a,7370,7372,7375,7377-7378,737a-737b,7384,7387,7389,738b,7396,73a9,73b2-73b3,73bb,73bd,73c0,73c2,73c8-73ca,73cd-73ce,73d2,73d6,73de,73e0,73e3,73e5,73ea,73ed-73ee,73f1,73f5,73f8,73fe,7403,7405-7407,7409,7422,7425-7426,7429-742a,742e,7432-7436,743a,743f,7441,7455,7459-745c,745e-7460,7462-7464,7469-746a,746f-7470,7473,7476,747e,7483,7489,748b,749e-749f,74a2,74a7,74b0,74bd,74ca,74cf,74d4,74dc,74e0,74e2-74e3,74e6-74e7,74e9,74ee,74f0-74f2,74f6-74f8,7501,7503-7505,750c-750e,7511,7513,7515,7518,751a,751c,751e-751f,7523,7525-7526,7528,752b-752c,752f-7533,7537-7538,753a-753c,7544,7546,7549-754d,754f,7551,7554,7559-755d,7560,7562,7564-7567,7569-756b,756d,756f-7570,7573-7574,7576-7578,757f,7582,7586-7587,7589-758b,758e-758f,7591,7594,759a,759d,75a3,75a5,75ab,75b1-75b3,75b5,75b8-75b9,75bc-75be,75c2-75c3,75c5,75c7,75ca,75cd,75d2,75d4-75d5,75d8-75d9,75db,75de,75e2-75e3,75e9,75f0,75f2-75f4,75fa,75fc,75fe-75ff,7601,7609,760b,760d,761f-7622,7624,7627,7630,7634,763b,7642,7646-7648,764c,7652,7656,7658,765c,7661-7662,7667-766a,766c,7670,7672,7676,7678,767a-767e,7680,7682-7684,7686-7688,768b,768e,7690,7693,7696,7699-769c,769e,76a6,76ae,76b0,76b4,76b7-76ba,76bf,76c2-76c3,76c6,76c8,76ca,76cd,76d2,76d6-76d7,76db-76dc,76de-76df,76e1,76e3-76e5,76e7,76ea,76ee,76f2,76f4,76f8,76fb,76fe,7701,7704,7707-7709,770b-770c,771b,771e-7720,7724-7726,7729,7737-7738,773a,773c,7740,7746-7747,775a-775b,7761,7763,7765-7766,7768,776b,7779,777e-777f,778b,778e,7791,779e,77a0,77a5,77ac-77ad,77b0,77b3,77b6,77b9,77bb-77bd,77bf,77c7,77cd,77d7,77da-77dc,77e2-77e3,77e5,77e7,77e9,77ed-77ef,77f3,77fc,7802,780c,7812,7814-7815,7820-7821,7825-7827,7832,7834,783a,783f,7845,784e,785d,7864,786b-786c,786f,7872,7874,787a,787c,7881,7886-7887,788c-788e,7891,7893,7895,7897,789a,78a3,78a7,78a9-78aa,78af,78b5,78ba,78bc,78be,78c1,78c5-78c6,78ca-78cb,78d0-78d1,78d4,78da,78e7-78e8,78ec,78ef,78f4,78fd,7901,7907,790e,7911-7912,7919,7926,792a-792c,7930,793a,793c,793e,7940-7941,7947-7949,7950,7953,7955-7957,795a,795d-7960,7962,7965,7968,796d,7977,797a,797f-7981,7984-7985,798a,798d-798f,7994,799b,799d,79a6-79a7,79aa,79ae,79b0,79b3,79b9-79ba,79bd-79c1,79c9,79cb,79d1-79d2,79d5,79d8,79df,79e1,79e3-79e4,79e6-79e7,79e9,79ec,79f0,79fb,7a00,7a08,7a0b,7a0d-7a0e,7a14,7a17-7a1a,7a1c,7a1f-7a20,7a2e,7a31-7a32,7a37,7a3b-7a40,7a42-7a43,7a46,7a49,7a4d-7a50,7a57,7a61-7a63,7a69,7a6b,7a70,7a74,7a76,7a79-7a7a,7a7d,7a7f,7a81,7a83-7a84,7a88,7a92-7a93,7a95-7a98,7a9f,7aa9-7aaa,7aae-7ab0,7ab6,7aba,7abf,7ac3-7ac5,7ac7-7ac8,7aca-7acb,7acd,7acf,7ad1-7ad3,7ad5,7ad9-7ada,7adc-7add,7adf-7ae3,7ae5-7ae7,7aea-7aeb,7aed,7aef-7af0,7af6,7af8-7afa,7aff,7b02,7b04,7b06,7b08,7b0a-7b0b,7b0f,7b11,7b18-7b19,7b1b,7b1e,7b20,7b25-7b26,7b28,7b2c,7b33,7b35-7b36,7b39,7b45-7b46,7b48-7b49,7b4b-7b4d,7b4f-7b52,7b54,7b56,7b5d,7b65,7b67,7b6c,7b6e,7b70-7b71,7b74-7b75,7b7a,7b86-7b87,7b8b,7b8d,7b8f,7b92,7b94-7b95,7b97-7b9a,7b9c-7b9f,7ba1,7baa,7bad,7bb1,7bb4,7bb8,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9,7bcb-7bcc,7bcf,7bdd,7be0,7be4-7be6,7be9,7bed,7bf3,7bf6-7bf7,7c00,7c07,7c0d,7c11-7c14,7c17,7c1f,7c21,7c23,7c27,7c2a-7c2b,7c37-7c38,7c3d-7c40,7c43,7c4c-7c4d,7c4f-7c50,7c54,7c56,7c58,7c5f-7c60,7c64-7c65,7c6c,7c73,7c75,7c7e,7c81-7c83,7c89,7c8b,7c8d,7c90,7c92,7c95,7c97-7c98,7c9b,7c9f,7ca1-7ca2,7ca4-7ca5,7ca7-7ca8,7cab,7cad-7cae,7cb1-7cb3,7cb9,7cbd-7cbe,7cc0,7cc2,7cc5,7cca,7cce,7cd2,7cd6,7cd8,7cdc,7cde-7ce0,7ce2,7ce7,7cef,7cf2,7cf4,7cf6,7cf8,7cfa-7cfb,7cfe,7d00,7d02,7d04-7d06,7d0a-7d0b,7d0d,7d10,7d14-7d15,7d17-7d1c,7d20-7d22,7d2b-7d2c,7d2e-7d30,7d32-7d33,7d35,7d39-7d3a,7d3f,7d42-7d46,7d48,7d4b-7d4c,7d4e-7d50,7d56,7d5b-7d5c,7d5e,7d61-7d63,7d66,7d68,7d6e,7d71-7d73,7d75-7d76,7d79,7d7d,7d89,7d8f,7d93,7d99-7d9c,7d9f-7da0,7da2-7da3,7dab-7db2,7db4-7db5,7db7-7db8,7dba-7dbb,7dbd-7dbf,7dc7,7dca-7dcb,7dcf,7dd1-7dd2,7dd5-7dd6,7dd8,7dda,7ddc-7dde,7de0-7de1,7de4,7de8-7de9,7dec,7def,7df2,7df4,7dfb,7e01,7e04-7e05,7e09-7e0b,7e12,7e1b,7e1e-7e1f,7e21-7e23,7e26,7e2b,7e2e,7e31-7e32,7e35,7e37,7e39-7e3b,7e3d-7e3e,7e41,7e43,7e46,7e4a-7e4b,7e4d,7e52,7e54-7e56,7e59-7e5a,7e5d-7e5e,7e66-7e67,7e69-7e6a,7e6d,7e70,7e79,7e7b-7e7d,7e7f,7e82-7e83,7e88-7e8a,7e8c,7e8e-7e90,7e92-7e94,7e96,7e9b-7e9c,7f36,7f38,7f3a,7f45,7f47,7f4c-7f4e,7f50-7f51,7f54-7f55,7f58,7f5f-7f60,7f67-7f6b,7f6e,7f70,7f72,7f75,7f77-7f79,7f82-7f83,7f85-7f88,7f8a,7f8c,7f8e,7f94,7f9a,7f9d-7f9e,7fa1,7fa3-7fa4,7fa8-7fa9,7fae-7faf,7fb2,7fb6,7fb8-7fb9,7fbd,7fc1,7fc5-7fc6,7fca,7fcc,7fd2,7fd4-7fd5,7fe0-7fe1,7fe6,7fe9,7feb,7ff0,7ff3,7ff9,7ffb-7ffc,8000-8001,8003-8006,800b-800c,8010,8012,8015,8017-8019,801c,8021,8028,8033,8036,803b,803d,803f,8046,804a,8052,8056,8058,805a,805e-805f,8061-8062,8068,806f-8070,8072-8074,8076-8077,8079,807d-807f,8084-8087,8089,808b-808c,8093,8096,8098,809a-809b,809d,80a1-80a2,80a5,80a9-80aa,80ac-80ad,80af,80b1-80b2,80b4,80ba,80c3-80c4,80c6,80cc,80ce,80d6,80d9-80db,80dd-80de,80e1,80e4-80e5,80ef,80f1,80f4,80f8,80fc-80fd,8102,8105-810a,811a-811b,8123,8129,812f,8131,8133,8139,813e,8146,814b,814e,8150-8151,8153-8155,815f,8165-8166,816b,816e,8170-8171,8174,8178-817a,817f-8180,8182-8183,8188,818a,818f,8193,8195,819a,819c-819d,81a0,81a3-81a4,81a8-81a9,81b0,81b3,81b5,81b8,81ba,81bd-81c0,81c2,81c6,81c8-81c9,81cd,81d1,81d3,81d8-81da,81df-81e0,81e3,81e5,81e7-81e8,81ea,81ed,81f3-81f4,81fa-81fc,81fe,8201-8202,8205,8207-820a,820c-820e,8210,8212,8216-8218,821b-821c,821e-821f,8229-822c,822e,8233,8235-8239,8240,8247,8258-825a,825d,825f,8262,8264,8266,8268,826a-826b,826e-826f,8271-8272,8276-8278,827e,828b,828d,8292,8299,829d,829f,82a5-82a6,82ab-82ad,82af,82b1,82b3,82b8-82b9,82bb,82bd,82c5,82d1-82d4,82d7,82d9,82db-82dc,82de-82df,82e1,82e3,82e5-82e7,82eb,82f1,82f3-82f4,82f9-82fb,8301-8306,8309,830e,8316-8318,831c,8323,8328,832b,832f,8331-8332,8334-8336,8338-8339,8340,8345,8349-834a,834f-8350,8352,8358,8362,8373,8375,8377,837b-837c,837f,8385,8387,8389-838a,838e,8393,8396,839a,839e-83a0,83a2,83a8,83aa-83ab,83b1,83b5,83bd,83c1,83c5,83c7,83ca,83cc,83ce,83d3,83d6,83d8,83dc,83df-83e0,83e9,83eb,83ef-83f2,83f4,83f6-83f7,83fb,83fd,8403-8404,8407,840b-840e,8413,8420,8422,8429-842a,842c,8431,8435,8438,843c-843d,8446,8448-8449,844e,8457,845b,8461-8463,8466,8469,846b-846f,8471,8475,8477,8479-847a,8482,8484,848b,8490,8494,8499,849c,849f,84a1,84ad,84b2,84b4,84b8-84b9,84bb-84bc,84bf,84c1,84c4,84c6,84c9-84cb,84cd,84d0-84d1,84d6,84d9-84da,84dc,84ec,84ee,84f4,84fc,84ff-8500,8506,8511,8513-8515,8517-8518,851a,851f,8521,8526,852c-852d,8535,853d,8540-8541,8543,8548-854b,854e,8553,8555,8557-855a,8563,8568-856b,856d,8577,857e,8580,8584,8587-8588,858a,8590-8591,8594,8597,8599,859b-859c,85a4,85a6,85a8-85ac,85ae-85b0,85b9-85ba,85c1,85c9,85cd,85cf-85d0,85d5,85dc-85dd,85e4-85e5,85e9-85ea,85f7,85f9-85fb,85fe,8602,8606-8607,860a-860b,8613,8616-8617,861a,8622,862d,862f-8630,863f,864d-864e,8650,8654-8655,865a,865c,865e-865f,8667,866b,8671,8679,867b,868a-868c,8693,8695,86a3-86a4,86a9-86ab,86af-86b0,86b6,86c4,86c6-86c7,86c9,86cb,86cd-86ce,86d4,86d9,86db,86de-86df,86e4,86e9,86ec-86ef,86f8-86f9,86fb,86fe,8700,8702-8703,8706,8708-870a,870d,8711-8712,8718,871a,871c,8725,8729,8734,8737,873b,873f,8749,874b-874c,874e,8753,8755,8757,8759,875f-8760,8763,8766,8768,876a,876e,8774,8776,8778,877f,8782,878d,879f,87a2,87ab,87af,87b3,87ba-87bb,87bd,87c0,87c4,87c6-87c7,87cb,87d0,87d2,87e0,87ef,87f2,87f6-87f7,87f9,87fb,87fe,8805,8807,880d-880f,8811,8815-8816,8821-8823,8827,8831,8836,8839,883b,8840,8842,8844,8846,884c-884d,8852-8853,8857,8859,885b,885d-885e,8861-8863,8868,886b,8870,8872,8875,8877,887d-887f,8881-8882,8888,888b,888d,8892,8896-8897,8899,889e,88a2,88a4,88ab,88ae,88b0-88b1,88b4-88b5,88b7,88bf,88c1-88c5,88cf,88d4-88d5,88d8-88d9,88dc-88dd,88df,88e1,88e8,88f2-88f5,88f8-88f9,88fc-88fe,8902,8904,8907,890a,890c,8910,8912-8913,891c-891e,8925,892a-892b,8936,8938,893b,8941,8943-8944,894c-894d,8956,895e-8960,8964,8966,896a,896d,896f,8972,8974,8977,897e-897f,8981,8983,8986-8988,898a-898b,898f,8993,8996-8998,899a,89a1,89a6-89a7,89a9-89aa,89ac,89af,89b2-89b3,89ba,89bd,89bf-89c0,89d2,89da,89dc-89dd,89e3,89e6-89e7,89f4,89f8,8a00,8a02-8a03,8a08,8a0a,8a0c,8a0e,8a10,8a12-8a13,8a16-8a18,8a1b,8a1d,8a1f,8a23,8a25,8a2a,8a2d,8a31,8a33-8a34,8a36-8a37,8a3a-8a3c,8a41,8a46,8a48,8a50-8a52,8a54-8a55,8a5b,8a5e,8a60,8a62-8a63,8a66,8a69,8a6b-8a6e,8a70-8a73,8a79,8a7c,8a82,8a84-8a85,8a87,8a89,8a8c-8a8d,8a91,8a93,8a95,8a98,8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aac-8aad,8ab0,8ab2,8ab9,8abc,8abe-8abf,8ac2,8ac4,8ac7,8acb-8acd,8acf,8ad2,8ad6,8ada-8adc,8ade-8ae2,8ae4,8ae6-8ae7,8aeb,8aed-8aee,8af1,8af3,8af6-8af8,8afa,8afe,8b00-8b02,8b04,8b07,8b0c,8b0e,8b10,8b14,8b16-8b17,8b19-8b1b,8b1d,8b20-8b21,8b26,8b28,8b2b-8b2c,8b33,8b39,8b3e,8b41,8b49,8b4c,8b4e-8b4f,8b53,8b56,8b58,8b5a-8b5c,8b5f,8b66,8b6b-8b6c,8b6f-8b72,8b74,8b77,8b7d,8b7f-8b80,8b83,8b8a,8b8c,8b8e,8b90,8b92-8b93,8b96,8b99-8b9a,8c37,8c3a,8c3f,8c41,8c46,8c48,8c4a,8c4c,8c4e,8c50,8c55,8c5a,8c61-8c62,8c6a-8c6c,8c78-8c7a,8c7c,8c82,8c85,8c89-8c8a,8c8c-8c8e,8c94,8c98,8c9d-8c9e,8ca0-8ca2,8ca7-8cb0,8cb2-8cb4,8cb6-8cb8,8cbb-8cbd,8cbf-8cc4,8cc7-8cc8,8cca,8ccd-8cce,8cd1,8cd3,8cda-8cdc,8cde,8ce0,8ce2-8ce4,8ce6,8cea,8ced,8cf0,8cf4,8cfa-8cfd,8d04-8d05,8d07-8d08,8d0a-8d0b,8d0d,8d0f-8d10,8d12-8d14,8d16,8d64,8d66-8d67,8d6b,8d6d,8d70-8d71,8d73-8d74,8d76-8d77,8d81,8d85,8d8a,8d99,8da3,8da8,8db3,8dba,8dbe,8dc2,8dcb-8dcc,8dcf,8dd6,8dda-8ddb,8ddd,8ddf,8de1,8de3,8de8,8dea-8deb,8def,8df3,8df5,8dfc,8dff,8e08-8e0a,8e0f-8e10,8e1d-8e1f,8e2a,8e30,8e34-8e35,8e42,8e44,8e47-8e4a,8e4c,8e50,8e55,8e59,8e5f-8e60,8e63-8e64,8e72,8e74,8e76,8e7c,8e81,8e84-8e85,8e87,8e8a-8e8b,8e8d,8e91,8e93-8e94,8e99,8ea1,8eaa-8eac,8eaf-8eb1,8ebe,8ec5-8ec6,8ec8,8eca-8ecd,8ecf,8ed2,8edb,8edf,8ee2-8ee3,8eeb,8ef8,8efb-8efe,8f03,8f05,8f09-8f0a,8f0c,8f12-8f15,8f19,8f1b-8f1d,8f1f,8f26,8f29-8f2a,8f2f,8f33,8f38-8f39,8f3b,8f3e-8f3f,8f42,8f44-8f46,8f49,8f4c-8f4e,8f57,8f5c,8f5f,8f61-8f64,8f9b-8f9c,8f9e-8f9f,8fa3,8fa7-8fa8,8fad-8fb2,8fb7,8fba-8fbc,8fbf,8fc2,8fc4-8fc5,8fce,8fd1,8fd4,8fda,8fe2,8fe5-8fe6,8fe9-8feb,8fed,8fef-8ff0,8ff4,8ff7-8ffa,8ffd,9000-9001,9003,9005-9006,900b,900d-9011,9013-9017,9019-901a,901d-9023,9027,902e,9031-9032,9035-9036,9038-9039,903c,903e,9041-9042,9045,9047,9049-904b,904d-9056,9058-9059,905c,905e,9060-9061,9063,9065,9067-9069,906d-906f,9072,9075-9078,907a,907c-907d,907f-9084,9087,9089-908a,908f,9091,90a3,90a6,90a8,90aa,90af,90b1,90b5,90b8,90c1,90ca,90ce,90db,90de,90e1-90e2,90e4,90e8,90ed,90f5,90f7,90fd,9102,9112,9115,9119,9127,912d,9130,9132,9149-914e,9152,9154,9156,9158,9162-9163,9165,9169-916a,916c,9172-9173,9175,9177-9178,9182,9187,9189,918b,918d,9190,9192,9197,919c,91a2,91a4,91aa-91ab,91af,91b4-91b5,91b8,91ba,91c0-91c1,91c6-91c9,91cb-91d1,91d6-91d8,91da-91df,91e1,91e3-91e7,91ed-91ee,91f5-91f6,91fc,91ff,9206,920a,920d-920e,9210-9211,9214-9215,921e,9229,922c,9234,9237,9239-923a,923c,923f-9240,9244-9245,9248-9249,924b,924e,9250-9251,9257,9259-925b,925e,9262,9264,9266-9267,9271,9277-9278,927e,9280,9283,9285,9288,9291,9293,9295-9296,9298,929a-929c,92a7,92ad,92b7,92b9,92cf-92d0,92d2-92d3,92d5,92d7,92d9,92e0,92e4,92e7,92e9-92ea,92ed,92f2-92f3,92f8-92fc,92ff,9302,9306,930f-9310,9318-931a,931d-931e,9320-9323,9325-9326,9328,932b-932c,932e-932f,9332,9335,933a-933b,9344,9348,934b,934d,9354,9356-9357,935b-935c,9360,936c,936e,9370,9375,937c,937e,938c,9394,9396-9397,939a,93a4,93a7,93ac-93ae,93b0,93b9,93c3,93c6,93c8,93d0-93d1,93d6-93d8,93dd-93de,93e1,93e4-93e5,93e8,93f8,9403,9407,9410,9413-9414,9418-941a,9421,942b,9431,9435-9436,9438,943a,9441,9444-9445,9448,9451-9453,945a-945b,945e,9460,9462,946a,9470,9475,9477,947c-947f,9481,9577,9580,9582-9583,9587,9589-958b,958f,9591-9594,9596,9598-9599,95a0,95a2-95a5,95a7-95a8,95ad,95b2,95b9,95bb-95bc,95be,95c3,95c7,95ca,95cc-95cd,95d4-95d6,95d8,95dc,95e1-95e2,95e5,961c,9621,9628,962a,962e-962f,9632,963b,963f-9640,9642,9644,964b-964d,964f-9650,965b-965f,9662-9666,966a,966c,9670,9672-9673,9675-9678,967a,967d,9685-9686,9688,968a-968b,968d-968f,9694-9695,9697-9699,969b-969d,96a0,96a3,96a7-96a8,96aa,96af-96b2,96b4,96b6-96b9,96bb-96bc,96c0-96c1,96c4-96c7,96c9,96cb-96ce,96d1,96d5-96d6,96d9,96db-96dc,96e2-96e3,96e8,96ea-96eb,96f0,96f2,96f6-96f7,96f9,96fb,9700,9704,9706-9708,970a,970d-970f,9711,9713,9716,9719,971c,971e,9724,9727,972a,9730,9732-9733,9738-9739,973b,973d-973e,9742-9744,9746,9748-9749,974d,974f,9751-9752,9755-9756,9759,975c,975e,9760-9762,9764,9766,9768-9769,976b,976d,9771,9774,9779-977a,977c,9781,9784-9786,978b,978d,978f-9790,9798,979c,97a0,97a3,97a6,97a8,97ab,97ad,97b3-97b4,97c3,97c6,97c8,97cb,97d3,97dc,97ed-97ee,97f2-97f3,97f5-97f6,97fb,97ff,9801-9803,9805-9806,9808,980c,980f-9813,9817-9818,981a,9821,9824,982c-982d,9834,9837-9838,983b-983d,9846,984b-984f,9854-9855,9857-9858,985b,985e,9865,9867,986b,986f-9871,9873-9874,98a8,98aa,98af,98b1,98b6,98c3-98c4,98c6,98db-98dc,98df,98e2,98e9,98eb,98ed-98ef,98f2,98f4,98fc-98fe,9903,9905,9909-990a,990c,9910,9912-9914,9918,991d-991e,9920-9921,9924,9927-9928,992c,992e,993d-993e,9942,9945,9949,994b-994c,9950-9952,9955,9957,9996-9999,999e,99a5,99a8,99ac-99ae,99b3-99b4,99bc,99c1,99c4-99c6,99c8,99d0-99d2,99d5,99d8,99db,99dd,99df,99e2,99ed-99ee,99f1-99f2,99f8,99fb,99ff,9a01,9a05,9a0e-9a0f,9a12-9a13,9a19,9a28,9a2b,9a30,9a37,9a3e,9a40,9a42-9a43,9a45,9a4d-9a4e,9a55,9a57,9a5a-9a5b,9a5f,9a62,9a64-9a65,9a69-9a6b,9aa8,9aad,9ab0,9ab8,9abc,9ac0,9ac4,9acf,9ad1,9ad3-9ad4,9ad8-9ad9,9adc,9ade-9adf,9ae2-9ae3,9ae6,9aea-9aeb,9aed-9aef,9af1,9af4,9af7,9afb,9b06,9b18,9b1a,9b1f,9b22-9b23,9b25,9b27-9b2a,9b2e-9b2f,9b31-9b32,9b3b-9b3c,9b41-9b45,9b4d-9b4f,9b51,9b54,9b58,9b5a,9b6f,9b72,9b74-9b75,9b83,9b8e-9b8f,9b91-9b93,9b96-9b97,9b9f-9ba0,9ba8,9baa-9bab,9bad-9bae,9bb1,9bb4,9bb9,9bbb,9bc0,9bc6,9bc9-9bca,9bcf,9bd1-9bd2,9bd4,9bd6,9bdb,9be1-9be4,9be8,9bf0-9bf2,9bf5,9c00,9c04,9c06,9c08-9c0a,9c0c-9c0d,9c10,9c12-9c15,9c1b,9c21,9c24-9c25,9c2d-9c30,9c32,9c39-9c3b,9c3e,9c46-9c48,9c52,9c57,9c5a,9c60,9c67,9c76,9c78,9ce5,9ce7,9ce9,9ceb-9cec,9cf0,9cf3-9cf4,9cf6,9d03,9d06-9d09,9d0e,9d12,9d15,9d1b,9d1f,9d23,9d26,9d28,9d2a-9d2c,9d3b,9d3e-9d3f,9d41,9d44,9d46,9d48,9d50-9d51,9d59,9d5c-9d5e,9d60-9d61,9d64,9d6b-9d6c,9d6f-9d70,9d72,9d7a,9d87,9d89,9d8f,9d9a,9da4,9da9,9dab,9daf,9db2,9db4,9db8,9dba-9dbb,9dc1-9dc2,9dc4,9dc6,9dcf,9dd3,9dd9,9de6,9ded,9def,9df2,9df8-9dfa,9dfd,9e19-9e1b,9e1e,9e75,9e78-9e79,9e7d,9e7f,9e81,9e88,9e8b-9e8c,9e91-9e93,9e95,9e97,9e9d,9e9f,9ea5-9ea6,9ea9-9eaa,9ead,9eb8-9ebc,9ebe-9ebf,9ec4,9ecc-9ed2,9ed4,9ed8-9ed9,9edb-9ede,9ee0,9ee5,9ee8,9eef,9ef4,9ef6-9ef7,9ef9,9efb-9efd,9f07-9f08,9f0e,9f13,9f15,9f20-9f21,9f2c,9f3b,9f3e,9f4a-9f4b,9f4e-9f4f,9f52,9f54,9f5f-9f63,9f66-9f67,9f6a,9f6c,9f72,9f76-9f77,9f8d,9f95,9f9c-9f9d,9fa0,f929,f9dc,fa0e-fa2d,ff01-ff5e,ff61-ff9f,ffe0-ffe5 -Basic Hangul:3000-303f,3131-318e,0000-007f,00a1,00a4,00a7-00a8,00aa,00ad-00ae,00b0-00b4,00b6-00ba,00bc-00bf,00c6,00d0,00d7-00d8,00de-00df,00e6,00f0,00f7-00f8,00fe,0111,0126-0127,0131-0133,0138,013f-0142,0149-014b,0152-0153,0166-0167,02c7,02d0,02d8-02db,02dd,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,0401,0410-044f,0451,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2074,207f,2081-2084,20ac,2103,2109,2113,2116,2121-2122,2126,212b,2153-2154,215b-215e,2160-2169,2170-2179,2190-2199,21d2,21d4,2200,2202-2203,2207-2208,220b,220f,2211,221a,221d-221e,2220,2225,2227-222c,222e,2234-2235,223c-223d,2252,2260-2261,2264-2265,226a-226b,2282-2283,2286-2287,2299,22a5,2312,2460-246e,2474-2482,249c-24b5,24d0-24e9,2500-2503,250c-2549,254b,2592,25a0-25a1,25a3-25a9,25b2-25b3,25b6-25b7,25bc-25bd,25c0-25c1,25c6-25c8,25cb,25ce-25d1,2605-2606,260e-260f,261c,261e,2640,2642,2660-2661,2663-2665,2667-266a,266c-266d,3000-3003,3008-3011,3013-3015,3131-318e,3200-321c,3260-327b,327f,3380-3384,3388-33ca,33cf-33d0,33d3,33d6,33d8,33db-33dd,ac00-ac01,ac04,ac07-ac0a,ac10-ac17,ac19-ac1d,ac20,ac24,ac2c-ac2d,ac2f-ac31,ac38-ac39,ac3c,ac40,ac4b,ac4d,ac54,ac58,ac5c,ac70-ac71,ac74,ac77-ac78,ac7a,ac80-ac81,ac83-ac86,ac89-ac8c,ac90,ac94,ac9c-ac9d,ac9f-aca1,aca8-acaa,acac,acaf-acb0,acb8-acb9,acbb-acbd,acc1,acc4,acc8,accc,acd5,acd7,ace0-ace1,ace4,ace7-ace8,acea,acec,acef-acf1,acf3,acf5-acf6,acfc-acfd,ad00,ad04,ad06,ad0c-ad0d,ad0f,ad11,ad18,ad1c,ad20,ad29,ad2c-ad2d,ad34-ad35,ad38,ad3c,ad44-ad45,ad47,ad49,ad50,ad54,ad58,ad61,ad63,ad6c-ad6d,ad70,ad73-ad76,ad7b-ad7d,ad7f,ad81-ad82,ad88-ad89,ad8c,ad90,ad9c-ad9d,ada4,adb7,adc0-adc1,adc4,adc8,add0-add1,add3,addc,ade0,ade4,adf8-adf9,adfc,adff-ae01,ae08-ae09,ae0b,ae0d,ae14,ae30-ae31,ae34,ae37-ae38,ae3a,ae40-ae41,ae43,ae45-ae46,ae4a,ae4c-ae4e,ae50,ae54,ae56,ae5c-ae5d,ae5f-ae61,ae65,ae68-ae69,ae6c,ae70,ae78-ae79,ae7b-ae7d,ae84-ae85,ae8c,aebc-aebe,aec0,aec4,aecc-aecd,aecf-aed1,aed8-aed9,aedc,aee8,aeeb,aeed,aef4,aef8,aefc,af07-af08,af0d,af10,af2c-af2d,af30,af32,af34,af3c-af3d,af3f,af41-af43,af48-af49,af50,af5c-af5d,af64-af65,af79,af80,af84,af88,af90-af91,af95,af9c,afb8-afb9,afbc,afc0,afc7-afc9,afcb,afcd-afce,afd4,afdc,afe8-afe9,aff0-aff1,aff4,aff8,b000-b001,b004,b00c,b010,b014,b01c-b01d,b028,b044-b045,b048,b04a,b04c,b04e,b053-b055,b057,b059,b05d,b07c-b07d,b080,b084,b08c-b08d,b08f,b091,b098-b09a,b09c,b09f-b0a2,b0a8-b0a9,b0ab-b0af,b0b1,b0b3-b0b5,b0b8,b0bc,b0c4-b0c5,b0c7-b0c9,b0d0-b0d1,b0d4,b0d8,b0e0,b0e5,b108-b109,b10b-b10c,b110,b112-b113,b118-b119,b11b-b11d,b123-b125,b128,b12c,b134-b135,b137-b139,b140-b141,b144,b148,b150-b151,b154-b155,b158,b15c,b160,b178-b179,b17c,b180,b182,b188-b189,b18b,b18d,b192-b194,b198,b19c,b1a8,b1cc,b1d0,b1d4,b1dc-b1dd,b1df,b1e8-b1e9,b1ec,b1f0,b1f9,b1fb,b1fd,b204-b205,b208,b20b-b20c,b214-b215,b217,b219,b220,b234,b23c,b258,b25c,b260,b268-b269,b274-b275,b27c,b284-b285,b289,b290-b291,b294,b298-b29a,b2a0-b2a1,b2a3,b2a5-b2a6,b2aa,b2ac,b2b0,b2b4,b2c8-b2c9,b2cc,b2d0,b2d2,b2d8-b2d9,b2db,b2dd,b2e2,b2e4-b2e6,b2e8,b2eb-b2ef,b2f3-b2f5,b2f7-b2fb,b2ff-b301,b304,b308,b310-b311,b313-b315,b31c,b354-b356,b358,b35b-b35c,b35e-b35f,b364-b365,b367,b369,b36b,b36e,b370-b371,b374,b378,b380-b381,b383-b385,b38c,b390,b394,b3a0-b3a1,b3a8,b3ac,b3c4-b3c5,b3c8,b3cb-b3cc,b3ce,b3d0,b3d4-b3d5,b3d7,b3d9,b3db,b3dd,b3e0,b3e4,b3e8,b3fc,b410,b418,b41c,b420,b428-b429,b42b,b434,b450-b451,b454,b458,b460-b461,b463,b465,b46c,b480,b488,b49d,b4a4,b4a8,b4ac,b4b5,b4b7,b4b9,b4c0,b4c4,b4c8,b4d0,b4d5,b4dc-b4dd,b4e0,b4e3-b4e4,b4e6,b4ec-b4ed,b4ef,b4f1,b4f8,b514-b515,b518,b51b-b51c,b524-b525,b527-b52a,b530-b531,b534,b538,b540-b541,b543-b545,b54b-b54d,b550,b554,b55c-b55d,b55f-b561,b5a0-b5a1,b5a4,b5a8,b5aa-b5ab,b5b0-b5b1,b5b3-b5b5,b5bb-b5bd,b5c0,b5c4,b5cc-b5cd,b5cf-b5d1,b5d8,b5ec,b610-b611,b614,b618,b625,b62c,b634,b648,b664,b668,b69c-b69d,b6a0,b6a4,b6ab-b6ac,b6b1,b6d4,b6f0,b6f4,b6f8,b700-b701,b705,b728-b729,b72c,b72f-b730,b738-b739,b73b,b744,b748,b74c,b754-b755,b760,b764,b768,b770-b771,b773,b775,b77c-b77d,b780,b784,b78c-b78d,b78f-b792,b796-b799,b79c,b7a0,b7a8-b7a9,b7ab-b7ad,b7b4-b7b5,b7b8,b7c7,b7c9,b7ec-b7ed,b7f0,b7f4,b7fc-b7fd,b7ff-b801,b807-b809,b80c,b810,b818-b819,b81b,b81d,b824-b825,b828,b82c,b834-b835,b837-b839,b840,b844,b851,b853,b85c-b85d,b860,b864,b86c-b86d,b86f,b871,b878,b87c,b88d,b8a8,b8b0,b8b4,b8b8,b8c0-b8c1,b8c3,b8c5,b8cc,b8d0,b8d4,b8dd,b8df,b8e1,b8e8-b8e9,b8ec,b8f0,b8f8-b8f9,b8fb,b8fd,b904,b918,b920,b93c-b93d,b940,b944,b94c,b94f,b951,b958-b959,b95c,b960,b968-b969,b96b,b96d,b974-b975,b978,b97c,b984-b985,b987,b989-b98a,b98d-b98e,b9ac-b9ad,b9b0,b9b4,b9bc-b9bd,b9bf,b9c1,b9c8-b9c9,b9cc,b9ce-b9d2,b9d8-b9d9,b9db,b9dd-b9de,b9e1,b9e3-b9e5,b9e8,b9ec,b9f4-b9f5,b9f7-b9fa,ba00-ba01,ba08,ba15,ba38-ba39,ba3c,ba40,ba42,ba48-ba49,ba4b,ba4d-ba4e,ba53-ba55,ba58,ba5c,ba64-ba65,ba67-ba69,ba70-ba71,ba74,ba78,ba83-ba85,ba87,ba8c,baa8-baa9,baab-baac,bab0,bab2,bab8-bab9,babb,babd,bac4,bac8,bad8-bad9,bafc,bb00,bb04,bb0d,bb0f,bb11,bb18,bb1c,bb20,bb29,bb2b,bb34-bb36,bb38,bb3b-bb3e,bb44-bb45,bb47,bb49,bb4d,bb4f-bb50,bb54,bb58,bb61,bb63,bb6c,bb88,bb8c,bb90,bba4,bba8,bbac,bbb4,bbb7,bbc0,bbc4,bbc8,bbd0,bbd3,bbf8-bbf9,bbfc,bbff-bc00,bc02,bc08-bc09,bc0b-bc0d,bc0f,bc11,bc14-bc18,bc1b-bc1f,bc24-bc25,bc27,bc29,bc2d,bc30-bc31,bc34,bc38,bc40-bc41,bc43-bc45,bc49,bc4c-bc4d,bc50,bc5d,bc84-bc85,bc88,bc8b-bc8c,bc8e,bc94-bc95,bc97,bc99-bc9a,bca0-bca1,bca4,bca7-bca8,bcb0-bcb1,bcb3-bcb5,bcbc-bcbd,bcc0,bcc4,bccd,bccf-bcd1,bcd5,bcd8,bcdc,bcf4-bcf6,bcf8,bcfc,bd04-bd05,bd07,bd09,bd10,bd14,bd24,bd2c,bd40,bd48-bd49,bd4c,bd50,bd58-bd59,bd64,bd68,bd80-bd81,bd84,bd87-bd8a,bd90-bd91,bd93,bd95,bd99-bd9a,bd9c,bda4,bdb0,bdb8,bdd4-bdd5,bdd8,bddc,bde9,bdf0,bdf4,bdf8,be00,be03,be05,be0c-be0d,be10,be14,be1c-be1d,be1f,be44-be45,be48,be4c,be4e,be54-be55,be57,be59-be5b,be60-be61,be64,be68,be6a,be70-be71,be73-be75,be7b-be7d,be80,be84,be8c-be8d,be8f-be91,be98-be99,bea8,bed0-bed1,bed4,bed7-bed8,bee0,bee3-bee5,beec,bf01,bf08-bf09,bf18-bf19,bf1b-bf1d,bf40-bf41,bf44,bf48,bf50-bf51,bf55,bf94,bfb0,bfc5,bfcc-bfcd,bfd0,bfd4,bfdc,bfdf,bfe1,c03c,c051,c058,c05c,c060,c068-c069,c090-c091,c094,c098,c0a0-c0a1,c0a3,c0a5,c0ac-c0ad,c0af-c0b0,c0b3-c0b6,c0bc-c0bd,c0bf-c0c1,c0c5,c0c8-c0c9,c0cc,c0d0,c0d8-c0d9,c0db-c0dd,c0e4-c0e5,c0e8,c0ec,c0f4-c0f5,c0f7,c0f9,c100,c104,c108,c110,c115,c11c-c120,c123-c124,c126-c127,c12c-c12d,c12f-c131,c136,c138-c139,c13c,c140,c148-c149,c14b-c14d,c154-c155,c158,c15c,c164-c165,c167-c169,c170,c174,c178,c185,c18c-c18e,c190,c194,c196,c19c-c19d,c19f,c1a1,c1a5,c1a8-c1a9,c1ac,c1b0,c1bd,c1c4,c1c8,c1cc,c1d4,c1d7-c1d8,c1e0,c1e4,c1e8,c1f0-c1f1,c1f3,c1fc-c1fd,c200,c204,c20c-c20d,c20f,c211,c218-c219,c21c,c21f-c220,c228-c229,c22b,c22d,c22f,c231-c232,c234,c248,c250-c251,c254,c258,c260,c265,c26c-c26d,c270,c274,c27c-c27d,c27f,c281,c288-c289,c290,c298,c29b,c29d,c2a4-c2a5,c2a8,c2ac-c2ad,c2b4-c2b5,c2b7,c2b9,c2dc-c2dd,c2e0,c2e3-c2e4,c2eb-c2ed,c2ef,c2f1,c2f6,c2f8-c2f9,c2fb-c2fc,c300,c308-c309,c30c-c30d,c313-c315,c318,c31c,c324-c325,c328-c329,c345,c368-c369,c36c,c370,c372,c378-c379,c37c-c37d,c384,c388,c38c,c3c0,c3d8-c3d9,c3dc,c3df-c3e0,c3e2,c3e8-c3e9,c3ed,c3f4-c3f5,c3f8,c408,c410,c424,c42c,c430,c434,c43c-c43d,c448,c464-c465,c468,c46c,c474-c475,c479,c480,c494,c49c,c4b8,c4bc,c4e9,c4f0-c4f1,c4f4,c4f8,c4fa,c4ff-c501,c50c,c510,c514,c51c,c528-c529,c52c,c530,c538-c539,c53b,c53d,c544-c545,c548-c54a,c54c-c54e,c553-c555,c557-c559,c55d-c55e,c560-c561,c564,c568,c570-c571,c573-c575,c57c-c57d,c580,c584,c587,c58c-c58d,c58f,c591,c595,c597-c598,c59c,c5a0,c5a9,c5b4-c5b5,c5b8-c5b9,c5bb-c5be,c5c4-c5ca,c5cc,c5ce,c5d0-c5d1,c5d4,c5d8,c5e0-c5e1,c5e3,c5e5,c5ec-c5ee,c5f0,c5f4,c5f6-c5f7,c5fc-c601,c605-c608,c60c,c610,c618-c619,c61b-c61c,c624-c625,c628,c62c-c62e,c630,c633-c635,c637,c639,c63b,c640-c641,c644,c648,c650-c651,c653-c655,c65c-c65d,c660,c66c,c66f,c671,c678-c679,c67c,c680,c688-c689,c68b,c68d,c694-c695,c698,c69c,c6a4-c6a5,c6a7,c6a9,c6b0-c6b1,c6b4,c6b8-c6ba,c6c0-c6c1,c6c3,c6c5,c6cc-c6cd,c6d0,c6d4,c6dc-c6dd,c6e0-c6e1,c6e8-c6e9,c6ec,c6f0,c6f8-c6f9,c6fd,c704-c705,c708,c70c,c714-c715,c717,c719,c720-c721,c724,c728,c730-c731,c733,c735,c737,c73c-c73d,c740,c744,c74a,c74c-c74d,c74f,c751-c758,c75c,c760,c768,c76b,c774-c775,c778,c77c-c77e,c783-c785,c787-c78a,c78e,c790-c791,c794,c796-c798,c79a,c7a0-c7a1,c7a3-c7a6,c7ac-c7ad,c7b0,c7b4,c7bc-c7bd,c7bf-c7c1,c7c8-c7c9,c7cc,c7ce,c7d0,c7d8,c7dd,c7e4,c7e8,c7ec,c800-c801,c804,c808,c80a,c810-c811,c813,c815-c816,c81c-c81d,c820,c824,c82c-c82d,c82f,c831,c838,c83c,c840,c848-c849,c84c-c84d,c854,c870-c871,c874,c878,c87a,c880-c881,c883,c885-c887,c88b-c88d,c894,c89d,c89f,c8a1,c8a8,c8bc-c8bd,c8c4,c8c8,c8cc,c8d4-c8d5,c8d7,c8d9,c8e0-c8e1,c8e4,c8f5,c8fc-c8fd,c900,c904-c906,c90c-c90d,c90f,c911,c918,c92c,c934,c950-c951,c954,c958,c960-c961,c963,c96c,c970,c974,c97c,c988-c989,c98c,c990,c998-c999,c99b,c99d,c9c0-c9c1,c9c4,c9c7-c9c8,c9ca,c9d0-c9d1,c9d3,c9d5-c9d6,c9d9-c9da,c9dc-c9dd,c9e0,c9e2,c9e4,c9e7,c9ec-c9ed,c9ef-c9f1,c9f8-c9f9,c9fc,ca00,ca08-ca09,ca0b-ca0d,ca14,ca18,ca29,ca4c-ca4d,ca50,ca54,ca5c-ca5d,ca5f-ca61,ca68,ca7d,ca84,ca98,cabc-cabd,cac0,cac4,cacc-cacd,cacf,cad1,cad3,cad8-cad9,cae0,caec,caf4,cb08,cb10,cb14,cb18,cb20-cb21,cb41,cb48-cb49,cb4c,cb50,cb58-cb59,cb5d,cb64,cb78-cb79,cb9c,cbb8,cbd4,cbe4,cbe7,cbe9,cc0c-cc0d,cc10,cc14,cc1c-cc1d,cc21-cc22,cc27-cc29,cc2c,cc2e,cc30,cc38-cc39,cc3b-cc3e,cc44-cc45,cc48,cc4c,cc54-cc55,cc57-cc59,cc60,cc64,cc66,cc68,cc70,cc75,cc98-cc99,cc9c,cca0,cca8-cca9,ccab-ccad,ccb4-ccb5,ccb8,ccbc,ccc4-ccc5,ccc7,ccc9,ccd0,ccd4,cce4,ccec,ccf0,cd01,cd08-cd09,cd0c,cd10,cd18-cd19,cd1b,cd1d,cd24,cd28,cd2c,cd39,cd5c,cd60,cd64,cd6c-cd6d,cd6f,cd71,cd78,cd88,cd94-cd95,cd98,cd9c,cda4-cda5,cda7,cda9,cdb0,cdc4,cdcc,cdd0,cde8,cdec,cdf0,cdf8-cdf9,cdfb,cdfd,ce04,ce08,ce0c,ce14,ce19,ce20-ce21,ce24,ce28,ce30-ce31,ce33,ce35,ce58-ce59,ce5c,ce5f-ce61,ce68-ce69,ce6b,ce6d,ce74-ce75,ce78,ce7c,ce84-ce85,ce87,ce89,ce90-ce91,ce94,ce98,cea0-cea1,cea3-cea5,ceac-cead,cec1,cee4-cee5,cee8,ceeb-ceec,cef4-cef5,cef7-cef9,cf00-cf01,cf04,cf08,cf10-cf11,cf13,cf15,cf1c,cf20,cf24,cf2c-cf2d,cf2f-cf31,cf38,cf54-cf55,cf58,cf5c,cf64-cf65,cf67,cf69,cf70-cf71,cf74,cf78,cf80,cf85,cf8c,cfa1,cfa8,cfb0,cfc4,cfe0-cfe1,cfe4,cfe8,cff0-cff1,cff3,cff5,cffc,d000,d004,d011,d018,d02d,d034-d035,d038,d03c,d044-d045,d047,d049,d050,d054,d058,d060,d06c-d06d,d070,d074,d07c-d07d,d081,d0a4-d0a5,d0a8,d0ac,d0b4-d0b5,d0b7,d0b9,d0c0-d0c1,d0c4,d0c8-d0c9,d0d0-d0d1,d0d3-d0d5,d0dc-d0dd,d0e0,d0e4,d0ec-d0ed,d0ef-d0f1,d0f8,d10d,d130-d131,d134,d138,d13a,d140-d141,d143-d145,d14c-d14d,d150,d154,d15c-d15d,d15f,d161,d168,d16c,d17c,d184,d188,d1a0-d1a1,d1a4,d1a8,d1b0-d1b1,d1b3,d1b5,d1ba,d1bc,d1c0,d1d8,d1f4,d1f8,d207,d209,d210,d22c-d22d,d230,d234,d23c-d23d,d23f,d241,d248,d25c,d264,d280-d281,d284,d288,d290-d291,d295,d29c,d2a0,d2a4,d2ac,d2b1,d2b8-d2b9,d2bc,d2bf-d2c0,d2c2,d2c8-d2c9,d2cb,d2d4,d2d8,d2dc,d2e4-d2e5,d2f0-d2f1,d2f4,d2f8,d300-d301,d303,d305,d30c-d30e,d310,d314,d316,d31c-d31d,d31f-d321,d325,d328-d329,d32c,d330,d338-d339,d33b-d33d,d344-d345,d37c-d37d,d380,d384,d38c-d38d,d38f-d391,d398-d399,d39c,d3a0,d3a8-d3a9,d3ab,d3ad,d3b4,d3b8,d3bc,d3c4-d3c5,d3c8-d3c9,d3d0,d3d8,d3e1,d3e3,d3ec-d3ed,d3f0,d3f4,d3fc-d3fd,d3ff,d401,d408,d41d,d440,d444,d45c,d460,d464,d46d,d46f,d478-d479,d47c,d47f-d480,d482,d488-d489,d48b,d48d,d494,d4a9,d4cc,d4d0,d4d4,d4dc,d4df,d4e8,d4ec,d4f0,d4f8,d4fb,d4fd,d504,d508,d50c,d514-d515,d517,d53c-d53d,d540,d544,d54c-d54d,d54f,d551,d558-d559,d55c,d560,d565,d568-d569,d56b,d56d,d574-d575,d578,d57c,d584-d585,d587-d589,d590,d5a5,d5c8-d5c9,d5cc,d5d0,d5d2,d5d8-d5d9,d5db,d5dd,d5e4-d5e5,d5e8,d5ec,d5f4-d5f5,d5f7,d5f9,d600-d601,d604,d608,d610-d611,d613-d615,d61c,d620,d624,d62d,d638-d639,d63c,d640,d645,d648-d649,d64b,d64d,d651,d654-d655,d658,d65c,d667,d669,d670-d671,d674,d683,d685,d68c-d68d,d690,d694,d69d,d69f,d6a1,d6a8,d6ac,d6b0,d6b9,d6bb,d6c4-d6c5,d6c8,d6cc,d6d1,d6d4,d6d7,d6d9,d6e0,d6e4,d6e8,d6f0,d6f5,d6fc-d6fd,d700,d704,d711,d718-d719,d71c,d720,d728-d729,d72b,d72d,d734-d735,d738,d73c,d744,d747,d749,d750-d751,d754,d756-d759,d760-d761,d763,d765,d769,d76c,d770,d774,d77c-d77d,d781,d788-d789,d78c,d790,d798-d799,d79b,d79d,ff01-ff5e,ffe0-ffe3,ffe5-ffe6 -Hangul (All):0020-007e,1100-11f9,3000-303f,3131-318e,327f,ac00-d7a3,ff01-ff60 -Traditional Chinese - Level 1:0085,3000-301e,4e00-4e01,4e03,4e08-4e0b,4e0d,4e10-4e11,4e14-4e16,4e18-4e19,4e1e-4e1f,4e26,4e2b,4e2d,4e30,4e32,4e38-4e39,4e3b,4e43,4e45,4e48,4e4b,4e4d-4e4f,4e52-4e53,4e56,4e58-4e59,4e5d-4e5f,4e69,4e73,4e7e,4e82,4e86,4e88,4e8b-4e8c,4e8e,4e91-4e92,4e94-4e95,4e99,4e9b,4e9e-4e9f,4ea1-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb3,4eba,4ec0-4ec1,4ec3-4ec4,4ec6-4ec7,4eca-4ecb,4ecd,4ed4-4ed9,4ede-4edf,4ee3-4ee5,4ef0,4ef2-4ef3,4ef6,4efb,4efd,4eff,4f01,4f09-4f0b,4f0d,4f0f-4f11,4f15,4f19,4f2f-4f30,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46-4f48,4f4d-4f51,4f54-4f55,4f57,4f59-4f5e,4f60,4f63,4f69,4f6c,4f6f-4f70,4f73,4f75,4f7a-4f7b,4f7e-4f7f,4f83,4f86,4f88,4f8b,4f8d,4f8f,4f91,4f96,4f9b,4f9d,4fae-4faf,4fb5-4fb7,4fbf,4fc2-4fc4,4fca,4fce-4fd1,4fd7-4fd8,4fda,4fdd-4fe1,4fee-4fef,4ff1,4ff3,4ff8,4ffa,4ffe,5000,5006,5009,500b-500d,500f,5011-5012,5014,5016,5018-501a,501f,5021,5023,5025-5026,5028-502b,502d,503c,5043,5047,5049,504c,504e-504f,5055,505a,505c,5065,506d,506f,5074-5077,507a,507d,5080,5085,508d,5091,5096,5098-509a,50a2,50ac-50ad,50af,50b2-50b3,50b5,50b7,50bb,50be,50c5,50c7,50ce-50cf,50d1,50d5-50d6,50da,50e5,50e7,50e9,50ed-50ee,50f1,50f5,50f9,50fb,5100,5102,5104-5105,5108-5109,5110,5112,5114-5115,5118,511f,5121,512a,5132-5133,5137-5138,513b-513c,513f-5141,5143-5149,514b-514d,5152,5154-5155,5157,515c,5162,5165,5167-5169,516b-516e,5171,5175-5178,517c,5180,5189-518a,518d,5191-5192,5195,5197,51a0,51a2,51a4-51a5,51aa,51ac,51b0,51b6-51b7,51bd,51c6,51cb-51cd,51dc-51dd,51e0-51e1,51f0-51f1,51f3,51f6,51f8-51fa,51fd,5200-5201,5203,5206-5208,520a,520e,5211-5212,5216-5217,521d,5224-5225,5228-522a,522e,5230,5236-5238,523a-523b,5241,5243,5247,524a-524e,5254,5256,525b-525d,5269-526a,526f,5272,5274-5275,5277,527d,527f,5282-5283,5287-528a,528d,5291,5293,529b,529f-52a0,52a3,52a9-52ac,52bb,52be,52c1,52c3,52c7,52c9,52d2,52d5,52d7-52d9,52db,52dd-52df,52e2-52e4,52e6,52f0,52f3,52f5,52f8,52fa-52fb,52fe-52ff,5305-5306,5308,530d,530f-5310,5315-5317,5319,531d,5320-5321,5323,532a,532f,5331,5339,533e-5341,5343,5345,5347-534a,5351-5354,5357,535a,535c,535e,5360-5361,5366,536e-5371,5373,5375,5377-5379,537b,537f,5384,539a,539d,539f,53a5,53ad,53b2,53bb,53c3,53c8-53cb,53cd,53d4,53d6-53d7,53db,53df,53e2-53e6,53e8-53f3,53f5,53f8,53fb-53fc,5401,5403-5404,5406,5408-5412,541b,541d-5420,5426-5427,5429,542b-542e,5431,5433,5435-5436,5438-5439,543b-543c,543e,5440,5442-5443,5446,5448,544a,544e,5462,5468,5471,5473,5475-5478,547b-547d,5480,5484,5486,548b-548c,548e,5490,5492,5495-5496,549a,54a6-54ac,54af,54b1,54b3,54b8,54bb,54bd,54bf-54c2,54c4,54c7-54c9,54ce,54e1,54e5-54e6,54e8-54ea,54ed-54ee,54f2,54fa,54fc-54fd,5501,5506-5507,5509,550f-5510,5514,5527,552c,552e-552f,5531,5533,5537-5538,553e,5541,5543-5544,5546,554a,554f,5555-5557,555c,555e-555f,5561,5563-5564,5566,556a,557b-557c,557e,5580,5582-5584,5587,5589-558b,5594,5598-559a,559c-559d,559f,55a7,55aa-55ac,55ae,55b1-55b3,55bb,55c5-55c7,55c9,55ce,55d1,55d3,55da,55dc,55df,55e1,55e3-55e6,55e8,55ef,55f6-55f7,55fd-55fe,5600,5606,5608-5609,560d-560e,5610,5614,5616-5617,561b,561f,5629,562e-5630,5632,5634,5636,5639,563b,563f,564e,5653,5657,5659,5662,5664-5665,5668-566c,566f,5671,5674,5676,5678-5679,5680,5685,5687,568e-5690,5695,56a5,56a8,56ae,56b4,56b6-56b7,56bc,56c0-56c2,56c8-56ca,56cc,56d1,56da-56db,56dd-56de,56e0,56e4,56ea-56eb,56f0,56fa,56ff,5703-5704,5708-5709,570b,570d,5712-5713,5716,5718,571f,5728-5729,572c-572d,572f-5730,5733,573b,573e,5740,5747,574a,574d-5751,5761,5764,5766,5769-576a,5777,577c,5782-5783,578b,5793,57a0,57a2-57a3,57ae,57c2-57c3,57cb,57ce,57d4,57df-57e0,57e4,57f7,57f9-57fa,5802,5805-5806,5809-580a,581d,5820-5821,5824,582a,582f-5831,5834-5835,584a-584c,5851-5852,5854,5857-5858,585a,585e,5862,586b,586d,5875,5879,587d-587e,5880,5883,5885,588a,5893,589c,589e-589f,58a6,58a8-58a9,58ae,58b3,58be,58c1,58c5,58c7,58ce,58d1,58d3,58d5,58d8-58d9,58de-58df,58e2,58e4,58e9,58eb-58ec,58ef,58f9-58fa,58fd,590f,5914-5916,5919-591a,591c,5920,5922,5924-5925,5927,5929-592b,592d-592e,5931,5937-5938,593e,5944,5947-5949,594e-5951,5954-5955,5957-5958,595a,5960,5962,5967,5969-596a,596d-596e,5973-5974,5976,5978-5979,597d,5981-5984,598a,598d,5992-5993,5996,5999,599d-599e,59a3-59a5,59a8,59ae-59af,59b3,59b9,59bb,59be,59c5-59c6,59ca-59cb,59cd,59d0-59d4,59d8,59da,59dc,59e3,59e5-59e6,59e8,59ea,59ec,59fb,59ff,5a01,5a03,5a09,5a0c,5a11,5a13,5a18,5a1b-5a1c,5a1f-5a20,5a23,5a25,5a29,5a36,5a3c,5a40-5a41,5a46,5a49-5a4a,5a5a,5a62,5a66,5a6a,5a77,5a7f,5a92,5a9a-5a9b,5aa7,5ab2-5ab3,5abc-5abe,5ac1-5ac2,5ac9,5acc,5ad6-5ad8,5ae1,5ae3,5ae6,5ae9,5af5,5afb,5b08-5b09,5b0b-5b0c,5b1d,5b24,5b2a,5b30,5b34,5b38,5b40,5b43,5b50-5b51,5b53-5b55,5b57-5b58,5b5a-5b5d,5b5f,5b63-5b64,5b69,5b6b,5b70-5b71,5b73,5b75,5b78,5b7a,5b7d,5b7f,5b83,5b85,5b87-5b89,5b8b-5b8c,5b8f,5b97-5b9c,5ba2-5ba6,5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf,5bc2,5bc4-5bc7,5bcc,5bd0,5bd2-5bd3,5bde-5bdf,5be1-5be2,5be4-5be9,5beb-5bec,5bee,5bf0,5bf5-5bf6,5bf8,5bfa,5c01,5c04,5c07-5c0b,5c0d-5c0f,5c11,5c16,5c1a,5c22,5c24,5c2c,5c31,5c37-5c3a,5c3c,5c3e-5c41,5c45-5c46,5c48,5c4b,5c4d-5c51,5c55,5c58,5c5c-5c5d,5c60,5c62,5c64-5c65,5c68,5c6c,5c6f,5c71,5c79,5c8c,5c90-5c91,5c94,5ca1,5ca9,5cab,5cb1,5cb3,5cb7-5cb8,5cd2,5cd9,5ce8,5cea,5ced,5cf0,5cf4,5cf6,5cfb,5cfd,5d01,5d06-5d07,5d0e,5d11,5d14,5d16-5d17,5d19,5d1b,5d22,5d24,5d27,5d29,5d34,5d47,5d4c,5d50,5d69,5d6f,5d84,5d87,5d94,5d9d,5db8,5dba,5dbc-5dbd,5dc9,5dcd,5dd2,5dd4,5dd6,5ddd-5dde,5de1-5de2,5de5-5de8,5deb,5dee,5df1-5df4,5df7,5dfd-5dfe,5e02-5e03,5e06,5e0c,5e11,5e15-5e16,5e18,5e1a-5e1b,5e1d,5e1f,5e25,5e2b,5e2d,5e33,5e36-5e38,5e3d,5e40,5e43,5e45,5e4c,5e54-5e55,5e57,5e5b,5e5f,5e61-5e63,5e6b,5e72-5e74,5e76,5e78-5e79,5e7b-5e7e,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea0,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ebe,5ec1-5ec2,5ec4,5ec8-5eca,5ed3,5ed6,5eda,5edd,5edf-5ee0,5ee2-5ee3,5eec,5ef3,5ef6-5ef7,5efa,5efe-5eff,5f01,5f04,5f08,5f0a-5f0b,5f0f,5f12-5f15,5f17-5f18,5f1b,5f1f,5f26-5f27,5f29,5f2d,5f31,5f35,5f37,5f3c,5f46,5f48,5f4a,5f4c,5f4e,5f57,5f59,5f5d,5f62,5f64-5f65,5f69-5f6d,5f70-5f71,5f77,5f79,5f7c,5f7f-5f81,5f85,5f87-5f8c,5f90-5f92,5f97-5f99,5f9c,5f9e,5fa0-5fa1,5fa8-5faa,5fac,5fae,5fb5,5fb7,5fb9,5fbd,5fc3,5fc5,5fcc-5fcd,5fd6-5fd9,5fdd,5fe0,5fea-5feb,5ff1,5ff5,5ff8,5ffd,5fff,600e-600f,6012,6014-6016,601b,601d,6020-6021,6025,6027-602b,602f,6035,6043,6046,604d,6050,6055,6059,6062-6065,6068-606d,606f-6070,607f,6084-6085,6089,608c-608d,6094,6096,609a,609f-60a0,60a3,60a8,60b2,60b4-60b6,60b8,60bb-60bd,60c5-60c7,60cb,60d1,60d5,60d8,60da,60dc,60df-60e1,60e6,60f0-60f1,60f3-60f4,60f6,60f9-60fb,6100-6101,6106,6108-6109,610d-610f,6112,6115,611a-611c,611f,6123,6127,6134,6137,613e-613f,6144,6147-6148,614b-614e,6155,6158,615a,615d,615f,6162-6163,6167-6168,616b,616e,6170,6175-6177,617c,617e,6182,618a,618e,6190-6191,6194,619a,61a4,61a7,61a9,61ab-61ac,61ae,61b2,61b6,61be,61c2,61c7-61cb,61cd,61e3,61e6,61f2,61f5-61f8,61fa,61fc,61fe-6200,6208,620a,620c-620e,6210-6212,6215-6216,621a-621b,621f,6221-6222,622a,622e,6230,6232-6234,6236,623e-6241,6247-6249,624b,624d-624e,6251-6254,6258,625b,6263,626d-626f,6273,6276,6279,627c,627e-6280,6284,6286,6289-628a,6291-6293,6295-6298,62a8,62ab-62ac,62b1,62b5,62b9,62bc-62bd,62bf,62c2,62c4,62c6-62c9,62cb-62ce,62d0,62d2-62d4,62d6-62dc,62ec-62ef,62f1,62f3-62f4,62f7,62fc-62ff,6301-6302,6307-6309,6311,6316,6328,632a-632b,632f,633a,633d-633e,6342,6346,6349,634c-6350,6355,6367-6369,636b,6371-6372,6376-6377,637a-637b,6380,6383-6384,6388-6389,638c,638f,6392,6396,6398-6399,639b,63a0-63a3,63a5,63a7-63aa,63ac,63c0,63c6,63c9,63cd,63cf-63d0,63d2,63d6,63da-63db,63e1,63e3,63e9-63ea,63ed-63ee,63f4,63f9,6406,640d,640f,6413-6414,6416-6417,641c,641e,642a,642c-642d,6434,6436,643d-643e,6451-6452,6454,6458,645f,6467,6469,646d,646f,6478-647b,6487-6488,6490,6492-6493,6495,6499-649a,649e,64a2,64a4-64a5,64a9,64ab-64ae,64b0,64b2-64b3,64bb-64bc,64be-64bf,64c1-64c2,64c4-64c5,64c7,64ca-64cb,64cd-64ce,64d2,64d4,64d8,64da,64e0,64e2,64e6,64ec-64ed,64f0-64f2,64f4,64f7,64fa-64fb,64fe,6500,6506,650f,6514,6518-6519,651c-651d,6523-6524,652a-652c,652f,6536,6538-6539,653b,653e-653f,6545,6548-6549,654f,6551,6554-6559,655d-655e,6562-6563,6566,656c,6572,6574-6575,6577-6578,6582-6583,6587,6590-6591,6595,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65ab-65ac,65af-65b0,65b7,65b9,65bc-65bd,65c1,65c5,65cb-65cc,65ce-65cf,65d6-65d7,65e2,65e5-65e6,65e8-65e9,65ec-65ed,65f1,65fa,6600,6602,6606-6607,660a,660c,660e-660f,6613-6615,661f-6620,6624-6625,6627-6628,662d,662f,6631,6641-6643,6645,6649,664c,664f,6652,665a,665d-665e,6664,6666,6668,666e-6670,6674,6676-6677,667a,667e,6684,6687-6689,668d,6691,6696-6698,669d,66a2,66a8,66ab,66ae,66b1,66b4,66b8-66b9,66c4,66c6-66c7,66c9,66d6,66d9,66dc-66dd,66e0,66e6,66e9,66ec,66f0,66f2-66f4,66f7-66f9,66fc,66fe-6700,6703,6708-6709,670b,670d,6714-6715,6717,671b,671d,671f,6726-6728,672a-672e,6731,6734-6735,673d,6746,6749,674e-6751,6753,6756-6757,675c,675e-6760,676a,676d,676f-6773,6775,6777,677c,677e-677f,6787,6789,678b,6790,6793,6795,6797,679a,679c-679d,67af-67b0,67b4,67b6,67b8,67c4,67cf-67d4,67d9-67da,67dd-67de,67e2,67e5,67e9,67ec,67ef,67f1,67f3-67f5,67ff,6813,6817-6818,6821,6829-682a,6838-6839,683c-683d,6840-6843,6845-6846,6848,684c,6850-6851,6853-6854,6876,687f,6881-6883,6885-6886,6893-6894,6897,689d,689f,68a1-68a2,68a7-68a8,68ad,68af-68b1,68b3,68b5,68c4,68c9,68cb,68cd,68d2,68d5,68d7-68d8,68da,68df-68e0,68e3,68e7,68ee,68f2,68f5,68f9-68fb,6905,690d-690e,6912,6930,694a,6953-6954,695a-695b,695d-695e,6960,6963,6968,696b,696d-696e,6975,6977,6979,6982,6986,6994-6995,699b-699c,69a3,69a6,69a8,69ab,69ad-69ae,69b4,69b7,69bb,69c1,69c3,69cb-69cd,69d0,69d3,69e8,69ed,69f3,69fd,6a01-6a02,6a05,6a0a,6a11,6a13,6a19,6a1e-6a1f,6a21,6a23,6a35,6a38-6a3a,6a3d,6a44,6a47-6a48,6a4b,6a58-6a59,6a5f,6a61-6a62,6a6b,6a7e,6a80,6a84,6a90,6a94,6a97,6a9c,6aa0,6aa2-6aa3,6aac,6aae-6aaf,6ab3,6ab8,6abb,6ac2-6ac3,6ad3,6ada-6adb,6add,6ae5,6aec,6afa-6afb,6b04,6b0a,6b10,6b16,6b20-6b21,6b23,6b32,6b3a,6b3d-6b3e,6b47,6b49,6b4c,6b4e,6b50,6b59,6b5c,6b5f,6b61-6b67,6b6a,6b72,6b77-6b79,6b7b,6b7f,6b83,6b86,6b89-6b8a,6b96,6b98,6ba4,6bae-6baf,6bb2,6bb5,6bb7,6bba,6bbc,6bbf-6bc0,6bc5-6bc6,6bcb,6bcd,6bcf,6bd2-6bd4,6bd7,6bda-6bdb,6beb-6bec,6bef,6bfd,6c05,6c08,6c0f-6c11,6c13,6c16,6c1b,6c1f,6c23-6c24,6c26-6c28,6c2b-6c2c,6c2e-6c2f,6c33-6c34,6c38,6c3e,6c40-6c42,6c4d-6c4e,6c50,6c55,6c57,6c59,6c5b,6c5d-6c61,6c68,6c6a,6c70,6c72,6c74,6c76,6c7a,6c7d-6c7e,6c81-6c83,6c85-6c86,6c88-6c89,6c8c-6c8d,6c90,6c92,6c94,6c96,6c98-6c99,6c9b,6cab-6cac,6cae,6cb1,6cb3,6cb8-6cb9,6cbb-6cbf,6cc1,6cc4-6cc5,6cc9-6cca,6ccc,6cd3,6cd5-6cd7,6cdb-6cdc,6ce0-6ce3,6ce5,6ce8,6cef-6cf1,6cf3,6cf5,6d0b-6d0c,6d0e,6d17,6d1b,6d1e,6d25,6d27,6d29-6d2b,6d2e,6d31-6d32,6d35-6d36,6d38-6d39,6d3b,6d3d-6d3e,6d41,6d59-6d5a,6d65-6d66,6d69-6d6a,6d6c,6d6e,6d74,6d77-6d79,6d85,6d87-6d8a,6d8c,6d8e,6d93-6d95,6daa,6dae-6daf,6db2,6db5,6db8,6dbc,6dbf,6dc4-6dc7,6dcb-6dcc,6dd1-6dd2,6dd8-6dda,6dde,6de1,6de4,6de6,6de8,6dea-6dec,6dee,6df1,6df3,6df5,6df7,6df9-6dfb,6e05,6e19-6e1b,6e1d,6e20-6e21,6e23-6e26,6e2c-6e2d,6e2f,6e32,6e34,6e38,6e3a,6e3e,6e43-6e44,6e4a,6e4d-6e4e,6e54,6e56,6e58,6e5b,6e5f,6e63,6e67,6e69,6e6e-6e6f,6e72,6e89,6e90,6e96,6e98,6e9c-6e9d,6ea2,6ea5,6ea7,6eaa-6eab,6eaf,6eb4,6eb6,6eba,6ebc,6ec2,6ec4-6ec5,6ec7,6ecb-6ecc,6ed1,6ed3-6ed5,6eec,6eef,6ef2,6ef4,6ef7,6efe-6eff,6f01-6f02,6f06,6f0f,6f13-6f15,6f20,6f22-6f23,6f29-6f2c,6f2f,6f31-6f33,6f38,6f3e-6f3f,6f51,6f54,6f58,6f5b,6f5f-6f60,6f64,6f66,6f6d-6f70,6f78,6f7a,6f7c,6f80,6f84,6f86,6f88,6f8e,6f97,6fa0-6fa1,6fa4,6fa6-6fa7,6fb1,6fb3-6fb4,6fb6,6fb9,6fc0-6fc3,6fd5,6fd8,6fdb,6fdf-6fe1,6fe4,6fe9,6feb-6fec,6fee-6ff1,6ffa,6ffe,7006,7009,700b,700f,7011,7015,7018,701a-701b,701d,701f,7028,7030,7032,703e,704c,7051,7058,705e,7063-7064,706b,7070,7076,7078,707c-707d,708a,708e,7092,7095,7099,70a4,70ab-70af,70b3,70b8,70ba,70c8,70ca,70cf,70d8-70d9,70e4,70ef,70f9,70fd,7109-710a,7119-711a,711c,7121,7126,7130,7136,7146,7149,714c,714e,7156,7159,715c,715e,7164-7169,716c,716e,717d,7184,718a,7192,7194,7199,719f,71a8,71ac,71b1,71b9,71be,71c3-71c4,71c8-71c9,71ce,71d0,71d2,71d5,71d9,71dc,71df-71e0,71e5-71e7,71ec-71ee,71f4,71f8,71fb-71fc,71fe,7206,720d,7210,721b,7228,722a,722c-722d,7230,7235-7236,7238-723b,723d-723e,7246-7248,724c,7252,7256,7258-7259,725b,725d,725f-7262,7267,7269,726f,7272,7274,7279,727d,7280-7281,7284,7292,7296,729b,72a2,72a7,72ac,72af,72c0,72c2,72c4,72ce,72d0,72d7,72d9,72e0-72e1,72e9,72f7-72f9,72fc-72fd,7313,7316,7319,731b-731c,7325,7329,7334,7336-7337,733e-733f,7344-7345,734e,7350,7357,7368,7370,7372,7375,7377-7378,737a-737b,7380,7384,7386-7387,7389,738b,7396,739f,73a5,73a8-73a9,73ab,73b2-73b3,73b7,73bb,73c0,73ca,73cd,73de,73e0,73ea,73ed-73ee,73fe,7403,7405-7406,7409-740a,740d,741b,7422,7425-7426,7428,742a,742f,7433-7436,743a,743f,7441,7455,7459-745c,745e-745f,7463-7464,7469-746a,746d,746f-7470,747e,7480,7483,748b,7498,749c,749e-749f,74a3,74a6-74a9,74b0,74bd,74bf,74ca,74cf,74d4,74d6,74da,74dc,74e0,74e2-74e4,74e6,74f6-74f7,7504,750c-750d,7515,7518,751a,751c,751f,7522,7525-7526,7528-7529,752b-752d,7530-7533,7537-7538,753d,754b-754c,754e-754f,7554,7559-755a,755c-755d,7562,7565-7566,756a-756b,7570,7576,7578,757f,7586-7587,758a-758b,758f,7591,7599-759a,759d,75a2-75a5,75ab,75b2-75b3,75b5,75b8-75b9,75bc-75be,75c2,75c5,75c7,75ca,75cd,75d4-75d5,75d8-75d9,75db,75de,75e0,75e2-75e3,75f0-75f4,75fa,75ff-7601,7609,760b,760d,7613,761f-7622,7624,7626-7627,7629,7634,7638,763a,7642,7646,764c,7652,7656,7658,765f,7661-7662,7665,7669,766c,766e,7671-7672,7678,767b-767e,7682,7684,7686-7688,768b,768e,7693,7696,769a,76ae,76b0,76b4,76ba,76bf,76c2-76c3,76c5-76c6,76c8,76ca,76cd-76ce,76d2,76d4,76db-76dc,76de-76df,76e1,76e3-76e5,76e7,76ea,76ee-76ef,76f2,76f4,76f8-76f9,76fc,76fe,7701,7707,7709,770b,771f-7720,7728-7729,7736-7738,773a,773c,773e,774f,775b-775c,775e,7761-7763,7765-7766,7768,776a-776c,7779,777d,777f,7784,7787,778b-778c,778e,7791,779e-77a0,77a5,77a7,77aa,77ac-77ad,77b0,77b3,77bb-77bd,77bf,77c7,77d3,77d7,77da-77dc,77e2-77e3,77e5,77e9,77ed-77ef,77f3,77fd,7802,780c-780d,7814,781d,781f-7820,7825,7827,782d,7830,7832,7834,7837-7838,7843,784e,785d,786b-786c,786f,787c,787f,7889,788c,788e,7891,7893,7897-7898,789f,78a3,78a7,78a9,78b0,78b3,78ba,78bc,78be,78c1,78c5,78ca-78cb,78d0,78d5,78da,78e7-78e8,78ec,78ef,78f4,78f7,78fa,7901,790e,7919,7926,792a-792c,793a,793e,7940-7941,7946-7949,7950,7955-7957,795a,795d-7960,7965,7968,796d,797a,797f,7981,798d-798f,79a6-79a7,79aa,79ae,79b1,79b3,79b9-79ba,79bd-79c1,79c8-79c9,79cb,79d1-79d2,79d8,79df,79e3-79e4,79e6-79e7,79e9,79fb,7a00,7a05,7a08,7a0b,7a0d,7a14,7a1a,7a1c,7a1e-7a20,7a2e,7a31,7a37,7a3b-7a3d,7a3f-7a40,7a46,7a4b-7a4e,7a57,7a60-7a62,7a69,7a6b,7a74,7a76,7a79-7a7a,7a7f,7a81,7a84,7a88,7a92,7a95-7a98,7a9f-7aa0,7aa9-7aaa,7aae-7aaf,7aba,7abf,7ac4-7ac5,7ac7,7aca-7acb,7ad9,7adf-7ae0,7ae3,7ae5,7aed,7aef,7af6,7af9-7afa,7afd,7aff,7b06,7b11,7b19,7b1b,7b1e,7b20,7b26,7b28,7b2c,7b2e,7b46,7b49,7b4b,7b4d,7b4f-7b52,7b54,7b56,7b60,7b67,7b6e,7b75,7b77,7b84,7b87,7b8b,7b8f,7b94-7b95,7b97,7b9d,7ba0-7ba1,7bad,7bb1,7bb4,7bb8,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9,7bcc,7bd9,7bdb,7be0-7be1,7be4,7be6,7be9,7bf7,7bfe,7c07,7c0c-7c0d,7c11,7c1e,7c21,7c23,7c27,7c2a-7c2b,7c37-7c38,7c3d-7c40,7c43,7c4c-7c4d,7c50,7c5f-7c60,7c63-7c65,7c6c,7c6e,7c73,7c7d,7c89,7c92,7c95,7c97,7c9f,7ca5,7cb1,7cb3,7cb5,7cb9,7cbd-7cbe,7cca,7cd5-7cd6,7cd9,7cdc-7ce0,7ce2,7ce7,7cef-7cf0,7cf8,7cfb,7cfe,7d00,7d02,7d04-7d07,7d09-7d0b,7d0d,7d10,7d14-7d15,7d17,7d19-7d1c,7d20-7d22,7d2b,7d2e-7d33,7d39,7d3c,7d40,7d42-7d44,7d46,7d50,7d55,7d5b,7d5e,7d61-7d62,7d66,7d68,7d6e,7d70-7d73,7d79,7d81,7d8f,7d91,7d93,7d9c,7d9e,7da0,7da2,7dac-7dad,7db0-7db2,7db4-7db5,7db8,7dba-7dbb,7dbd-7dbf,7dc7,7dca,7dd2,7dd8-7dda,7ddd-7dde,7de0,7de3,7de8-7de9,7dec,7def,7df2,7df4,7df9,7dfb,7e08-7e0a,7e10-7e11,7e1b,7e1d-7e1e,7e23,7e2b,7e2e-7e2f,7e31-7e32,7e34-7e35,7e37,7e39,7e3d-7e3f,7e41,7e43,7e45-7e46,7e48,7e52,7e54-7e55,7e59-7e5a,7e5e,7e61,7e69-7e6b,7e6d,7e73,7e79,7e7c-7e7d,7e82,7e8c,7e8f,7e93-7e94,7e96,7e9c,7f36,7f38,7f3a,7f3d,7f44,7f48,7f4c,7f50,7f54-7f55,7f5f,7f69-7f6a,7f6e,7f70,7f72,7f75,7f77,7f79,7f85,7f88,7f8a-7f8c,7f8e,7f94,7f9a,7f9e,7fa4,7fa8-7fa9,7faf,7fb2,7fb6,7fb8-7fb9,7fbc-7fbd,7fbf,7fc1,7fc5,7fcc,7fce,7fd2,7fd4-7fd5,7fdf-7fe1,7fe9,7fee,7ff0-7ff1,7ff3,7ff9,7ffb-7ffc,8000-8001,8003-8006,800b-800d,8010-8012,8015,8017-8019,801c,8026,8028,8033,8036,803d,803f,8046,804a,8052,8056,8058,805a,805e,806f-8073,8076-8077,807d-807f,8084-8087,8089,808b-808c,8093,8096,8098,809a-809b,809d,80a1-80a2,80a5,80a9-80ab,80af,80b1-80b2,80b4,80ba,80c3-80c4,80cc,80ce,80d6,80da-80db,80dd-80de,80e1,80e4-80e5,80ed,80ef-80f1,80f3-80f4,80f8,80fc-80fd,8102,8105-8106,8108,810a,8116,8123-8124,8129,812b,812f-8130,8139,813e,8146,814b-814c,814e,8150-8151,8153-8155,8165-8166,816b,816e,8170-8171,8173-8174,8178-817a,817f-8180,8182,8188,818a,818f,8198,819a-819d,81a0,81a8-81a9,81b3,81ba,81bd-81c0,81c2-81c3,81c6,81c9,81cd,81cf,81d8,81da,81df,81e2-81e3,81e5,81e7-81e8,81ea,81ec-81ed,81f3-81f4,81fa-81fc,81fe,8200,8202,8205,8207-820a,820c-820d,8210,8212,8214,821b-821c,821e-821f,8222,8228,822a-822c,8235-8237,8239,8247,824b,8258-8259,8266,826e-826f,8271-8272,8277,827e,828b,828d,8292,8299,829d,829f,82a3,82a5,82ac-82ad,82af-82b1,82b3,82b7-82b9,82bb,82bd-82be,82d1-82d4,82d7,82db-82dc,82de-82df,82e3,82e5-82e7,82ef,82f1,8301-8306,8309,8317,8328,832b,8331-8332,8334-8336,8338-8339,8340,8343,8349-834a,834f-8350,8352,8354,8377-8378,837b-837c,8386,8389-838a,838e,8392-8393,8396,8398,839e,83a0,83a2,83a7,83ab,83bd,83c1,83c5,83ca,83cc,83d4,83dc,83df-83e0,83e9,83ef-83f2,83f4,83f8,83fd,8403-8404,8407,840a-840e,842c,8431,8435,8438,843c-843d,8446,8449,8457,845b,8461,8463,8466,8469,846b-846d,8475,8477,8482,8490,8499,849c,849e,84b2,84b8,84bc,84bf-84c0,84c4,84c6,84c9-84cb,84d1,84d3,84ec,84ee,84ff,8506,8511,8513-8514,8517,851a,8521,8523,8525,852c-852d,853d,8543,8548-854a,8559,855e,8568-856a,856d,857e,8584,8587,858a,8591,8594,859b-859c,85a6,85a8-85aa,85af-85b0,85b9-85ba,85c9,85cd,85cf-85d0,85d5,85dd,85e4-85e5,85e9-85ea,85f7,85f9-85fb,8606-8607,860a-860b,8611,8617,861a,862d,8638,863f,864e,8650,8654-8655,865b-865c,865e-865f,8667,866b,8671,8679-867b,868a,868c,8693,869c,86a3-86a4,86a9-86aa,86af,86b1,86b5-86b6,86c0,86c4,86c6-86c7,86c9,86cb,86d0,86d4,86d9,86db,86de-86df,86e4,86ed,86f9,86fb,86fe,8700,8702-8703,8706-8708,870a,8713,8718,871c,8722,8725,8729,8734,8737,873b,873f,874c,8753,8755,8757,8759,8760,8766,8768,8774,8776,8778,8782-8783,878d,879e-879f,87a2,87ab,87b3,87ba-87bb,87c0,87c6,87c8,87cb,87d1-87d2,87e0,87ec,87ef,87f2,87f9,87fb,87fe,8805,880d,8814-8815,881f,8821-8823,8831,8836,8839,883b,8840,884c-884d,8853,8857,8859,885b,885d,8861-8863,8868,886b,8870,8877,8879,887d,8881-8882,8888,888b,888d,8892,8896,889e,88ab,88b1,88c1-88c2,88ca,88d2,88d4-88d5,88d8-88d9,88dc-88dd,88df,88e1,88e8,88ef,88f3-88f4,88f8-88f9,88fd,8902,8907,890a,8910,8912-8913,8915,891a,8921,8925,892a-892b,8932,8936,8938,893b,893d,8944,8956,895e-8960,8964,896a,896c,896f,8972,897f,8981,8983,8986,898b,898f,8993,8996,899c,89a6,89aa,89ac,89b2,89ba,89bd,89c0,89d2,89d4,89e3,89f4,89f8,89fc,8a00,8a02-8a03,8a08,8a0a,8a0c,8a0e-8a11,8a13,8a15-8a18,8a1b,8a1d,8a1f,8a22-8a23,8a25,8a2a,8a2d,8a31,8a34,8a36,8a3a-8a3c,8a3e,8a41,8a46,8a50,8a54-8a56,8a5b,8a5e,8a60,8a62-8a63,8a66,8a68-8a69,8a6b-8a6e,8a70-8a73,8a79,8a7b-8a7c,8a85,8a87,8a8c-8a8d,8a91,8a93,8a95,8a98,8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aaa,8ab0,8ab2,8ab6,8ab9,8abc,8abf,8ac2,8ac4,8ac7,8ac9,8acb,8acd,8ad2,8ad6,8adb-8adc,8ae6-8ae7,8aeb,8aed-8aee,8af1,8af3,8af6-8af8,8afa,8afc,8afe,8b00-8b02,8b04,8b0a,8b0e,8b10,8b17,8b19,8b1b,8b1d,8b20,8b28,8b2b-8b2c,8b39,8b41,8b46,8b49,8b4e-8b4f,8b58-8b5a,8b5c,8b5f,8b66,8b6b-8b6c,8b6f-8b70,8b74,8b77,8b7d,8b80,8b8a,8b92-8b93,8b96,8b9a,8b9c,8c37,8c3f,8c41,8c46,8c48-8c49,8c4c,8c4e,8c50,8c54-8c55,8c5a,8c61-8c62,8c6a-8c6d,8c73,8c79-8c7a,8c82,8c89-8c8a,8c8c-8c8d,8c93,8c9d-8c9e,8ca0-8ca2,8ca7-8cac,8caf,8cb2-8cb4,8cb6-8cb8,8cbb-8cbd,8cbf-8cc5,8cc7-8cc8,8cca,8cd1-8cd3,8cdc,8cde,8ce0-8ce4,8ce6,8cea,8cec-8ced,8cf4,8cf8,8cfa-8cfd,8d05,8d08,8d0a,8d0d,8d0f,8d13,8d16-8d17,8d1b,8d64,8d66-8d67,8d6b,8d6d,8d70,8d73-8d74,8d77,8d81,8d85,8d8a,8d95,8d99,8d9f,8da3,8da8,8db3-8db4,8dba,8dbe,8dc6,8dcb-8dcc,8dce,8dd1,8dda-8ddb,8ddd,8ddf,8de1,8de4,8de6,8de8,8dea,8def,8df3,8dfa,8dfc,8e0f-8e10,8e1d-8e1f,8e21-8e22,8e29,8e2b,8e31,8e34-8e35,8e39,8e42,8e44,8e48-8e4b,8e55,8e59,8e5f,8e63-8e64,8e66,8e6c,8e72,8e74,8e76,8e7a,8e7c,8e81-8e82,8e85,8e87,8e89-8e8b,8e8d,8e91,8e93,8ea1,8eaa-8eac,8eb2,8eba,8ec0,8eca-8ecd,8ecf,8ed2,8ed4,8edb,8edf,8ef8,8efb-8efc,8efe,8f03,8f09-8f0a,8f12-8f15,8f1b-8f1f,8f25-8f26,8f29-8f2a,8f2f,8f33,8f38,8f3b,8f3e-8f3f,8f42,8f44-8f45,8f49,8f4d-8f4e,8f54,8f5f,8f61,8f9b-8f9c,8f9f,8fa3,8fa6,8fa8,8fad-8fb2,8fc2,8fc4-8fc6,8fce,8fd1,8fd4,8fe2,8fe4-8fe6,8fe8,8fea-8feb,8fed,8ff0,8ff4,8ff7-8ff8,8ffa,8ffd,9000-9001,9003,9005-9006,900d,900f-9010,9014-9017,9019-901b,901d-9020,9022-9023,902e,9031-9032,9035-9036,9038,903c,903e,9041-9042,9047,904a-904b,904d-9051,9053-9055,9058-9059,905b-905e,9060,9062-9063,9068-9069,906d-906e,9072,9074-9075,9077-9078,907a,907c-907d,907f-9084,9087-9088,908a-908b,908f-9091,9095,90a2-90a3,90a6,90aa,90b1,90b5-90b6,90b8,90c1,90c3,90ca,90ce,90dd,90e1-90e2,90e8,90ed,90f5,90fd-90fe,9102,9109,9112,9117-9119,911e,9127,912d,9130-9131,9134,9139,9148-914d,9152,9157,9163,9165,9169-916a,916c,9174-9175,9177-9178,9183,9187,9189,918b,9192,919c,919e,91a3,91ab-91ac,91ae,91b1,91b4,91ba,91c0-91c1,91c5-91c7,91c9,91cb-91d1,91d7-91d9,91dc-91dd,91e3,91e6-91e7,91e9,91ed,91f5,9207,9209,920d,9210-9211,9214-9215,921e,9223,9234,9237-9239,923d-9240,9245,9249,924b,924d,9251,9257,925a-925b,9264,9278,927b-927c,9280,9285,9291,9293,9296,9298,929c,92a8,92ac,92b2-92b3,92b7,92bb-92bc,92c1,92c5,92c7,92d2,92e4,92ea,92f0,92f8,92fc,9304,9310,9315,9318-931a,9320-9322,9326,9328,932b,932e-932f,9333,9336,934a-934b,934d,9354,935a-935b,9365,936c,9370,9375,937e,9382,938a,9394,9396-9398,939a,93a2,93ac,93ae,93b0,93b3,93c3,93c8,93cd,93d1,93d6-93d8,93dc-93dd,93df,93e1-93e2,93e4,93e8,93fd,9403,9418,942b,942e,9432-9433,9435,9438,943a,9444,9451-9452,9460,9463-9464,946a,9470,9472,9477,947c-947f,9577,9580,9582-9583,9589,958b,958e-958f,9591-9594,9598,95a1,95a3-95a5,95a8-95a9,95ad,95b1,95bb,95c6,95c8,95ca-95cc,95d0,95d4-95d6,95dc,95e1-95e2,961c,9621,962a,962c,962e,9631-9632,963b,963f-9640,9642,9644,964b-964d,9650,9658,965b,965d-965e,9661-9664,966a,966c,9670,9672-9678,967d,9684-9686,968a-968b,968d-968e,9694-9695,9698-9699,969b-969c,96a7-96a8,96aa,96b1,96b4,96b8-96b9,96bb,96c0-96c1,96c4-96c7,96c9-96cd,96d2,96d5-96d6,96d9,96db-96dc,96de,96e2-96e3,96e8-96ea,96ef,96f2,96f6-96f7,96f9,96fb,9700,9704,9706-9707,9709,970d-970f,9711,9713,9716,971c,971e,9724,9727,972a,9730,9732,9738-9739,973d-973e,9742,9744,9748,9752,9756,975b-975c,975e,9760-9762,9766,9768-9769,9774,9776,977c,9785,978b,978d,978f,9798,97a0,97a3,97a6,97ad,97c1,97c3,97c6,97c9,97cb-97cc,97d3,97dc,97ed,97f3,97f6,97f9,97fb,97ff,9801-9803,9805-9806,9808,980a,980c,9810-9813,9817-9818,981c,9821,9824,982b,982d,9830,9837-9839,983b,9846,984c-984f,9853,9858,985b,985e,9865,9867,986b,986f-9871,98a8,98af,98b1,98b3,98b6,98ba,98bc,98c4,98db,98df,98e2,98e7,98e9-98ea,98ed,98ef,98f2,98f4,98fc-98fe,9903,9905,9909-990a,990c,9910,9912-9913,9918,991a-991b,991e,9921,9928,992e,9935,993d-993f,9945,9949,9951-9952,9955,9957,995c,995e,9996,9999,99a5,99a8,99ac-99ae,99b1,99b3-99b4,99c1,99d0-99d2,99d5,99d9,99db,99dd,99df,99e2,99ed,99f1,99ff,9a01,9a0e,9a16,9a19,9a2b,9a30,9a35,9a37,9a3e,9a40,9a43,9a45,9a4d,9a55,9a57,9a5a-9a5b,9a5f,9a62,9a65,9a6a,9aa8,9aaf-9ab0,9ab7-9ab8,9abc,9ac1,9acf,9ad1-9ad4,9ad6,9ad8,9ae1,9ae6,9aed-9aef,9afb,9b03,9b06,9b0d,9b1a,9b22-9b23,9b25,9b27-9b28,9b31-9b32,9b3c,9b41-9b42,9b44-9b45,9b4d-9b4f,9b51,9b54,9b58,9b5a,9b6f,9b77,9b91,9baa-9bab,9bad-9bae,9bc0,9bc8-9bca,9bd6,9bdb,9be7-9be8,9bfd,9c0d,9c13,9c25,9c2d,9c31,9c3b,9c3e,9c49,9c54,9c56-9c57,9c5f,9c77-9c78,9ce5,9ce9,9cf3-9cf4,9cf6,9d03,9d06,9d09,9d12,9d15,9d1b,9d23,9d26,9d28,9d3b,9d3f,9d51,9d5d,9d60-9d61,9d6a,9d6c,9d72,9d89,9daf,9db4,9db8,9dc2,9dd3,9dd7,9de5,9df9-9dfa,9e1a-9e1b,9e1e,9e75,9e79,9e7c-9e7d,9e7f,9e82,9e8b,9e92-9e93,9e97,9e9d,9e9f,9ea5,9ea9,9eb4-9eb5,9ebb-9ebc,9ebe,9ec3,9ecc-9ecf,9ed1,9ed4,9ed8,9edb-9ede,9ee0,9ee8,9eef,9ef4,9ef7,9f07,9f0e,9f13,9f15,9f19,9f20,9f2c,9f2f,9f34,9f3b,9f3e,9f4a-9f4b,9f52,9f5c,9f5f,9f61,9f63,9f66-9f67,9f6a,9f6c,9f72,9f77,9f8d,9f90,9f94,9f9c,2010-201e,2024-2026,fe30-fe6b,ff01-ff5e,25cb,0028-0029,ffe5 -Traditional Chinese (All):0000-007f,00a7,00a8,00c0-00c1,00c8-00ca,00d2-00d3,00e0-00e1,00e8-00ea,00ec-00ed,00f2-00f3,00f8-00fa,00fc,0100-0101,0112-0113,011a-011b,012b,014b-014d,0153,016b,01cd-01ce,01d0-01d2,01d4,01d6,01d8,01da,01dc,0250-0251,0254,025b,0261,026a,0275,0283,028a,02c6,0401,0410-044f,0451,1ebe-1ec1,2116,2121,2170-2179,21b8-21b9,21e7,2460-2469,2474-247d,2550-2570,273d,2e80,2e84,2e86-2e88,2e8a,2e8c-2e8d,2e95,2e9c-2e9d,2ea5,2ea7,2eaa,2eac,2eae,2eb6,2ebc,2ebe,2ec6,2eca,2ecc-2ecd,2ecf,2ed6-2ed7,2ede,2ee3,2f33,3005-3007,3041-3093,309b-309e,30a1-30f6,30fc-30fe,3231,3435,3440,344c,3464,3473,347a,347d-347e,3493,3496,34a5,34af,34bc,34c1,34c8,34df,34e4,34fb,3506,353e,3551,3553,3559,3561,356d,3570,3572,3577-3578,3584,3597-3598,35a1,35a5,35ad,35bf,35c1,35c5,35c7,35ca,35ce,35d2,35d6,35db,35dd,35f1-35f3,35fb,35fe,3609,3618,361a,3623,362d,3635,3639,363e,3647-3649,364e,365f,367a,3681,369a,36a5,36aa,36ac,36b0-36b1,36b5,36b9,36bc,36c1,36c3-36c5,36c7-36c8,36d3-36d4,36d6,36dd,36e1-36e2,36e5-36e6,36f5,3701,3703,3708,370a,370d,371c,3722-3723,3725,372c-372d,3730,3732-3733,373a,3740,3743,3762,376f,3797,37a0,37b9,37be,37f2,37f8,37fb,380f,3819,3820,382d,3836,3838,3863,38a0,38c3,38cc,38d1,38fa,3908,3914,3927,3932,393f,394d,3963,3980,3989-398a,3992,3999,399b,39a1,39a4,39b8,39dc,39e2,39e5,39ec,39f8,39fb,39fe,3a01,3a03,3a06,3a17-3a18,3a29-3a2a,3a34,3a4b,3a52,3a57,3a5c,3a5e,3a66-3a67,3a97,3aab,3abd,3ade,3ae0,3af0,3af2,3afb,3b0e,3b19,3b22,3b2b,3b39,3b42,3b58,3b60,3b71-3b72,3b7b-3b7c,3b80,3b96,3b99,3ba1,3bbc,3bbe,3bc2,3bc4,3bd7,3bdd,3bec,3bf2-3bf4,3c0d,3c11,3c15,3c18,3c54,3c8b,3ccb,3ccd,3cd1,3cd6,3cdc,3ceb,3cef,3d13,3d1d,3d32,3d3b,3d46,3d4c,3d4e,3d51,3d5f,3d62,3d69-3d6a,3d6f,3d75,3d7d,3d85,3d8a,3d8f,3d91,3da5,3dad,3db4,3dbf,3dc6-3dc7,3dc9,3dcc-3dcd,3dd3,3ddb,3de7-3de8,3deb,3df3,3df7,3dfc-3dfd,3e06,3e40,3e43,3e48,3e55,3e74,3ea8-3eaa,3ead,3eb1,3eb8,3ebf,3ec2,3ec7,3eca,3ecc,3ed0-3ed1,3ed6-3ed7,3eda-3edb,3ede,3ee1-3ee2,3ee7,3ee9,3eeb,3ef0,3ef3-3ef4,3efa,3efc,3eff-3f00,3f04,3f06,3f0e,3f53,3f58-3f59,3f63,3f7c,3f93,3fc0,3fd7,3fdc,3fe5,3fed,3ff9-3ffa,4004,4009,401d,4039,4045,4053,4057,4062,4065,406a,406f,4071,40a8,40bb,40bf,40c8,40d8,40df,40fa,4103-4104,4109,410e,4132,4167,416c,416e,417f,4190,41b2,41c4,41ca,41cf,41db,41ef,41f9,4211,4223,4240,4260,426a,4276,427a,428c,4294,42a2,42b5,42b9,42bc,42f4,42fb-42fc,432b,436e,4397,43ba,43c1,43d9,43df,43ed,43f2,4401-4402,4413,4425,442d,447a,448f,449f-44a0,44a2,44b0,44b7,44c0,44c5,44ce,44dd,44df,44e4,44e9-44ec,44f4,4503-4504,4509,450b,4516,451d,4527,452e,4533,453b,453d,453f,4543,4551-4552,4555,455c,4562,456a,4577,4585,45e9,4606,460f,4615,4617,465b,467a,4680,46cf-46d0,46f5,4713,4718,474e,477c,4798,47a6,47b6,47d5,47ed,47f4,4800,480b,4837,485d,4871,489b,48ad-48ae,48d0,48dd,48ed,48f3,48fa,4906,4911,491e,4925,492a,492d,4935,493c,493e,4945,4951,4953,4965,496a,4972,4989,49a1,49a7,49df,49e5,49e7,4a0f,4a1d,4a24,4a35,4a96,4ab4,4ab8,4ad1,4ae4,4aff,4b10,4b19,4b20,4b2c,4b37,4b6f-4b70,4b72,4b7b,4b7e,4b8e,4b90,4b93,4b96-4b97,4b9d,4bbd-4bbe,4bc0,4c04,4c07,4c0e,4c3b,4c3e,4c5b,4c6d,4c7d,4c81,4ca4,4cae,4cb0,4cb7,4ccd,4ce1,4ced,4d09,4d10,4d34,4d91,4d9c,4e04,4e1a,4e1c,4e21,4e24,4e28,4e2a,4e2c,4e2f,4e36-4e37,4e3d,4e3f,4e49,4e5a-4e5b,4e6a,4e78,4e80-4e81,4e85,4e87,4e89,4e98,4e9a,4ea0,4ea3,4eb7,4ebb-4ebc,4ebf,4ece,4eea-4eeb,4eee,4ef8,4f03,4f17,4f1a,4f28-4f29,4f32,4f37,4f39,4f42,4f45,4f4b,4f72,4f8a,4fa2,4fa8,4fab,4fb0,4fbd,4fc8,4fcc,4fe4-4fe5,4ff0,4ff2,4ff9,4ffd,5003,5008,502e,5034,503b,5056,5058,5066,506c,5081,5088,5090,50a6,50bc,50cd,50d0,50d9,50df,50e1,50f4,50fc,5101,510d-510e,512b,5156,5160,516a,5174,5179,5182,5186,5188,5196,519a,519c,51a7-51a8,51ab,51ae,51b2-51b5,51b8,51c3,51c7,51c9,51cf,51d1-51d3,51db,51df,51e2,51e4,51ed,51f4,51fc,51fe,5202,5205,520b,521f-5220,5226-5227,5234,523c,5257,5259,5260,5268,5273,5279,528f-5290,5294,529a,52a1,52a4,52a8,52b5,52b9,52c5,52cc,52d0-52d1,52e0-52e1,52f9,5301,5324,5327,532c,5332-5333,5338,533b,5342,534e,535d,535f,5364,5367,5369,536d,5374,537d-537e,5393,53a0,53a2,53a6,53a8-53ab,53ae,53b0,53b6,53c1-53c2,53c5,53cc,53d0-53d2,53d8-53da,53e0,53f6-53f7,53fe,5413-5414,5416,541a,5421,5423,542f,5432,5434,544b,544d,5469-546a,546d,5485,548f,5493-5494,5497,549c,549e,54a3-54a4,54b2,54b4,54b9,54cb-54cd,54d0,54da,54e3,54ef,5502,550d,5513,5518,551e,5523,5525,5528,552b,553f,5547,5549,5553,555d,5569,556b,5571-5573,5579,5586,5590,55a9,55b0,55b4,55b9-55ba,55bc,55c1,55d7-55d8,55de,55ea,55ec,55f0-55f1,55f5,55fb,5605,5611,561e,5620-5623,5625,562d,5637,5643,564d,564f-5650,5652,5654,565d,5661,567a-567c,5689-568b,5692,569e-569f,56a1,56a4,56af,56b1,56b9,56bf,56d6,56e2,56ed,56ef,56f1,56fd,5700,5715,571d,5732,573d,573f,5742-5743,5746,5754,5757,575b,575f,5767,577a,577e-577f,5788,578a,578d,5790,579c,57a1,57a7,57aa,57b4,57bb,57be,57c4,57c8,57d7,57dd-57de,57e6,57ef,57fe,5803,5812,5822,5826,583a,5840,5844,5847,585c,585f,5869,586c,5872-5873,5892,5899-589a,58a7,58aa,58b0,58b5-58b6,58bb,58cb,58d0,58dc,58e0,58f0,58f2-58f3,58fb,5902,5904-5905,5907,590a,5911,591f,5932,5934,5965,5975,5989,5994,599a,599f,59ac,59b0,59b7-59b8,59c4,59c9,59d9,59eb,59ef-59f0,59f8-59f9,5a02,5a0b,5a0d,5a12,5a1a,5a21,5a24,5a27,5a2a-5a2c,5a3d,5a45,5a54,5a59,5a61,5a63,5a68,5a6b,5a6e,5a71,5a79,5a7e,5a81-5a82,5a86,5a88,5a91,5a96,5a99,5aa0-5aa1,5aab,5ac3,5ace-5acf,5ad3,5ae4,5af0,5af2,5afa,5afe,5b0d,5b11,5b15,5b1f,5b2b,5b41,5b44,5b46,5b4a,5b4f,5b66,5b68,5b6d,5b74,5b76,5b7c,5b80,5b82,5b90,5b96,5b9d-5b9f,5baa,5bc3,5bd5,5bd7,5bf3,5bff,5c05,5c13-5c14,5c1c,5c1e,5c20,5c23,5c49-5c4a,5c53,5c5e,5c85,5c99-5c9a,5c9c,5c9e,5cba,5cc1-5cc2,5cd1,5ce5,5ce9,5cef,5cf5,5d10,5d15,5d18,5d2c,5d2f,5d3e,5d46,5d48,5d56-5d57,5d5b,5d70,5d74,5d7b,5d85,5d8b,5d8e,5da4,5dab,5db6,5db9,5dc1,5dd7,5ddb,5df5,5e09,5e0b,5e12,5e2e,5e42,5e48,5e5e,5e7a,5e7f,5e83,5e86,5e92,5e99,5ebd,5ecd,5ed0,5ef4,5ef8-5ef9,5efb-5efc,5f0c-5f0e,5f25,5f3a,5f4d,5f50-5f51,5f5c,5f61,5f63,5f72,5f7b,5f83,5fa4,5fa7,5fb1,5fba,5fc2,5fc4,5fdb,5fdf,6023,6031,603b,604a,6052,6075,6077,607e,609e,60a4,60a7,60b3,60d7,60de,60e3,60e7-60e9,60fd,6107,610c,6119,6122,6130,613d,6142,6150,6159,615c,6160,6164,616f,617d,6181,6187,6195,6198-6199,619c,61b7,61b9,61c0,61cf-61d0,61d3,61da,61e2,622c,6237,6239,624c,6268,6282,6285,6290,629d,62a4,62a6,62c3,62c5,62d5,62df,62e5,6318,632e,6331,6335,6337,6364,636c,6379,637f,638b,63b9,63c1,63d1,63de,63e2,63e6,63f8,63fb-63fc,63fe,6407,6432,6438,643a-643b,645a,6471,647c,648d,6491,64af,64b4,64b6,64c0,64d3,64dd,64e1,64e5,64e7,64ea,650a,6511,651e-651f,6530,6534-6535,654d,655f,656b,656d,6585-6586,6588-6589,658b,65b5,65be,65d1,65d4,65e0,65e3,65ff,6618,661e,6623,6630,6644,6648,664b,6653,6657,6663,6667,666b,6673,667d,6685,668e,6692,669a,66a4,66ad,66b3,66b6,66bf,66cd-66ce,66f1,6702,670c,670e,6716,6719,671e,6725,6736,6744,6761-6762,6767,676b,678f,67a0,67a4,67ac,67b1,67bf,67d6-67d7,67f9,67fe,6800-6804,680d,6810,681b,681e,6822,6836-6837,683e,6847,684a,6855-6856,685d,6865,6884,6888,6898,68a6,68b6,68b9,68bd,68c3,68c5,68ca,6900-6903,6909,6918-691b,692c,6936,693e,6943,6946,6955,6961,6964,6967,6972-6973,6980,6985,698a,6998,699f,69a2,69b2,69c0,69d1,69d5-69d6,69e1,69e9,69f9-69fa,6a03,6a0b-6a0c,6a1a,6a1c,6a2b-6a2d,6a33,6a43,6a45,6a4c,6a52-6a53,6a57,6a63,6a65,6a71,6a74,6a7a,6a82,6a8a,6a8f,6a99,6a9d,6aa7,6aab,6ab1-6ab2,6ab5,6abe,6ac8-6aca,6ad4,6ad8,6af6,6b05,6b1d,6b35,6b52,6b57,6b6f,6b74,6b7a,6b81,6bc1,6bdc,6be1,6bea,6bfa,6c1c,6c31,6c35,6c37,6c39-6c3a,6c3d,6c49,6c58,6c5a,6c6e,6c75,6c79,6c7f,6c9f,6ca2,6caa,6caf,6cb2,6ccb,6cce,6cdf,6cea,6cff,6d02,6d05-6d06,6d24,6d26,6d4e,6d57,6d5b-6d5c,6d71-6d72,6d81,6d8f,6d96,6da4-6da5,6db1,6db9,6dfe,6e02,6e04,6e0a,6e0f,6e15,6e18,6e29-6e2a,6e4f-6e50,6e59,6e76,6e7c,6e86,6e8b,6e9a,6eb5,6eb8,6ebb,6ed9-6edb,6edd,6ee2,6ee8-6ee9,6efa,6f04,6f0b-6f0c,6f16-6f17,6f24,6f34,6f3d,6f44,6f56,6f5c,6f74,6f79,6f81,6f8a,6f9d,6f9f,6fb5,6fbb,6fbe,6fd3,6fd9-6fda,6ff6,6ff8,7003,701e,702c,704b,704d,7050,7054,705c,7067,706c,706f,7075,7077,7079,707e-707f,7081,7089,708b,708f,70a0,70a3,70a5-70a7,70b9,70bb-70bd,70c0,70c4,70cc,70d0,70d5-70d6,70df,70f1,70f5,70fe,7105,711d,7129,712b-712c,7133-7135,713b,713e,7140,7145,714a,714f,7151,716b,7171,7173,7175-7177,717a,717c,717e,7188,718c,718e,7191,7196,7198,71a2-71a3,71ad,71b4,71b7,71ba,71d1,71dd,71eb,71f5-71f6,7200,7209,720e-720f,7215-7217,7224,722b,722e,7240,7250,7255,7257,725c,7266,7282,7287,728f,7294,729f,72ad,72b2,72cd,72e2,7302,7304,7310,7328,732a-732c,732e,7338-7339,7341,7348,734f,7371,7374,738c,738f,7398,739c,739e,73a7,73aa,73ba,73c9,73ce-73d0,73d5,73e1-73e2,73e4,73e6,73ef,73f3,73f7,73f9,73fb,7402,7411-7412,7414-7415,7417,7419,741c,741e-741f,7437-7439,743c,7443,7445,7447-7449,7453,7456,745d,7460,7465,7468,746b-746c,7474,7476,747a,7482,748c-748d,7499,749b,74a4,74b4,74b9,74c8,74cc,74d0,74d3,74e7,74f0-74f2,74f8,7505,750e,7519,751e,7534-7535,753b,7542,7546,754a,754d,7551,7553,7555,7560,7567,756d-756e,7572,757a,7583,758d-758e,7592,759e,75b1,75b4,75c3,75c8,75dc,7602,7607,762c,763b,7640,764d-764f,7651,7654,7666-7667,766f,7673-7674,7676,767a,7690,76a1,76a5,76b7,76cc,76d6,76d9,770c,770e-770f,771e,7724,7726,772b,7740,7743,7758,7772,7777-7778,777a-777b,7793,7798,77af,77b9,77be,77c3,77c5,77cb,77dd,77e6,77f4,77fe,7808,7818,781c,781e,7839,783c-783d,7842,7844,7847,784b,7851,7853-7854,7866,787a,7881,7888,788d,78af,78b1,78b6,78b8-78b9,78c7,78d2-78d3,78d7-78d8,78e4,78ee,78f0-78f1,78f5,7906,792e,7932-7934,7936,793b-793c,7958-7959,7962,7971,797e,7980,7983,7986-7987,7991,7999,799d,799f,79a5,79a9,79c4,79c6,79cc,79d4,79e2,79f1,79f4,7a06,7a2a,7a2d,7a3a,7a3e,7a43,7a45,7a49,7a65,7a7d,7a83,7a91,7a93,7ab0,7abb-7abc,7ac2-7ac3,7ac8-7ac9,7acf,7ad3,7ada-7add,7ae2,7ae7,7ae9-7aea,7afe,7b0b-7b0c,7b14,7b1f,7b27,7b29,7b39,7b42-7b43,7b55,7b62,7b6c,7b6f,7b7b,7b92,7ba2-7ba3,7bb2,7bcf-7bd0,7bec,7bfa,7bfc,7c12,7c15,7c1b,7c35,7c42,7c44,7c51,7c56,7c5d,7c6d,7c70,7c74,7c7b-7c7c,7c7e,7c83,7c86,7c8e,7c9c,7ca6-7ca7,7cac,7cae,7cb8,7cc2-7cc3,7cc7,7cc9,7ccd,7cd3,7cda,7ce6,7ced,7cf3,7cf5,7cf9,7cfc,7d25,7d4d,7d5a,7d5d,7d89,7d8b,7d97,7da4,7da8,7dab,7db3,7dcd,7dcf-7dd0,7dd3-7dd4,7ddc,7de4-7de5,7df5,7dfd-7dfe,7e07,7e27,7e5b,7e65,7e67,7e6c,7e6e,7e7f,7e8e,7e92,7e9f,7ea4,7eac,7eba,7ec7,7ecf,7edf,7f06,7f37,7f40-7f41,7f47,7f49,7f4e,7f52-7f53,7f71,7f78,7f8f,7f93,7f97,7fa3,7fae,7fb4,7fdd,7fe7,7ffa,8002,8008,801d,8020,8025,802e-802f,8031,803b-803c,8054,805b,8061-8063,8066,8080,809f,80a7,80b6-80b7,80bc-80bd,80c6,80e9,80ec,80f6,8103,8107,8109,810c,810e,8112,8114,8117,811a,812a,8132,8134,8137,8142,8148,8156,8159-815a,816d,817c,8184,8193,81a5,81aa,81b6,81c1,81c8,81e4,81ef,81f6,8218,821a,8226,8229,822d,823e,8254,8262,8265,8276,8279-827b,8287,82a6,82aa,82bf,82c4,82ca,82cf-82d0,82d8,82e2,82ee,82f7-82f8,82fc-82fd,82ff,830b,8318,831a,831d,833d,8357,8362-8363,8366,836f,8385,8391,839c,83ac,83b9,83be,83cd,83d3,83ed,8405,8414,8416,8418,841c,8420-8421,8424,8426,842e,843e,8448,844a,8453,8455,8458,845c,8462,8464,8471-8472,847f-8480,8488,8492-8493,8496,84a3,84ad,84bd-84be,84da,84de,84e1-84e2,84e4-84e5,84f8,8503,8505,8510,8533-8534,8538,8542,854b-854c,8552,855a,855f,856f-8570,8573,8597,85c1,85d6,85e0,85ee,85fc,8602,860d,860f-8610,8614,8616,8628,862f,8642,8645,866c,8672,867e,8692,86a0,86ad,86b2,86ef,8770-8771,877d,8786,878b-878c,87a5,87a9,87b1,87c1,87ce,87d6,87da,87ee,87f5,8804,880f,8818,8827,882d,8842,8845-8846,884f,885e,8860,8864-8865,886e,8884,8887,888f-8890,889c,88a0,88ae,88b4-88b5,88bf,88c5,88c7,88cf,88e6,88f5,88ff-8900,8924,8943,8947,894d,8954,8965,8977,8980,8987,8989-898a,8991,8994,89a5,89a7,89a9,89bc,89c1,89c6,89e7,8a1c,8a29,8a2b,8a38,8a3d,8a49,8a67,8a7e,8a90,8a94,8a9c,8aa9,8aaf,8ab4,8ada,8aea,8b0c,8b1f,8b2d,8b3f,8b43,8b4c-8b4d,8b5e,8b62,8b69,8b81,8b83,8b90,8b9b,8ba0,8bbe,8be2,8c51,8c9b,8c9f,8cad,8ccd,8cd4,8cd6,8cdb,8ce9,8ceb,8cf2,8cf7,8d03,8d0b-8d0c,8d11-8d12,8d18,8d1c-8d1d,8d7a,8d82,8da6,8da9,8dc0,8dc3,8dd4,8e01,8e0e,8e28,8e2a,8e2d,8e3a,8e46,8e4f,8e68,8e71,8e75,8e77,8e7e,8e80,8ea7,8ead,8eb0,8eb6,8eb9,8ebc,8ec3,8ece,8eda,8ee2,8ee4,8eed,8ef2,8f19,8f2d,8f30,8f41,8f4a,8f5c,8f66-8f67,8f6e,8f93,8fa0,8fa5,8fa7,8fb3,8fb5-8fbc,8fbe,8fc1,8fca,8fcc,8fcf-8fd0,8fda,8ff9,9008,9012,9033,9037,904c,9056,9061,9064,906c,90a8,90ae,90bb,90c4,9151,9159,915c,915e,9167,9170,9176,917c,918c,918e,91a9,91b6,91bb,91c4,91d6,91df,91e5,91f6,91fa,91fe,9208,920e,9213,9221,9228,922a-922b,9235,923c,9241,9244,9255,9258,925d,925f,9262,926b,926e,9277,9281,9284,9289,928f,92ae,92b1,92b9-92ba,92be-92bf,92d4,92db,92e3,92e5,92eb-92ec,92f2-92f4,92f6,92fd,9303,9307,932c,9330-9331,9340-9345,9348,935f,9362,9366,9368-9369,936b,936e,9373-9374,9378,937d,9381,9384-9387,9390,939c,93a0,93ad,93b8,93bb,93bd,93bf,93c6,93cb,93d3,93db,93e0,93f0-93f1,93f3-93f4,9401,9404,9408,9417,941b,941d,9424-9427,942d,943e,9442-9443,944d,9454,9458,945b,9465,9467,946c,9479,947b,9485,949f,94a2,94c1,94c3,94dc,94f6,952d,9547,9578,957f,9585,9596-9597,9599,95a0,95a2,95a6-95a7,95aa,95e8,95f4,961d,9633,9638,9641,9645,9656,9669,967b,9681,968f,9696,96a3,96a5,96b6,96bd,96f4,9703,971b,9721,9731,9736,9740-9741,9751,9755,9757,975d,975f,976d,9771,9787,9789,979b,979f,97b1-97b2,97b4,97b8,97ba,97bd-97be,97c0,97c2,97c8,97d2,97e0,97e6,97ee,97f2,97f5,9814-9815,981f,9823,982e,9833-9834,9847,984b,9866,9868,986c,9875,98b4,98b7,98b9,98c3,98c7-98c8,98ca,98ce,98dc,98de,98e0-98e1,98e6,98ec,98f1,98f5,990e,9919,991c,9937-9939,993b,9940,9942,994a,994d,995d,9962-9963,999b,99a4,99aa,99b8,99bc,99c4-99c5,99da,99e0-99e1,99e6,99f5,9a0c,9a10,9a1f,9a21,9a26,9a2f,9a3b-9a3c,9a58,9a5c,9a63,9a6c,9a8f,9ab2,9ab6,9aba,9abd,9ad7,9ae0,9ae2,9af4,9aff,9b02,9b09,9b0f,9b14,9b2a,9b2d,9b34,9b39,9b40,9b50,9b69,9b7f,9b81,9b83,9b8b,9b8d-9b8f,9b97,9b9d,9b9f,9bb0,9bcf,9bdd,9be9,9bed,9bf1,9bf4,9bff,9c02,9c0a,9c0c,9c10,9c15,9c1b,9c1f-9c20,9c26,9c2f,9c35,9c3a,9c45,9c4f,9c53,9c5d,9c72,9c7b-9c7c,9d02,9d0c,9d16,9d21,9d34,9d39,9d44,9d49,9d4e,9d50,9d5e,9d6d-9d6e,9d7c,9d7e,9d83,9d93,9da5,9dab,9dbd,9dc0,9dc4,9dc9,9dd4,9dfc,9e0a,9e0c,9e0e,9e18,9e1c,9e1f,9e7b,9e81,9e84-9e85,9e90,9e95-9e96,9e98,9e9e,9ea2,9ea6,9ea8,9eaa-9eac,9eaf,9eb1,9ebd,9ebf,9ec1,9ec4,9ec6-9ec7,9ee2,9ef1,9ef8,9efe,9f02,9f08,9f17,9f26-9f27,9f39,9f44-9f45,9f50,9f53,9f5a,9f62,9f69,9f7f,9f8e,9f99,9f9f,9fa5,e000,e002-e003,e009-e00a,e00c,e00e,e012-e016,e018,e01a-e01e,e020,e022-e023,e025,e02d-e02e,e030,e032-e038,e03b-e03c,e045,e04c,e05a,e05c,e05f-e061,e064,e066,e06c,e071,e074-e075,e078,e07d,e087,e089-e08a,e08c,e093-e094,e099-e09a,e09c-e09e,e0a6-e0a7,e0a9,e0ab,e0ae,e0ba,e0bc,e0be,e0c3,e0c5,e0c7-e0c8,e0ca,e0d0,e0d4-e0d5,e0dc,e0df,e0e2-e0e5,e0e7-e0e9,e0eb-e0ec,e0ee,e0f2,e0f8-e0f9,e0fb,e0fd,e103,e106,e109-e10b,e110,e114-e115,e11c-e11d,e121,e126-e128,e130-e131,e136,e139,e141-e142,e145,e147-e148,e14a,e14d,e150,e154-e157,e159-e15a,e15d,e162,e168-e16a,e171-e172,e175,e178-e179,e17b-e17c,e17f-e180,e185,e187,e189,e18b,e18f-e190,e193,e195-e196,e19f-e1a0,e1a4,e1a6,e1aa,e1ae,e1b0-e1b1,e1b3-e1b4,e1b6,e1b8,e1bb-e1bf,e1c1,e1c4-e1c5,e1c8,e1cc-e1cd,e1d4-e1d5,e1d7,e1da,e1dd,e1e2,e1e6,e1eb,e1ef-e1f0,e1f2,e1f7,e1fa,e1fe,e200-e202,e205,e207,e20a-e20c,e210,e212-e216,e219,e21b-e21c,e21f-e221,e226-e228,e22a,e22f,e231,e233,e237,e23b,e23d-e23e,e245,e248,e24a-e24f,e251-e254,e261,e268,e26b,e26d-e26f,e271,e27a,e27d,e282,e288-e289,e28b,e290-e291,e294-e296,e299-e29b,e29f,e2a1,e2a4,e2a6,e2b2-e2b5,e2b7-e2b8,e2ba,e2be-e2bf,e2c1,e2c7,e2c9,e2d4,e2d8-e2d9,e2de,e2e0-e2e2,e2e7,e2e9,e2eb-e2ed,e2f0-e2f1,e2f8,e2fc,e2ff-e301,e306,e308,e30c,e30f,e311,e313,e315,e318,e31b-e31c,e31f,e325,e32c,e330-e331,e335-e336,e33b,e33d,e342,e345,e348,e352,e354,e35b-e35c,e360,e362,e364-e365,e36f,e372,e374-e375,e377,e379,e37b,e381-e382,e386,e388-e38a,e38d,e391,e393-e394,e396,e398,e39a-e39b,e39e-e3a0,e3a2,e3a5-e3a9,e3ac,e3b1-e3b2,e3b4-e3b5,e3b9-e3bd,e3c3,e3c8,e3cc-e3cd,e3cf,e3d5,e3d8-e3da,e3e1,e3e3,e3e7,e3ed-e3ee,e3f0,e3f2-e3f4,e3f8,e3fa,e3fd,e3ff,e409-e40b,e414,e41b,e41d-e41e,e423,e425-e426,e428,e42c-e42d,e432,e436,e43a-e43c,e43e,e440-e441,e444,e448,e44c-e44e,e450-e451,e459-e45a,e45d-e45e,e461-e463,e465,e467-e46a,e46c,e46e-e46f,e471-e472,e474,e476,e47e-e47f,e484,e486-e48a,e48d-e48e,e491-e492,e495-e497,e4a1-e4a4,e4ab,e4af,e4b3-e4ba,e4c1,e4c6,e4c9,e4cd-e4ce,e4d6,e4d9,e4dc-e4dd,e4e4,e4e6-e4e8,e4ee-e4ef,e4f6,e4f8-e4f9,e4ff,e501-e502,e505,e50a,e50d,e50f,e512,e514,e516,e51a,e51c-e521,e524,e528-e52c,e52e-e52f,e537,e53e,e543,e54b,e554-e555,e557-e559,e55b-e55c,e55e-e55f,e562,e566-e567,e56d-e56e,e570,e572-e573,e575-e577,e579-e57a,e57c-e57e,e580,e582-e586,e588,e58b-e590,e592-e594,e59a,e59d-e5a1,e5a4,e5a6-e5a8,e5aa,e5af,e5b1-e5b2,e5b5,e5b7-e5b8,e5ba-e5bb,e5be-e5c0,e5c2,e5c8-e5c9,e5d7-e5d9,e5db-e5dc,e5df,e5e1-e5e3,e5e5-e5e6,e5e9,e5ee-e5f1,e5f3,e5fb-e5fc,e600,e602,e604,e60f-e612,e619-e61c,e621,e623-e624,e627,e62b,e632-e634,e637-e638,e63a,e63c,e63f-e642,e645-e646,e648,e64b,e64e-e64f,e652-e655,e657-e659,e65d-e660,e662-e663,e665-e668,e66a,e66e-e66f,e671,e676-e679,e67b-e67d,e67f-e680,e683-e688,e68a-e68c,e68e-e690,e692,e696-e697,e699-e69a,e69c,e69e-e69f,e6a1-e6a2,e6a6,e6ac-e6ad,e6b2,e6b9-e6ba,e6bd-e6be,e6c0-e6c1,e6c5,e6c7,e6ca,e6d1-e6d2,e6d7-e6d8,e6da-e6db,e6dd-e6e1,e6e4-e6e6,e6ee,e6f2-e6f3,e6f7,e6fa-e6fc,e6ff,e701-e702,e706-e707,e709-e70a,e70c,e710-e711,e713,e717-e718,e71a-e71b,e71d,e724-e725,e72b,e72f,e733-e737,e73c-e73d,e740-e742,e744,e747,e74d-e74f,e751-e752,e75b-e75d,e75f,e761-e762,e764-e765,e767-e769,e76c-e76e,e770,e775,e777-e778,e77a,e77c-e77d,e784,e786,e789,e78b,e78d,e790,e792,e794,e796-e797,e799,e7a2,e7a4-e7a9,e7b1,e7b4,e7b8,e7bc,e7c4,e7ca,e7ce,e7d1,e7d8,e7da,e7dc-e7dd,e7e4,e7e7-e7e9,e7eb,e7ed-e7ef,e7f1-e7f3,e7f8,e7fb-e7fc,e7ff-e802,e808,e80c,e80e-e80f,e811,e813,e816-e818,e81a,e821,e827-e828,e82d,e82f,e835,e837-e838,e83a-e83b,e841-e842,e84b,e84d-e84e,e851,e855-e858,e85b-e85d,e860-e862,e865-e867,e869-e86a,e86c,e871,e878,e87d-e87f,e887,e88f,e891-e892,e894-e895,e89a,e89d,e8a0-e8a1,e8a3-e8a7,e8a9-e8aa,e8ac-e8b0,e8b5-e8b6,e8b8,e8bd-e8c3,e8c5,e8c7,e8cb,e8cd-e8ce,e8d0-e8d1,e8d3,e8d5-e8d6,e8d8-e8da,e8dd,e8df-e8e1,e8e5-e8e6,e8e8-e8ea,e8ed,e8f1-e8f2,e8f5,e8fb,e8fe,e900,e903,e907-e908,e90c,e917-e918,e91c,e91e-e922,e925-e92c,e92e-e92f,e933-e936,e938,e93a,e93c-e93e,e941,e944-e945,e948,e94d,e950,e952-e955,e957-e958,e95a,e95c-e95e,e960-e961,e964,e967-e968,e96e-e96f,e973-e975,e977-e978,e97a-e97b,e97d,e981-e982,e987,e98a,e98e,e991,e9b0,e9cb,e9ef,ea43,eaa9,eabf-eac1,eac5,eac9-eacc,eacf-ead1,ead3-ead4,ead6-eada,eadc,eade-eae3,eae7-eaec,eaee,eaf0-eaf2,eaf4-eaf6,eaf8-eafb,eafe-eb00,eb02-eb05,eb08-eb0f,eb11-eb12,eb15,eb18-eb1d,eb1f-eb21,eb23,eb25,eb27,eb2a,eb2c-eb39,eb3d-eb3f,eb41,eb43-eb44,eb46,eb4a-eb50,eb53-eb5b,eb5d,eb5f,eb61-eb63,eb65,eb67-eb69,eb6b,eb6d,eb6f-eb71,eb73-eb74,eb76-eb78,eb7a,eb7e-eb81,eb83-eb85,eb88-eb8a,eb8c-eb90,eb93,eb95,eb97-eb9b,eb9f-eba0,eba2-eba3,eba5-eba6,eba8,ebaa-ebab,ebad-ebb0,ebb2-ebb4,ebb6,ebb9,ebbc-ebbd,ebbf,ebc2,ebc5-ebc8,ebca,ebcc-ebce,ebd0,ebd3,ebd5,ebd7-ebd8,ebda-ebdb,ebdd,ebdf,ebe1,ebe4,ebe7-ebe9,ebeb-ebec,ebee-ebef,ebf1-ebf2,ebf5-ebf6,ebf9-ebfb,ebfd-ebfe,ec05-ec06,ec08-ec09,ec0c,ec0e-ec10,ec13-ec14,ec17-ec1d,ec20,ec22,ec24,ec26,ec2a-ec2f,ec31-ec32,ec35,ec37,ec3b-ec3c,ec3f-ec49,ec4b-ec4c,ec4f,ec52,ec54,ec56-ec58,ec5a,ec5c-ec5d,ec5f-ec60,ec62-ec63,ec67-ec73,ec75-ec76,ec79,ec7b,ec7e,ec80,ec84,ec86,ec8d-ec8e,ec91-ec96,ec98-ec9b,ec9d-ec9e,eca0,eca3-eca4,eca7-eca8,ecab,ecad,ecaf,ecb4,ecb6,ecb9-ecbb,eccf,ecd4,ecdb-ecdc,ecde-ece1,ece5,ecf0,ecf2,ecf5,ecfc,ed04,ed07,ed0a,ed0c-ed11,ed13,ed15-ed18,ed1a,ed1c-ed1e,ed22,ed24-ed27,ed29-ed2a,ed2c-ed2d,ed3b,ed3d,ed41-ed42,ed45,ed47,ed4a-ed4b,ed4d-ed4f,ed51-ed54,ed57-ed58,ed5f,ed62,ed6b,ed71-ed72,ed75,ed77-ed78,ed7a,ed81,ed84-ed86,ed88-ed8b,ed8e,ed91,eda6,edc6,edcf,edd1,edd7,edda-eddb,eddd,ede1,eded,ee08,ee11,ee15,ee1b,ee20,ee22,ee2a,ee30-ee31,ee34,ee48,ee56,ee5b,ee5d,ee60,ee64,ee6a,ee76,ee7c,ee7e,ee91,ee9c,eea2-eeaa,eeac-eeb1,eeb4,eeb7,f303-f318,f325,f327,f344,f346,f34a-f34b,f3a0-f3a1,f3ac,f3f0,f3f9-f3fa,f3fc,f408-f40b,f43d,f440-f442,f444,f446,f448-f449,f44b,f44d,f450-f452,f454-f457,f45a-f45f,f461-f463,f465-f466,f469,f46c-f46f,f474,f477-f479,f47b-f47e,f480-f481,f483-f485,f488,f48b,f48d-f491,f497-f498,f49b,f49e,f4a4-f4a7,f4a9-f4aa,f4ad,f4af-f4b0,f4b2-f4b4,f4b7,f4ba-f4c1,f4c3-f4c5,f4c7-f4ca,f4cc-f4cf,f4d1-f4d5,f4d7,f4d9-f4e0,f4e2-f4e9,f4ef,f4f2-f4f3,f4f8,f4fc,f4fe-f501,f503,f505,f507-f511,f513-f516,f518-f51d,f51f-f526,f52a,f533-f534,f53a-f53b,f53d,f54e,f553,f556,f559-f55a,f55e,f565,f56b,f572,f579-f57a,f57d,f581,f583,f585,f58b-f58c,f58e,f593,f596,f59b-f59c,f5a0,f5a3-f5a4,f5ab,f5b0,f5b4,f5b6,f5b9,f5bd,f5c0,f5c4-f5c5,f5cc,f5ce,f5d0,f5d5-f5d7,f5e4,f5e6,f5e8,f5ea-f5ed,f5ef,f694,f69e,f6ad,f6b0,f7e5-f7e6,f7e8,f7ea-f7eb,f7ed-f7ee,f907,ff02,ff07,ff3b,ff3d,ffe2,ffe4,ffed,00af-00b1,00b7,00d7,00f7,02c7,02c9-02cb,02cd,02d9,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,2013-2014,2018-2019,201c-201d,2025-2027,2032,2035,203b,20ac,2103,2105,2109,2160-2169,2190-2193,2196-2199,2215,221a,221e-2220,2223,2225,2229-222b,222e,2234-2235,2252,2260-2261,2266-2267,2295,2299,22a5,22bf,2500,2502,250c,2510,2514,2518,251c,2524,252c,2534,253c,2550-2574,2581-258f,2593-2595,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25e2-25e5,2605-2606,2640,2642,3000-3003,3008-3012,3014-3015,301d-301e,3021-3029,3105-3129,32a3,338e-338f,339c-339e,33a1,33c4,33ce,33d1-33d2,33d5,4e00-4e01,4e03,4e07-4e11,4e14-4e16,4e18-4e19,4e1e-4e1f,4e26,4e2b,4e2d-4e2e,4e30-4e33,4e38-4e39,4e3b-4e3c,4e42-4e43,4e45,4e47-4e48,4e4b,4e4d-4e4f,4e52-4e53,4e56,4e58-4e59,4e5c-4e5f,4e69,4e73,4e7e-4e7f,4e82-4e84,4e86,4e88,4e8b-4e8e,4e91-4e95,4e99,4e9b,4e9e-4e9f,4ea1-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb3,4eb6,4eb9-4eba,4ec0-4ec4,4ec6-4ecb,4ecd,4ed4-4eda,4edc-4edf,4ee1,4ee3-4ee5,4ee8-4ee9,4ef0-4ef7,4efb,4efd,4eff-4f02,4f04-4f05,4f08-4f0b,4f0d-4f15,4f18-4f19,4f1d,4f22,4f2c-4f2d,4f2f-4f30,4f33-4f34,4f36,4f38,4f3a-4f3f,4f41,4f43,4f46-4f49,4f4c-4f64,4f67,4f69-4f6c,4f6e-4f70,4f73-4f89,4f8b,4f8d,4f8f-4f92,4f94-4f98,4f9a-4f9e,4fae-4faf,4fb2-4fb3,4fb5-4fb7,4fb9-4fbb,4fbf-4fc5,4fc7,4fc9-4fcb,4fcd-4fd1,4fd3-4fd4,4fd6-4fe1,4fec,4fee-4fef,4ff1,4ff3-4ff8,4ffa,4ffe,5000,5005-5007,5009,500b-500f,5011-501c,501e-5023,5025-502d,502f-5031,5033,5035,5037,503c,5040-5041,5043,5045-504f,5051,5053,5055,5057,505a-5065,5068-506b,506d-5070,5072-5077,507a,507d,5080,5082-5083,5085,5087,508b-508e,5091-5092,5094-5096,5098-509e,50a2-50a3,50ac-50b8,50ba-50bb,50bd-50bf,50c1-50c2,50c4-50cb,50ce-50cf,50d1,50d3-50d7,50da-50db,50dd,50e0,50e3-50ea,50ec-50f1,50f3,50f5-50f6,50f8-50f9,50fb,50fd-5100,5102-510c,5110-5115,5117-5118,511a,511c,511f-5122,5124-5126,5129-512a,512d-512e,5130-5135,5137-513d,513f-5141,5143-5149,514b-514d,5152,5154-5155,5157,5159-515f,5161-5163,5165,5167-5169,516b-516e,5171,5175-5178,517c,5180,5187,5189-518a,518d,518f,5191-5195,5197-5198,519e,51a0,51a2,51a4-51a5,51aa,51ac,51b0-51b1,51b6-51b7,51b9,51bc-51be,51c4-51c6,51c8,51ca-51ce,51d0,51d4,51d7-51d8,51dc-51de,51e0-51e1,51f0-51f1,51f3,51f5-51f6,51f8-51fa,51fd,5200-5201,5203,5206-520a,520c,520e,5210-5213,5216-5217,521c-521e,5221,5224-5225,5228-522a,522e,5230-5233,5235-5238,523a-523b,5241,5243-5244,5246-5247,5249-524e,5252,5254-5256,525a-525f,5261-5262,5269-526f,5272,5274-5275,5277-5278,527a-527d,527f-5284,5287-528d,5291,5293,5296-5299,529b,529f-52a0,52a3,52a6,52a9-52ae,52bb-52bc,52be,52c0-52c3,52c7,52c9,52cd,52d2-52d3,52d5-52d9,52db,52dd-52df,52e2-52e4,52e6,52e9,52eb,52ef-52f1,52f3-52f5,52f7-52f8,52fa-52fc,52fe-52ff,5305-5306,5308-530b,530d-5312,5315-5317,5319-531a,531c-531d,531f-5323,532a,532d,532f-5331,5334,5337,5339,533c-5341,5343-5345,5347-534a,534c-534d,5351-5354,5357,535a,535c,535e,5360-5361,5363,5366,536c,536e-5373,5375,5377-5379,537b-537c,537f,5382,5384,538a,538e-538f,5392,5394,5396-539a,539c-539f,53a4-53a5,53a7,53ac-53ad,53b2,53b4,53b9,53bb,53c3,53c8-53cb,53cd,53d4,53d6-53d7,53db,53df,53e1-53e6,53e8-53f3,53f5,53f8,53fb-53fc,5401,5403-5404,5406-5412,5418-5419,541b-5420,5424-542e,5430-5431,5433,5435-5439,543b-543e,5440-5443,5445-5448,544a,544e-544f,5454,5460-5468,546b-546c,546f-5478,547a-5482,5484,5486-5488,548b-548e,5490-5492,5495-5496,5498,549a,54a0-54a2,54a5-54b1,54b3,54b6-54b8,54ba-54c9,54ce-54cf,54d6,54de,54e0-54e2,54e4-54eb,54ed-54ee,54f1-54f3,54f7-54f8,54fa-54fd,54ff,5501,5503-550c,550e-5512,5514,5517,551a,5526-5527,552a,552c-5539,553b-553c,553e,5540-5541,5543-5546,5548,554a-554b,554d-5552,5555-5557,555c,555e-555f,5561-5566,556a,5575-5577,557b-5584,5587-558f,5591-5595,5598-559a,559c-559d,559f,55a1-55a8,55aa-55ae,55b1-55b3,55b5,55bb,55bf-55c0,55c2-55d6,55d9-55dd,55df,55e1-55e9,55ef,55f2,55f6-55f7,55f9-55fa,55fc-5602,5604,5606,5608-5609,560c-5610,5612-5617,561b-561d,561f,5627,5629-562a,562c,562e-5630,5632-5636,5638-563b,563d-5642,5645-5646,5648-564a,564c,564e,5653,5657-565a,565e,5660,5662-5666,5668-5674,5676-5679,567e-5687,568c-5690,5693,5695,5697-569a,569c-569d,56a5-56a8,56aa-56ae,56b2-56b7,56bc-56be,56c0-56c3,56c5-56c6,56c8-56cd,56d1,56d3-56d4,56d7,56da-56db,56dd-56e1,56e4-56e5,56e7,56ea-56eb,56ee,56f0,56f7,56f9-56fa,56ff,5701-5704,5707-570d,5712-5714,5716,5718,571a-571c,571e-5720,5722-5723,5728-572a,572c-5730,5733-5734,573b,573e,5740-5741,5745,5747,5749-5752,5761-5762,5764,5766,5768-576b,576d,576f-5777,577b-577d,5780,5782-5783,578b-578c,578f,5793-5795,5797-579b,579d-57a0,57a2-57a5,57ae,57b5-57b6,57b8-57ba,57bc-57bd,57bf,57c1-57c3,57c6-57c7,57cb-57cc,57ce-57d0,57d2,57d4-57d5,57dc,57df-57e5,57e7,57e9,57ec-57ee,57f0-57fd,5800-5802,5804-580e,5810,5814,5819,581b-581e,5820-5821,5823-5825,5827-582a,582c-5839,583b,583d,583f,5848-584f,5851-5855,5857-585b,585d-585e,5862-5865,5868,586b,586d,586f,5871,5874-5876,5879-5883,5885-588b,588e-5891,5893-5894,5898,589c-58a1,58a3,58a5-58a6,58a8-58a9,58ab-58ac,58ae-58af,58b1,58b3,58ba-58bf,58c1-58c2,58c5-58c9,58ce-58cf,58d1-58d6,58d8-58db,58dd-58df,58e2-58e4,58e7-58e9,58eb-58ec,58ef,58f4,58f9-58fa,58fc-58ff,5903,5906,590c-590f,5912,5914-5917,5919-591a,591c,5920,5922,5924-5925,5927,5929-592f,5931,5937-5938,593c,593e,5940,5944-5945,5947-594a,594e-5951,5953-5955,5957-5958,595a,595c,5960-5962,5967,5969-596b,596d-596e,5970-5974,5976-5979,597b-5985,598a,598d-5990,5992-5993,5996-5999,599d-599e,59a0-59a8,59ae-59af,59b1-59b6,59b9-59be,59c0-59c1,59c3,59c5-59c8,59ca-59d4,59d6,59d8,59da-59de,59e0-59e1,59e3-59e6,59e8-59ea,59ec-59ee,59f1-59f7,59fa-5a01,5a03,5a09-5a0a,5a0c,5a0f,5a11,5a13,5a15-5a19,5a1b-5a1c,5a1e-5a20,5a23,5a25,5a29,5a2d-5a2e,5a33,5a35-5a39,5a3c,5a3e,5a40-5a44,5a46-5a4a,5a4c-5a4d,5a50-5a53,5a55-5a58,5a5a-5a60,5a62,5a64-5a67,5a69-5a6a,5a6c-5a6d,5a70,5a77-5a78,5a7a-5a7d,5a7f,5a83-5a84,5a8a-5a8c,5a8e-5a90,5a92-5a95,5a97,5a9a-5a9f,5aa2,5aa5-5aa7,5aa9,5aac,5aae-5ac2,5ac4,5ac6-5acd,5ad5-5ae3,5ae5-5ae6,5ae8-5aee,5af3-5afb,5afd,5aff,5b01-5b03,5b05,5b07-5b09,5b0b-5b0c,5b0f-5b10,5b13-5b14,5b16-5b17,5b19-5b1b,5b1d-5b1e,5b20-5b21,5b23-5b28,5b2a,5b2c-5b30,5b32,5b34,5b38,5b3c-5b40,5b43,5b45,5b47-5b48,5b4b-5b4e,5b50-5b51,5b53-5b58,5b5a-5b5d,5b5f,5b62-5b65,5b69,5b6b-5b6c,5b6e,5b70-5b73,5b75,5b77-5b78,5b7a-5b7b,5b7d,5b7f,5b81,5b83-5b85,5b87-5b89,5b8b-5b8c,5b8e-5b8f,5b92-5b93,5b95,5b97-5b9c,5ba2-5ba8,5bac-5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf-5bc2,5bc4-5bc7,5bca-5bce,5bd0-5bd4,5bd6,5bd8-5bd9,5bde-5bec,5bee-5bf2,5bf5-5bf6,5bf8,5bfa,5c01,5c03-5c04,5c07-5c12,5c15-5c16,5c1a,5c1f,5c22,5c24-5c25,5c28,5c2a,5c2c,5c30-5c31,5c33,5c37-5c3c,5c3e-5c41,5c44-5c48,5c4b-5c51,5c54-5c56,5c58-5c59,5c5c-5c5d,5c60,5c62-5c65,5c67-5c6a,5c6c-5c6f,5c71,5c73-5c74,5c79-5c7c,5c7e,5c86,5c88-5c8d,5c8f-5c95,5c9d,5c9f-5cb1,5cb3,5cb5-5cb8,5cc6-5ccc,5cce-5cd0,5cd2-5cd4,5cd6-5cdb,5cde-5cdf,5ce8,5cea,5cec-5cee,5cf0-5cf1,5cf4,5cf6-5cf9,5cfb,5cfd,5cff-5d01,5d06-5d07,5d0b-5d0f,5d11-5d12,5d14,5d16-5d17,5d19-5d1b,5d1d-5d20,5d22-5d29,5d2e,5d30-5d3a,5d3c-5d3d,5d3f-5d43,5d45,5d47,5d49-5d4c,5d4e,5d50-5d52,5d55,5d59,5d5e,5d62-5d63,5d65,5d67-5d69,5d6b-5d6c,5d6f,5d71-5d72,5d77,5d79-5d7a,5d7c-5d82,5d84,5d86-5d8a,5d8d,5d92-5d95,5d97,5d99-5d9a,5d9c-5da2,5da7-5daa,5dac-5db2,5db4-5db5,5db7-5db8,5dba,5dbc-5dbd,5dc0,5dc2-5dc3,5dc6-5dc7,5dc9,5dcb,5dcd,5dcf,5dd1-5dd2,5dd4-5dd6,5dd8,5ddd-5de2,5de5-5de8,5deb,5dee,5df0-5df4,5df7,5df9,5dfd-5dff,5e02-5e04,5e06,5e0a,5e0c,5e0e,5e11,5e14-5e1b,5e1d,5e1f-5e25,5e28-5e29,5e2b,5e2d,5e33-5e34,5e36-5e38,5e3d-5e3e,5e40-5e41,5e43-5e45,5e4a-5e4f,5e53-5e55,5e57-5e59,5e5b-5e5d,5e5f-5e63,5e66-5e70,5e72-5e76,5e78-5e79,5e7b-5e7e,5e80,5e82,5e84,5e87-5e8d,5e8f,5e95-5e97,5e9a-5e9c,5ea0,5ea2-5ea8,5eaa-5eae,5eb0-5eb9,5ebe,5ec1-5ec2,5ec4-5ecc,5ece,5ed1-5ee3,5ee5-5ee9,5eec,5eee-5eef,5ef1-5ef3,5ef6-5ef7,5efa,5efe-5eff,5f01-5f02,5f04-5f05,5f07-5f08,5f0a-5f0b,5f0f,5f12-5f15,5f17-5f18,5f1a-5f1b,5f1d,5f1f,5f22-5f24,5f26-5f29,5f2d-5f2e,5f30-5f31,5f33,5f35-5f38,5f3c,5f40,5f43-5f44,5f46,5f48-5f4c,5f4e-5f4f,5f54,5f56-5f59,5f5d,5f62,5f64-5f65,5f67,5f69-5f6d,5f6f-5f71,5f73-5f74,5f76-5f79,5f7c-5f82,5f85-5f8c,5f90-5f92,5f96-5f99,5f9b-5f9c,5f9e-5fa1,5fa5-5fa6,5fa8-5faf,5fb2,5fb5-5fb7,5fb9,5fbb-5fc1,5fc3,5fc5,5fc9,5fcc-5fcd,5fcf-5fd2,5fd4-5fd9,5fdd-5fde,5fe0-5fe1,5fe3-5fe5,5fe8,5fea-5feb,5fed-5fef,5ff1,5ff3-5ff5,5ff7-5ff8,5ffa-5ffb,5ffd,5fff-6000,6009-6017,6019-601e,6020-6022,6024-602f,6032-6035,6037,6039,6040-6047,6049,604c-604d,6050,6052-6055,6058-605b,605d-605f,6062-6070,6072,607f-6081,6083-608a,608c-608e,6090,6092,6094-6097,609a-609d,609f-60a0,60a2-60a3,60a8,60b0-60b2,60b4-60c1,60c3-60cf,60d1,60d3-60d5,60d8-60dd,60df-60e2,60e4,60e6,60f0-60fc,60fe-6101,6103-6106,6108-610b,610d-6110,6112-6116,6118,611a-611d,611f,6123,6127-6129,612b-612c,612e-612f,6132,6134,6136-6137,613b,613e-6141,6144-614f,6152-6156,6158,615a-615b,615d-615f,6161-6163,6165-6168,616a-616c,616e,6170-6177,6179-617a,617c,617e,6180,6182-6183,6189-618e,6190-6194,6196,619a-619b,619d,619f,61a1-61a2,61a4,61a7-61b6,61b8,61ba,61bc,61be-61bf,61c1-61c3,61c5-61cd,61d6,61d8,61de-61e0,61e3-61eb,61ed-61ee,61f0-61f2,61f5-6201,6203-6204,6207-620a,620c-620e,6210-6212,6214-6216,6219-621b,621f-6225,6227,6229-622b,622d-622e,6230,6232-6234,6236,623a,623d-6243,6246-624b,624d-624e,6250-6254,6258-625c,625e,6260-6266,626d-6274,6276-6277,6279-6281,6283-6284,6286-628a,628c,628e-628f,6291-6298,62a8-62b1,62b3-62b6,62b8-62b9,62bb-62bf,62c2,62c4,62c6-62d4,62d6-62dc,62eb-6303,6307-6309,630b-6311,6313-6316,6328-632d,632f,6332-6334,6336,6338-633e,6340-6351,6354-635a,6365,6367-6369,636b,636d-6372,6375-6378,637a-637d,6380-6385,6387-638a,638c-6392,6394,6396-6399,639b-63a5,63a7-63b1,63bd-63be,63c0,63c2-63d0,63d2-63d3,63d5-63dd,63df-63e1,63e3-63e5,63e7-63eb,63ed-63f6,63f9,6406,6409-6410,6412-6418,641a-641c,641e-6428,642a-6430,6433-6437,6439,643d-6441,6443,644b,644d-644e,6450-6454,6458-6459,645b-6461,6465-6469,646b-6470,6472-647b,647d,647f,6482,6485,6487-648c,648f-6490,6492-6493,6495-649a,649c-64a0,64a2-64a6,64a9,64ab-64ae,64b0-64b3,64bb-64bf,64c1-64c5,64c7,64c9-64cb,64cd-64d0,64d2,64d4,64d6-64db,64e0,64e2-64e4,64e6,64e8-64e9,64eb-64ed,64ef-64f4,64f7-64f8,64fa-6501,6503-6504,6506-6507,6509,650c-6510,6513-6519,651b-651d,6520-6526,6529-652f,6532-6533,6536-6539,653b,653d-653f,6541,6543,6545-6546,6548-654a,654f,6551,6553-6559,655c-655e,6562-6568,656a,656c,656f,6572-657c,657f-6584,6587,658c,6590-6592,6594-6597,6599,659b-65a2,65a4-65a5,65a7-65a8,65aa-65ac,65ae-65b0,65b2-65b3,65b6-65b9,65bb-65bd,65bf,65c1-65c6,65cb-65d0,65d2-65d3,65d6-65d7,65da-65db,65dd-65df,65e1-65e2,65e5-65e6,65e8-65e9,65ec-65f5,65fa-65fd,6600,6602-6615,661c-661d,661f-6622,6624-6628,662b,662d-662f,6631-6636,6639-663a,6641-6643,6645,6647,6649-664a,664c,664f,6651-6652,6659-665f,6661-6662,6664-6666,6668,666a,666c,666e-6672,6674,6676-667c,667e,6680,6684,6686-668d,6690-6691,6694-6699,669d,669f-66a2,66a8-66ab,66ae-66b2,66b4-66b5,66b7-66bb,66bd-66be,66c0,66c4,66c6-66cc,66cf,66d2,66d6,66d8-66de,66e0,66e3-66e4,66e6,66e8-66e9,66eb-66ee,66f0,66f2-66f4,66f6-66f9,66fc,66fe-6701,6703-6705,6708-670b,670d,670f-6710,6712-6715,6717-6718,671b,671d,671f-6723,6726-6728,672a-672e,6731,6733-6735,6738-673f,6745-6749,674b-6751,6753,6755-6757,6759-675a,675c-6760,676a,676c-676d,676f-677f,6781,6783-6787,6789,678b-678e,6790-6795,6797-679a,679c-679d,679f,67ae-67b0,67b2-67bb,67c0-67c6,67c8-67d4,67d8-67df,67e2-67e7,67e9-67f8,67fa,67fc,67ff,6812-6814,6816-6818,681a,681c-681d,681f-6821,6825-6826,6828-682b,682d-682f,6831-6835,6838-683d,6840-6846,6848-6849,684b-6851,6853-6854,686b,686d-686f,6871-6872,6874-6879,687b-6883,6885-6887,6889-688c,688f-6894,6896-6897,689b-689d,689f-68a4,68a7-68b5,68c4,68c6-68c9,68cb-68ce,68d0-68d8,68da,68dc-68e1,68e3-68e4,68e6-68ec,68ee-68fd,6904-6908,690a-6915,6917,6925,692a,692f-6930,6932-6935,6937-6939,693b-693d,693f-6942,6944-6945,6948-694c,694e-694f,6951-6954,6956-6960,6962-6963,6965-6966,6968-6971,6974-697b,6982-6983,6986,698d-698e,6990-6991,6993-6997,6999-699c,699e,69a0-69a1,69a3-69b1,69b3-69b7,69b9,69bb-69bf,69c1-69c4,69c6,69c9-69d0,69d3-69d4,69d9,69e2,69e4-69e8,69eb-69ee,69f1-69f4,69f6-69f8,69fb-6a02,6a04-6a0a,6a0d,6a0f,6a11,6a13-6a19,6a1b,6a1d-6a21,6a23,6a25-6a28,6a32,6a34-6a35,6a38-6a41,6a44,6a46-6a49,6a4b,6a4d-6a51,6a54-6a56,6a58-6a5b,6a5d-6a62,6a64,6a66-6a6b,6a6d,6a6f,6a76,6a7e-6a81,6a83-6a85,6a87,6a89,6a8c-6a8e,6a90-6a97,6a9a-6a9c,6a9e-6aa6,6aa8,6aac-6aaf,6ab3-6ab4,6ab6-6abb,6abd,6ac2-6ac3,6ac5-6ac7,6acb-6acd,6acf-6ad1,6ad3,6ad9-6ae1,6ae5,6ae7-6ae8,6aea-6aec,6aee-6af1,6af3,6af8-6afc,6b00,6b02-6b04,6b08-6b0b,6b0f-6b13,6b16-6b1a,6b1e,6b20-6b21,6b23,6b25,6b28,6b2c-6b2d,6b2f,6b31-6b34,6b36-6b3f,6b41-6b43,6b45-6b4e,6b50-6b51,6b54-6b56,6b59,6b5b-6b5c,6b5e-6b67,6b6a,6b6d,6b72,6b76-6b79,6b7b,6b7e-6b80,6b82-6b84,6b86,6b88-6b8a,6b8c-6b8f,6b91,6b94-6b99,6b9b,6b9e-6ba0,6ba2-6ba7,6baa-6bab,6bad-6bb0,6bb2-6bb3,6bb5-6bb7,6bba,6bbc-6bbd,6bbf-6bc0,6bc3-6bcd,6bcf-6bd0,6bd2-6bd4,6bd6-6bd8,6bda-6bdb,6bde,6be0,6be2-6be4,6be6-6be8,6beb-6bec,6bef-6bf0,6bf2-6bf3,6bf7-6bf9,6bfb-6c06,6c08-6c09,6c0b-6c0d,6c0f-6c11,6c13-6c16,6c18-6c1b,6c1d,6c1f-6c21,6c23-6c28,6c2a-6c2c,6c2e-6c30,6c33-6c34,6c36,6c38,6c3b,6c3e-6c43,6c46,6c4a-6c50,6c52,6c54-6c55,6c57,6c59,6c5b-6c61,6c65-6c6b,6c6d,6c6f-6c74,6c76,6c78,6c7a-6c7b,6c7d-6c7e,6c80-6c90,6c92-6c96,6c98-6c9d,6cab-6cae,6cb0-6cb1,6cb3-6cb4,6cb6-6cc7,6cc9-6cca,6ccc-6ccd,6ccf-6cd7,6cd9-6cde,6ce0-6ce3,6ce5,6ce7-6ce9,6ceb-6cf3,6cf5,6cf9,6d00-6d01,6d03-6d04,6d07-6d12,6d16-6d1b,6d1d-6d20,6d22,6d25,6d27-6d42,6d58-6d5a,6d5e-6d6a,6d6c-6d70,6d74-6d80,6d82-6d8e,6d90-6d95,6d97-6d98,6daa-6dac,6dae-6daf,6db2-6db5,6db7-6db8,6dba-6dc0,6dc2,6dc4-6dcd,6dcf-6de6,6de8-6df7,6df9-6dfd,6e00,6e03,6e05,6e19-6e1d,6e1f-6e28,6e2b-6e36,6e38-6e41,6e43-6e47,6e49-6e4b,6e4d-6e4e,6e51-6e56,6e58,6e5a-6e69,6e6b,6e6e-6e6f,6e71-6e74,6e77-6e79,6e88-6e89,6e8d-6e90,6e92-6e94,6e96-6e99,6e9b-6ea7,6eaa-6eab,6eae-6eb4,6eb6-6eb7,6eb9-6eba,6ebc-6ed6,6ed8,6edc,6eeb-6eef,6ef1-6ef2,6ef4-6ef9,6efb-6f03,6f05-6f0a,6f0d-6f0f,6f12-6f15,6f18-6f1a,6f1c,6f1e-6f23,6f25-6f27,6f29-6f33,6f35-6f3c,6f3e-6f41,6f43,6f4e-6f55,6f57-6f58,6f5a-6f5b,6f5d-6f64,6f66-6f67,6f69-6f70,6f72-6f73,6f76-6f78,6f7a-6f80,6f82,6f84-6f89,6f8b-6f8e,6f90,6f92-6f97,6f9e,6fa0-6fb4,6fb6,6fb8-6fba,6fbc-6fbd,6fbf-6fc4,6fc6-6fcf,6fd4-6fd5,6fd8,6fdb-6fe4,6fe6-6fe9,6feb-6ff2,6ff4,6ff7,6ffa-6ffc,6ffe-7001,7004-7007,7009-700f,7011,7014-701d,701f-7024,7026-702b,702f-7035,7037-703c,703e-7046,7048-704a,704c,7051-7052,7055-7058,705a-705b,705d-7066,7068-706b,7070-7071,7074,7076,7078,707a,707c-707d,7082-7086,708a,708e,7091-7096,7098-709a,709f,70a1,70a4,70a9,70ab-70b1,70b3-70b5,70b7-70b8,70ba,70be,70c5-70c8,70ca-70cb,70cd-70cf,70d1-70d4,70d7-70da,70dc-70de,70e0-70e2,70e4,70ef-70f0,70f3-70f4,70f6-70fd,70ff-7100,7102,7104,7106,7109-710e,7110,7113,7117,7119-711c,711e-7123,7125-7126,7128,712e-7132,7136,713a,7141-7144,7146-7147,7149,714b-714e,7150,7152-7154,7156,7158-715a,715c-716a,716c,716e,7170,7172,7178,717b,717d,7180-7182,7184-7187,7189-718a,718f-7190,7192,7194,7197,7199-71a1,71a4-71a5,71a7-71aa,71ac,71af-71b3,71b5,71b8-71b9,71bc-71cb,71ce-71d0,71d2,71d4-71d6,71d8-71dc,71df-71e2,71e4-71e8,71ec-71ee,71f0-71f2,71f4,71f8-71f9,71fb-71ff,7201-7203,7205-7207,720a,720c-720d,7210,7213-7214,7219-721b,721d-721f,7222-7223,7226-722a,722c-722d,7230,7235-7236,7238-723b,723d-723f,7241-7242,7244,7246-724c,724f,7252-7253,7256,7258-725b,725d-7263,7267,7269-726a,726c,726e-7270,7272-7274,7276-7279,727b-7281,7284-7286,7288-7289,728b-728e,7290-7293,7295-7298,729a-729b,729d-729e,72a1-72aa,72ac,72ae-72b0,72b4-72b5,72ba,72bd,72bf-72c6,72c9-72cc,72ce,72d0-72d2,72d4,72d6-72da,72dc,72df-72e1,72e3-72e4,72e6,72e8-72eb,72f3-72f4,72f6-7301,7307-7308,730a-730c,730f,7311-7313,7316-7319,731b-731e,7322-7323,7325-7327,7329,732d,7330-7337,733a-733c,733e-7340,7342-7345,7349-734a,734c-734e,7350-7352,7357-735b,735d-7362,7365-736c,736e-7370,7372-7373,7375-7378,737a-738b,738e,7392-7397,739d,739f-73a2,73a4-73a6,73a8-73a9,73ab-73ad,73b2-73b9,73bb-73bc,73be-73c0,73c2-73c3,73c5-73c8,73ca-73cd,73d2-73d4,73d6-73de,73e0,73e3,73e5,73e7-73eb,73ed-73ee,73f4-73f6,73f8,73fa,73fc-7401,7403-740d,7416,741a-741b,741d,7420-7426,7428-7436,743a,743f-7442,7444,7446,744a-744b,744d-7452,7454-7455,7457,7459-745c,745e-745f,7462-7464,7467,7469-746a,746d-7473,7475,7479,747c-7481,7483,7485-748b,7490,7492,7494-7495,7497-7498,749a,749c,749e-74a1,74a3,74a5-74ab,74ad,74af-74b2,74b5-74b8,74ba-74bb,74bd-74c3,74c5,74ca-74cb,74cf,74d4-74e6,74e8-74e9,74ec,74ee,74f4-74f7,74fb,74fd-7500,7502-7504,7507-7508,750b-750d,750f-7518,751a,751c-751d,751f,7521-7522,7525-7526,7528-7533,7537-753a,753d-7540,7547-7548,754b-754c,754e-754f,7554,7559-755d,755f,7562-7566,756a-756c,756f-7570,7576-7579,757d-7580,7584,7586-7587,758a-758c,758f-7591,7594-7595,7598-759a,759d,75a2-75a5,75a7,75aa-75ab,75b0,75b2-75b3,75b5-75b6,75b8-75c2,75c4-75c5,75c7,75ca-75d2,75d4-75d5,75d7-75db,75dd-75e4,75e6-75e7,75ed,75ef-7601,7603,7608-760d,760f-7611,7613-7616,7619-7629,762d,762f-7635,7638,763a,763c-763d,7642-7643,7646-7649,764c,7650,7652-7653,7656-765a,765c,765f-7662,7664-7665,7669-766a,766c-766e,7670-7672,7675,7678-7679,767b-767f,7681-7682,7684,7686-768b,768e-768f,7692-7693,7695-7696,7699-769e,76a4,76a6,76aa-76ab,76ad-76b0,76b4-76b5,76b8,76ba-76bb,76bd-76bf,76c2-76c6,76c8-76ca,76cd-76ce,76d2-76d4,76da-76df,76e1,76e3-76e7,76e9-76ea,76ec-76f5,76f7-76fc,76fe,7701,7703-7705,7707-770b,7710-7713,7715,7719-771b,771d,771f-7720,7722-7723,7725,7727-7729,772d,772f,7731-773e,7744-7747,774a-774f,7752,7754-7756,7759-775c,775e-7763,7765-776f,7779,777c-7785,7787-7789,778b-778f,7791,7795,7797,7799-77a3,77a5,77a7-77a8,77aa-77ad,77b0-77b7,77ba-77bd,77bf,77c2,77c4,77c7,77c9-77ca,77cc-77d0,77d3-77d5,77d7-77dc,77de,77e0,77e2-77e3,77e5,77e7-77e9,77ec-77f3,77f7-77fd,7802-7803,7805-7806,7809,780c-7814,781d,781f-7823,7825-7835,7837-7838,7843,7845,7848-784a,784c-784e,7850,7852,785c-785e,7860,7862,7864-7865,7868-7871,7879,787b-787c,787e-7881,7883-7887,7889,788c,788e-788f,7891,7893-789a,789e-78a5,78a7-78ad,78b0,78b2-78b4,78ba-78bc,78be,78c1,78c3-78c5,78c8-78d1,78d4-78d5,78da-78db,78dd-78e3,78e5,78e7-78ea,78ec-78ed,78ef,78f2-78f4,78f7,78f9-78ff,7901-7902,7904-7905,7909,790c,790e,7910-7914,7917,7919,791b-791e,7921,7923-792d,792f,7931,7935,7938-793a,793d-7942,7944-794c,794f-7957,795a-7961,7963-7965,7967-796b,796d,7970,7972-7974,7979-797a,797c-797d,797f,7981-7982,7988,798a-798b,798d-7990,7992-7998,799a-799c,79a0-79a2,79a4,79a6-79a8,79aa-79ae,79b0-79b4,79b6-79bb,79bd-79c1,79c5,79c8-79c9,79cb,79cd-79cf,79d1-79d2,79d5-79d6,79d8,79dc-79e0,79e3-79e4,79e6-79e7,79e9-79ee,79f6-79f8,79fa-79fb,7a00,7a02-7a05,7a08,7a0a-7a0d,7a10-7a15,7a17-7a1c,7a1e-7a20,7a22,7a26,7a28,7a2b,7a2e-7a31,7a37,7a39,7a3b-7a3d,7a3f-7a40,7a44,7a46-7a48,7a4a-7a4e,7a54,7a56-7a58,7a5a-7a5c,7a5f-7a62,7a67-7a69,7a6b-7a6e,7a70-7a71,7a74-7a76,7a78-7a7b,7a7e-7a81,7a84-7a8c,7a8f-7a90,7a92,7a94-7a99,7a9e-7aa0,7aa2-7aa3,7aa8-7aac,7aae-7aaf,7ab1-7ab8,7aba,7abe-7ac1,7ac4-7ac5,7ac7,7aca-7acb,7ad1,7ad8-7ad9,7adf-7ae0,7ae3-7ae6,7aeb,7aed-7aef,7af6-7af7,7af9-7afb,7afd,7aff-7b01,7b04-7b06,7b08-7b0a,7b0e-7b13,7b18-7b1b,7b1d-7b1e,7b20,7b22-7b26,7b28,7b2a-7b35,7b38,7b3b,7b40,7b44-7b52,7b54,7b56,7b58,7b60-7b61,7b63-7b67,7b69,7b6d-7b6e,7b70-7b78,7b82,7b84-7b85,7b87-7b88,7b8a-7b91,7b94-7b99,7b9b-7b9d,7ba0-7ba1,7ba4,7bac-7bad,7baf,7bb1,7bb4-7bb5,7bb7-7bb9,7bbe,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9-7bcc,7bce,7bd4-7bd5,7bd8-7beb,7bf0-7bf4,7bf7-7bf9,7bfb,7bfd-7c03,7c05-7c07,7c09-7c11,7c19,7c1c-7c23,7c25-7c2d,7c30,7c33,7c37-7c39,7c3b-7c40,7c43,7c45,7c47-7c4a,7c4c-7c4d,7c50,7c53-7c54,7c57,7c59-7c5c,7c5f-7c60,7c63-7c67,7c69-7c6c,7c6e-7c6f,7c72-7c73,7c75,7c78-7c7a,7c7d,7c7f-7c81,7c84-7c85,7c88-7c8a,7c8c-7c8d,7c91-7c92,7c94-7c98,7c9e-7c9f,7ca1-7ca3,7ca5,7ca7-7ca8,7caf,7cb1-7cb5,7cb9-7cbf,7cc5,7cc8,7cca-7ccc,7cce,7cd0-7cd2,7cd4-7cd7,7cd9,7cdc-7ce0,7ce2,7ce7-7ce8,7cea,7cec,7cee-7cf2,7cf4,7cf6-7cf8,7cfb,7cfd-7cfe,7d00-7d22,7d28-7d29,7d2b-7d2c,7d2e-7d33,7d35-7d36,7d38-7d47,7d4a,7d4e-7d56,7d58,7d5b-7d5c,7d5e-7d5f,7d61-7d63,7d66-7d6b,7d6d-7d73,7d79-7d7d,7d7f-7d81,7d83-7d86,7d88,7d8c-7d8f,7d91-7d94,7d96,7d9c-7da3,7da6-7da7,7da9-7daa,7dac-7db2,7db4-7db5,7db7-7dc2,7dc4-7dc7,7dc9-7dcc,7dce,7dd2,7dd7-7ddb,7ddd-7de1,7de3,7de6-7dea,7dec,7dee-7df4,7df6-7df7,7df9-7dfb,7e03,7e08-7e17,7e1a-7e25,7e29-7e2b,7e2d-7e49,7e4c,7e50-7e5a,7e5c,7e5e-7e63,7e68-7e6b,7e6d,7e6f-7e70,7e72-7e7e,7e80-7e82,7e86-7e88,7e8a-7e8d,7e8f,7e91,7e93-7e9c,7f36,7f38-7f3a,7f3d-7f3f,7f43-7f45,7f48,7f4a-7f4d,7f4f-7f51,7f54-7f55,7f58,7f5b-7f61,7f63,7f65-7f6e,7f70,7f72-7f73,7f75-7f77,7f79-7f7f,7f83,7f85-7f8e,7f91-7f92,7f94-7f96,7f9a-7f9e,7fa0-7fa2,7fa4-7fa9,7fac-7fad,7faf-7fb3,7fb5-7fc3,7fc5,7fc7,7fc9-7fd2,7fd4-7fd5,7fd7,7fdb-7fdc,7fde-7fe3,7fe5-7fe6,7fe8-7ff5,7ff7-7ff9,7ffb-8001,8003-8007,800b-8012,8014-8019,801b-801c,801e-801f,8021,8024,8026,8028-802a,802c,8030,8033-8037,8039,803d-803f,8043,8046-8048,804a,804f-8052,8056,8058,805a,805c-805e,8064,8067,806c,806f-8073,8075-8079,807d-807f,8082,8084-8087,8089-808c,808f-8090,8092-8093,8095-8096,8098-809d,80a1-80a3,80a5,80a9-80ab,80ad-80af,80b1-80b2,80b4-80b5,80b8,80ba,80c2-80c5,80c7-80ca,80cc-80d1,80d4-80de,80e0-80e1,80e3-80e6,80ed,80ef-80f5,80f8-80fe,8100-8102,8105-8106,8108,810a,8115-8116,8118-8119,811b,811d-811f,8121-8125,8127,8129,812b-812d,812f-8130,8139-813a,813d-813e,8143-8144,8146-8147,814a-8155,815b-815c,815e,8160-8162,8164-8167,8169,816b,816e-8174,8176-817a,817f-8180,8182-8183,8186-818d,818f,8195,8197-81a0,81a2-81a3,81a6-81a9,81ab-81ac,81ae,81b0-81b5,81b7,81b9-81c0,81c2-81c7,81c9-81ca,81cc-81cd,81cf-81d2,81d5,81d7-81db,81dd-81e3,81e5-81ea,81ec-81ee,81f2-81f4,81f7-81fc,81fe-8202,8204-8205,8207-820d,8210-8212,8214-8216,821b-8222,8225,8228,822a-822c,822f,8232-823a,823c-823d,823f-8240,8242,8244-8245,8247,8249,824b,824e-8253,8255-825c,825e-825f,8261,8263-8264,8266,8268-8269,826b-826f,8271-8272,8274-8275,8277-8278,827c-8280,8283-8285,828a-828b,828d-8294,8298-829b,829d-82a5,82a7-82a9,82ab-82b1,82b3-82be,82c0,82c2-82c3,82d1-82d7,82d9,82db-82dc,82de-82e1,82e3-82e8,82ea-82ed,82ef-82f6,82f9-82fb,82fe,8300-8309,830c-830d,8316-8317,8319,831b-831c,831e,8320,8322,8324-832d,832f,8331-833c,833f-8345,8347-8354,8356,8373-8378,837a-837f,8381,8383,8386-8390,8392-839b,839d-839e,83a0,83a2-83ab,83ae-83b0,83bd,83bf-83cc,83ce-83cf,83d1,83d4-83d9,83db-83e5,83e7-83ec,83ee-83f6,83f8-83ff,8401,8403-8404,8406-8407,8409-8413,841b,8423,8429,842b-842d,842f-843d,843f-8440,8442-8447,8449,844b-844e,8450-8452,8454,8456-8457,8459-845b,845d-8461,8463,8465-8469,846b-8470,8473-847a,847d-847e,8482,8486,848d-8491,8494,8497-84a2,84a4,84a7-84ac,84ae-84b2,84b4,84b6,84b8-84bc,84bf-84c2,84c4-84c7,84c9-84d4,84d6-84d7,84db,84e7-84ec,84ee-84f4,84f6-84f7,84f9-8500,8502,8506-850f,8511-851a,851c-8521,8523-8531,853b,853d-853e,8540-8541,8543-854a,854d-854e,8551,8553-8559,855b,855d-855e,8560-856e,8571,8575-857c,857e,8580-8591,8594-8596,8598-85a4,85a6-85aa,85af-85b1,85b3-85ba,85bd-85c0,85c2-85c9,85cb,85cd-85d2,85d5,85d7-85da,85dc-85df,85e1-85e6,85e8-85ed,85ef-85f2,85f6-85fb,85fd-8601,8604-8607,8609-860c,8611,8617-861c,861e-8627,8629-862a,862c-862e,8631-8636,8638-863c,863e-8640,8643,8646-8648,864b-864e,8650,8652-8656,8659,865b-865c,865e-865f,8661-8665,8667-866b,866d-8671,8673-8674,8677,8679-867c,8685-8687,868a-868e,8690-8691,8693-869a,869c-869e,86a1-86a5,86a7-86aa,86af-86b1,86b3-86c9,86cb-86cc,86d0-86d1,86d3-86d4,86d6-86df,86e2-86e4,86e6,86e8-86ed,86f5-86fb,86fe,8700-870e,8711-8713,8718-871c,871e,8720-872a,872c-872e,8730-8735,8737-8738,873a-873c,873e-8743,8746,874c-876f,8773-877b,8781-8785,8787-8789,878d,878f-8794,8796-8798,879a-879f,87a2-87a4,87aa-87b0,87b2-87c0,87c2-87c6,87c8-87cc,87d1-87d4,87d7-87d9,87db-87e8,87ea-87ed,87ef,87f2-87f4,87f6-87f7,87f9-87fc,87fe-8803,8805-8806,8808-880d,8810-8811,8813-8817,8819,881b-881d,881f-8826,8828-882c,882e-8833,8835-8839,883b-8841,8843-8844,8848,884a-884e,8852-8853,8855-8857,8859-885b,885d,8861-8863,8867-886b,886d,886f-8872,8874-8877,8879,887c-8883,8888-8889,888b-888e,8891-8893,8895-889b,889e-889f,88a1-88a2,88a4,88a7-88a8,88aa-88ac,88b1-88b2,88b6-88ba,88bc-88be,88c0-88c2,88c9-88d0,88d2,88d4-88df,88e1,88e7-88e8,88eb-88ec,88ee-88f4,88f6-88fe,8901-8902,8905-8907,8909-890c,890e,8910-891a,891e-891f,8921-8923,8925-8927,8929-8933,8935-8938,893b-893e,8941-8942,8944,8946,8949,894b-894c,894f-8953,8956-8964,8966,8969-896f,8971-8974,8976,8979-897c,897e-897f,8981-8983,8985-8986,8988,898b,898f,8993,8995-8998,899b-899f,89a1-89a4,89a6,89aa,89ac-89af,89b2,89b6-89b7,89b9-89ba,89bd-89c0,89d2-89d6,89d9-89dd,89df-89e6,89e8-89e9,89eb-89ed,89f0-89f4,89f6-89f8,89fa-89fc,89fe-8a00,8a02-8a04,8a07-8a08,8a0a,8a0c,8a0e-8a13,8a15-8a18,8a1b,8a1d-8a1f,8a22-8a23,8a25,8a27,8a2a,8a2c-8a2d,8a30-8a31,8a34,8a36,8a39-8a3c,8a3e-8a41,8a44-8a46,8a48,8a4a,8a4c-8a52,8a54-8a59,8a5b,8a5e,8a60-8a63,8a66,8a68-8a69,8a6b-8a6e,8a70-8a77,8a79-8a7c,8a7f,8a81-8a87,8a8b-8a8d,8a8f,8a91-8a93,8a95-8a96,8a98-8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aaa-8aab,8ab0,8ab2,8ab6,8ab8-8ac0,8ac2-8ac9,8acb,8acd,8acf,8ad1-8ad9,8adb-8ae2,8ae4,8ae6-8ae8,8aeb,8aed-8af8,8afa-8afc,8afe-8b02,8b04-8b08,8b0a-8b0b,8b0d-8b1e,8b20,8b22-8b28,8b2a-8b2c,8b2e-8b31,8b33,8b35-8b37,8b39-8b3e,8b40-8b42,8b45-8b4b,8b4e-8b5a,8b5c-8b5d,8b5f-8b60,8b63,8b65-8b68,8b6a-8b6d,8b6f-8b70,8b74,8b77-8b7b,8b7d-8b80,8b82,8b84-8b86,8b88,8b8a-8b8c,8b8e,8b92-8b96,8b98-8b9a,8b9c,8b9e-8b9f,8c37,8c39,8c3b-8c3f,8c41-8c43,8c45-8c50,8c54-8c57,8c5a,8c5c-8c5d,8c5f,8c61-8c62,8c64-8c66,8c68-8c6d,8c6f-8c73,8c75-8c7b,8c7d,8c80-8c82,8c84-8c86,8c89-8c8a,8c8c-8c8d,8c8f-8c95,8c97-8c9a,8c9c-8c9e,8ca0-8ca5,8ca7-8cac,8caf-8cb0,8cb2-8cc5,8cc7-8cc8,8cca,8ccc,8ccf,8cd1-8cd3,8cd5,8cd7,8cd9-8cda,8cdc-8ce8,8cea,8cec-8cee,8cf0-8cf1,8cf3-8cf5,8cf8-8cfe,8d00,8d02,8d04-8d0a,8d0d,8d0f-8d10,8d13-8d17,8d19,8d1b,8d64,8d66-8d69,8d6b-8d70,8d72-8d74,8d76-8d79,8d7b,8d7d,8d80-8d81,8d84-8d85,8d89-8d8a,8d8c-8d96,8d99,8d9b-8d9c,8d9f-8da1,8da3,8da5,8da7-8da8,8daa-8daf,8db2-8db7,8db9-8dba,8dbc,8dbe-8dbf,8dc1-8dc2,8dc5-8dc8,8dcb-8dd1,8dd3,8dd5-8ddd,8ddf-8de4,8de6-8dec,8dee-8df4,8dfa,8dfc-8e00,8e02-8e07,8e09-8e0a,8e0d,8e0f-8e27,8e29,8e2b,8e2e,8e30-8e31,8e33-8e36,8e38-8e39,8e3c-8e42,8e44-8e45,8e47-8e4e,8e50,8e53-8e57,8e59-8e67,8e69-8e6a,8e6c-8e6d,8e6f,8e72-8e74,8e76,8e78,8e7a-8e7c,8e81-8e82,8e84-8e8e,8e90-8e98,8e9a,8e9d-8ea1,8ea3-8ea6,8ea8-8eac,8eb2,8eba,8ebd,8ec0,8ec2,8ec9-8ecd,8ecf,8ed1-8ed4,8ed7-8ed8,8edb-8ee1,8ee5-8ee9,8eeb-8eec,8eee-8eef,8ef1,8ef4-8efc,8efe-8f03,8f05-8f0b,8f0d-8f0e,8f10-8f18,8f1a-8f20,8f23-8f26,8f29-8f2a,8f2c,8f2e-8f2f,8f32-8f39,8f3b,8f3e-8f40,8f42-8f49,8f4b,8f4d-8f5b,8f5d-8f64,8f9b-8f9c,8f9f,8fa3,8fa6,8fa8,8fad-8fb2,8fb4,8fbf,8fc2,8fc4-8fc6,8fc9,8fcb,8fcd-8fce,8fd1-8fd7,8fe0-8fe6,8fe8,8fea-8feb,8fed-8fee,8ff0,8ff4-8ff8,8ffa-9006,900b-900d,900f-9011,9014-9017,9019-9024,902d-902f,9031-9032,9034-9036,9038,903c-903f,9041-9042,9044,9047,9049-904b,904d-9055,9058-9059,905b-905e,9060,9062-9063,9067-9069,906b,906d-9070,9072-9088,908a-908b,908d,908f-9091,9094-9095,9097-9099,909b,909e-90a3,90a5-90a7,90aa,90af-90b6,90b8,90bd-90bf,90c1,90c3,90c5,90c7-90c8,90ca-90cb,90ce,90d4-90dd,90df-90e5,90e8-90ed,90ef-90f5,90f9-9109,910b,910d-9112,9114,9116-9124,9126-9136,9138-913b,913e-9141,9143-9150,9152-9153,9155-9158,915a,915f-9165,9168-916a,916c,916e-916f,9172-9175,9177-917a,9180-9187,9189-918b,918d,918f-9193,9199-91a3,91a5,91a7-91a8,91aa-91b5,91b7,91b9-91ba,91bc-91be,91c0-91c3,91c5-91c7,91c9,91cb-91d1,91d3-91d5,91d7-91da,91dc-91dd,91e2-91e4,91e6-91ee,91f1,91f3-91f5,91f7-91f9,91fd,91ff-9207,9209-920a,920c-920d,920f-9212,9214-9217,9219-921a,921c,921e,9223-9227,922d-922e,9230-9234,9236-923a,923d-9240,9245-9246,9248-9254,9256-9257,925a-925b,925e,9260-9261,9263-9267,926c-926d,926f-9270,9272,9276,9278-9280,9282-9283,9285-9288,928a-928e,9291,9293-929d,92a0-92ac,92b2-92b7,92b9,92bb-92bc,92c0-92d3,92d5,92d7-92d9,92dd-92e1,92e4,92e6-92ea,92ee-92f1,92f7-92fc,92fe-9302,9304,9306,9308-9309,930b-9310,9312-9316,9318-931b,931d-932b,932d-932f,9333-9336,9338-9339,933c,9346-9347,9349-9352,9354-935c,935e,9360-9361,9363-9365,9367,936a,936c-936d,9370-9371,9375-9377,9379-937c,937e,9380,9382-9383,9388-938a,938c-938f,9391-9392,9394-939b,939d-939f,93a1-93aa,93ac,93ae-93b5,93b7,93c0,93c2-93c4,93c7-93c8,93ca,93cc-93d2,93d4-93da,93dc-93df,93e1-93e4,93e6-93e8,93ec,93ee,93f5-9400,9403,9406-9407,9409-9416,9418-9419,9420,9428-942c,942e,9430-9433,9435-943d,943f-9440,9444-944c,944f-9452,9455,9457,945d-945e,9460,9462-9464,9468-946b,946d-9478,947c-9483,9577,957a-957d,9580,9582-9583,9586,9588-9589,958b-9594,9598,959b-959c,959e-959f,95a1,95a3-95a5,95a8-95a9,95ab-95ae,95b0-95b1,95b5-95b7,95b9-95c0,95c3,95c5-95cd,95d0-95d6,95da-95dc,95de-95e5,961c,961e,9620-9624,9628,962a,962c-9632,9639-963d,963f-9640,9642-9644,964a-9651,9653-9654,9658,965b-965f,9661-9664,966a-966d,966f-9678,967c-967e,9680,9683-968b,968d-968e,9691-9695,9697-9699,969b-969c,969e,96a1-96a2,96a4,96a7-96aa,96ac,96ae,96b0-96b1,96b3-96b4,96b8-96b9,96bb-96bc,96bf-96ce,96d2-96df,96e1-96e3,96e5,96e8-96ea,96ef-96f2,96f5-96fb,96fd,96ff-9700,9702,9704-9709,970b,970d-9713,9716,9718-9719,971c-9720,9722-972c,972e-9730,9732,9735,9738-973a,973d-973f,9742-9744,9746-9749,974b,9752,9756,9758,975a-975c,975e,9760-9762,9766,9768-976a,976c,976e,9770,9772-9774,9776-9778,977a-9785,9788,978a-978b,978d-978f,9794,9797-979a,979c-979e,97a0-97a6,97a8,97aa-97ae,97b3,97b6-97b7,97b9,97bb,97bf,97c1,97c3-97c7,97c9,97cb-97d0,97d3-97d9,97dc-97df,97e1,97e3,97e5,97ed,97f0-97f1,97f3,97f6,97f8-97fb,97fd-9808,980a,980c-9813,9816-9818,981b-981e,9820-9821,9824,9826-9829,982b,982d,982f-9830,9832,9835,9837-9839,983b,9841,9843-9846,9848-984a,984c-9853,9857-9859,985b-9860,9862-9865,9867,9869-986b,986f-9874,98a8-98a9,98ac-98af,98b1-98b3,98b6,98b8,98ba-98c2,98c4,98c6,98c9,98cb-98cc,98db,98df,98e2-98e3,98e5,98e7,98e9-98eb,98ed,98ef,98f2,98f4,98f6,98f9-98fa,98fc-98fe,9900,9902-9903,9905,9907-990a,990c,9910-9918,991a-991b,991e-991f,9921,9924-9925,9927-9933,9935,993a,993c-993f,9941,9943,9945,9947-9949,994b-994c,994e,9950-9959,995b-995c,995e-995f,9961,9996-9999,999c-999e,99a1,99a3,99a5-99a8,99ab-99b5,99b9-99bb,99bd,99c1-99c3,99c7,99c9,99cb-99d9,99db-99dd,99df,99e2-99e5,99e7,99e9-99ea,99ec-99ee,99f0-99f1,99f4,99f6-99ff,9a01-9a07,9a09-9a0b,9a0d-9a0f,9a11,9a14-9a16,9a19-9a1e,9a20,9a22-9a25,9a27,9a29-9a2e,9a30-9a32,9a34-9a3a,9a3d-9a46,9a48-9a4a,9a4c-9a50,9a52-9a57,9a59-9a5b,9a5e-9a60,9a62,9a64-9a6b,9aa8,9aab,9aad,9aaf-9ab1,9ab3-9ab4,9ab7-9ab9,9abb-9abc,9abe-9ac2,9ac6-9ac7,9aca,9acd,9acf-9ad6,9ad8,9adc,9adf,9ae1,9ae3,9ae6-9ae7,9aeb-9aef,9af1-9af3,9af6-9af7,9af9-9afe,9b01,9b03-9b06,9b08,9b0a-9b0e,9b10-9b12,9b15-9b1a,9b1e-9b20,9b22-9b25,9b27-9b29,9b2b,9b2e-9b2f,9b31-9b33,9b35,9b37,9b3a-9b3c,9b3e-9b3f,9b41-9b46,9b48,9b4a-9b4f,9b51-9b52,9b54-9b56,9b58-9b5b,9b5f-9b61,9b64,9b66-9b68,9b6c,9b6f-9b71,9b74-9b77,9b7a-9b7e,9b80,9b82,9b85-9b88,9b90-9b93,9b95,9b9a-9b9b,9b9e,9ba0-9ba2,9ba4-9ba6,9ba8,9baa-9bab,9bad-9baf,9bb5-9bb6,9bb8-9bb9,9bbd,9bbf-9bc1,9bc3-9bc4,9bc6-9bca,9bd3-9bd7,9bd9-9bdc,9bde,9be0-9be2,9be4-9be8,9bea-9bec,9bf0,9bf7-9bf8,9bfd,9c05-9c09,9c0b,9c0d-9c0e,9c12-9c14,9c17,9c1c-9c1d,9c21,9c23-9c25,9c28-9c29,9c2b-9c2d,9c31-9c34,9c36-9c37,9c39,9c3b-9c41,9c44,9c46,9c48-9c4e,9c50,9c52,9c54-9c59,9c5e-9c60,9c62-9c63,9c66-9c68,9c6d-9c6e,9c71,9c73-9c75,9c77-9c7a,9ce5-9ce7,9ce9-9cea,9ced,9cf1-9cf7,9cf9-9cfd,9cff-9d00,9d03-9d09,9d10,9d12,9d14-9d15,9d17-9d19,9d1b,9d1d-9d20,9d22-9d23,9d25-9d26,9d28-9d29,9d2d-9d31,9d33,9d36-9d38,9d3b,9d3d-9d43,9d45,9d4a-9d4c,9d4f,9d51-9d54,9d56-9d5d,9d5f-9d61,9d67-9d6c,9d6f-9d75,9d77-9d79,9d7b,9d7d,9d7f-9d82,9d84-9d8c,9d90,9d92,9d94,9d96-9da4,9da6-9daa,9dac-9dad,9daf,9db1-9dbc,9dbe-9dbf,9dc1-9dc3,9dc5,9dc7-9dc8,9dca-9dd3,9dd5-9ddf,9de1-9de6,9de8-9de9,9deb-9df0,9df2-9dfb,9dfd-9e07,9e09,9e0b,9e0d,9e0f-9e15,9e17,9e19-9e1b,9e1d-9e1e,9e75,9e79-9e7a,9e7c-9e7d,9e7f-9e80,9e82-9e83,9e86-9e8e,9e91-9e94,9e97,9e99-9e9d,9e9f-9ea1,9ea4-9ea5,9ea7,9ea9,9ead-9eae,9eb0,9eb4-9eb7,9ebb-9ebc,9ebe,9ec0,9ec2-9ec3,9ec8,9ecc-9ed1,9ed3-9ed6,9ed8,9eda-9ee0,9ee4-9ee8,9eeb,9eed-9ef0,9ef2-9ef7,9ef9-9efd,9eff-9f01,9f06-9f07,9f09-9f0a,9f0e-9f10,9f12-9f13,9f15-9f16,9f18-9f1c,9f1e,9f20,9f22-9f25,9f28-9f38,9f3b,9f3d-9f3e,9f40-9f43,9f46-9f4f,9f52,9f54-9f59,9f5b-9f61,9f63-9f67,9f6a-9f6c,9f6e-9f72,9f74-9f7b,9f7e,9f8d,9f90-9f92,9f94-9f95,9f98,9f9c,9fa0,9fa2,9fa4,fa0c-fa0d,fe30-fe31,fe33-fe44,fe49-fe52,fe54-fe57,fe59-fe66,fe68-fe6b,ff01,ff03-ff06,ff08-ff3a,ff3c,ff3f,ff41-ff5e,ffe0-ffe1,ffe3 -Simplified Chinese - Level 1:4e00-4e01,4e03,4e07-4e0e,4e10-4e11,4e13-4e16,4e18-4e1e,4e22,4e24-4e25,4e27-4e28,4e2a-4e2d,4e30,4e32,4e34,4e36,4e38-4e3b,4e3d-4e3f,4e43,4e45,4e47-4e49,4e4b-4e50,4e52-4e54,4e56,4e58-4e59,4e5c-4e61,4e66,4e69,4e70-4e71,4e73,4e7e,4e86,4e88-4e89,4e8b-4e8f,4e91-4e95,4e98,4e9a-4e9b,4e9f-4ea2,4ea4-4ea9,4eab-4eae,4eb2-4eb3,4eb5,4eba-4ebb,4ebf-4ec7,4ec9-4ecb,4ecd-4ece,4ed1,4ed3-4ed9,4edd-4edf,4ee1,4ee3-4ee5,4ee8,4eea-4eec,4ef0,4ef2-4ef3,4ef5-4ef7,4efb,4efd,4eff,4f01,4f09-4f0a,4f0d-4f11,4f17-4f1b,4f1e-4f20,4f22,4f24-4f27,4f2a-4f2b,4f2f-4f30,4f32,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46,4f4d-4f51,4f53,4f55,4f57-4f60,4f63-4f65,4f67,4f69,4f6c,4f6f-4f70,4f73-4f74,4f76,4f7b-4f7c,4f7e-4f7f,4f83-4f84,4f88-4f89,4f8b,4f8d,4f8f,4f91,4f94,4f97,4f9b,4f9d,4fa0,4fa3,4fa5-4faa,4fac,4fae-4faf,4fb5,4fbf,4fc3-4fc5,4fca,4fce-4fd1,4fd7-4fd8,4fda,4fdc-4fdf,4fe1,4fe3,4fe6,4fe8-4fea,4fed-4fef,4ff1,4ff3,4ff8,4ffa,4ffe,500c-500d,500f,5012,5014,5018-501a,501c,501f,5021,5025-5026,5028-502a,502c-502e,503a,503c,503e,5043,5047-5048,504c,504e-504f,5055,505a,505c,5065,506c,5076-5077,507b,507e-5080,5085,5088,508d,50a3,50a5,50a7-50a9,50ac,50b2,50ba-50bb,50cf,50d6,50da,50e6-50e7,50ec-50ee,50f3,50f5,50fb,5106-5107,510b,5112,5121,513f-5141,5143-5146,5148-5149,514b,514d,5151,5154-5156,515a,515c,5162,5165,5168,516b-516e,5170-5171,5173-5179,517b-517d,5180-5182,5185,5188-5189,518c-518d,5192,5195-5197,5199,519b-519c,51a0,51a2,51a4-51a5,51ab-51ac,51af-51b3,51b5-51b7,51bb-51bd,51c0,51c4,51c6-51c7,51c9,51cb-51cc,51cf,51d1,51db,51dd,51e0-51e1,51e4,51eb,51ed,51ef-51f0,51f3,51f5-51f6,51f8-51fd,51ff-5203,5206-5208,520a,520d-520e,5211-5212,5216-521b,521d,5220,5224,5228-5229,522b,522d-522e,5230,5233,5236-523b,523d,523f-5243,524a,524c-524d,5250-5251,5254,5256,525c,525e,5261,5265,5267,5269-526a,526f,5272,527d,527f,5281-5282,5288,5290,5293,529b,529d-52a3,52a8-52ad,52b1-52b3,52be-52bf,52c3,52c7,52c9,52cb,52d0,52d2,52d6,52d8,52df,52e4,52f0,52f9-52fa,52fe-5300,5305-5306,5308,530d,530f-5310,5315-5317,5319-531a,531d,5320-5321,5323,5326,532a,532e,5339-533b,533e-533f,5341,5343,5345,5347-534a,534e-534f,5351-5353,5355-5357,535a,535c,535e-5364,5366-5367,5369,536b,536e-5371,5373-5375,5377-5378,537a,537f,5382,5384-5386,5389,538b-538d,5395,5398,539a,539d,539f,53a2-53a3,53a5-53a6,53a8-53a9,53ae,53b6,53bb,53bf,53c1-53c2,53c8-53cd,53d1,53d4,53d6-53d9,53db,53df-53e0,53e3-53e6,53e8-53f3,53f5-53f9,53fb-53fd,5401,5403-5404,5406,5408-540a,540c-5413,5415-5417,541b,541d-5421,5423,5426-5429,542b-542f,5431-5432,5434-5435,5438-5439,543b-543c,543e,5440,5443,5446,5448,544a-544b,5450,5452-5459,545b-545c,5462,5464,5466,5468,5471-5473,5475-5478,547b-547d,5480,5482,5484,5486,548b-548c,548e-5490,5492,5494-5496,5499-549b,549d,54a3-54a4,54a6-54ad,54af,54b1,54b3-54b4,54b8,54bb,54bd,54bf-54c2,54c4,54c6-54c9,54cc-54d5,54d7,54d9-54da,54dc-54df,54e5-54ea,54ed-54ee,54f2-54f3,54fa,54fc-54fd,54ff,5501,5506-5507,5509,550f-5511,5514,551b,5520,5522-5524,5527,552a,552c,552e-5531,5533,5537,553c,553e-553f,5541,5543-5544,5546,5549-554a,5550,5555-5556,555c,5561,5564-5567,556a,556c-556e,5575-5578,557b-557c,557e,5580-5584,5587-558b,558f,5591,5594,5598-5599,559c-559d,559f,55a7,55b1,55b3,55b5,55b7,55b9,55bb,55bd-55be,55c4-55c5,55c9,55cc-55cd,55d1-55d4,55d6,55dc-55dd,55df,55e1,55e3-55e6,55e8,55ea-55ec,55ef,55f2-55f3,55f5,55f7,55fd-55fe,5600-5601,5608-5609,560c,560e-560f,5618,561b,561e-561f,5623-5624,5627,562c-562d,5631-5632,5634,5636,5639,563b,563f,564c-564e,5654,5657-5659,565c,5662,5664,5668-566c,5671,5676,567b-567c,5685-5686,568e-568f,5693,56a3,56af,56b7,56bc,56ca,56d4,56d7,56da-56db,56dd-56e2,56e4,56eb,56ed,56f0-56f1,56f4-56f5,56f9-56fa,56fd-56ff,5703-5704,5706,5708-570a,571c,571f,5723,5728-572a,572c-5730,5733,5739-573b,573e,5740,5742,5747,574a,574c-5751,5757,575a-5761,5764,5766,5768-576b,576d,576f,5773,5776-5777,577b-577c,5782-5786,578b-578c,5792-5793,579b,57a0-57a4,57a6-57a7,57a9,57ab,57ad-57ae,57b2,57b4,57b8,57c2-57c3,57cb,57ce-57cf,57d2,57d4-57d5,57d8-57da,57dd,57df-57e0,57e4,57ed,57ef,57f4,57f8-57fa,57fd,5800,5802,5806-5807,580b,580d,5811,5815,5819,581e,5820-5821,5824,582a,5830,5835,5844,584c-584d,5851,5854,5858,585e,5865,586b-586c,587e,5880-5881,5883,5885,5889,5892-5893,5899-589a,589e-589f,58a8-58a9,58bc,58c1,58c5,58d1,58d5,58e4,58eb-58ec,58ee,58f0,58f3,58f6,58f9,5902,5904,5907,590d,590f,5914-5916,5919-591a,591c,591f,5924-5925,5927,5929-592b,592d-592f,5931,5934,5937-593a,593c,5941-5942,5944,5947-5949,594b,594e-594f,5951,5954-5958,595a,5960,5962,5965,5973-5974,5976,5978-5979,597d,5981-5984,5986-5988,598a,598d,5992-5993,5996-5997,5999,599e,59a3-59a5,59a8-59ab,59ae-59af,59b2,59b9,59bb,59be,59c6,59ca-59cb,59d0-59d4,59d7-59d8,59da,59dc-59dd,59e3,59e5,59e8,59ec,59f9,59fb,59ff,5a01,5a03-5a09,5a0c,5a11,5a13,5a18,5a1c,5a1f-5a20,5a23,5a25,5a29,5a31-5a32,5a34,5a36,5a3c,5a40,5a46,5a49-5a4a,5a55,5a5a,5a62,5a67,5a6a,5a74-5a77,5a7a,5a7f,5a92,5a9a-5a9b,5aaa,5ab2-5ab3,5ab5,5ab8,5abe,5ac1-5ac2,5ac9,5acc,5ad2,5ad4,5ad6,5ad8,5adc,5ae0-5ae1,5ae3,5ae6,5ae9,5aeb,5af1,5b09,5b16-5b17,5b32,5b34,5b37,5b40,5b50-5b51,5b53-5b55,5b57-5b5d,5b5f,5b62-5b66,5b69-5b6a,5b6c,5b70-5b71,5b73,5b75,5b7a,5b7d,5b80-5b81,5b83-5b85,5b87-5b89,5b8b-5b8c,5b8f,5b93,5b95,5b97-5b9e,5ba0-5ba6,5baa-5bab,5bb0,5bb3-5bb6,5bb8-5bb9,5bbd-5bbf,5bc2,5bc4-5bc7,5bcc,5bd0,5bd2-5bd3,5bdd-5bdf,5be1,5be4-5be5,5be8,5bee,5bf0,5bf8-5bfc,5bff,5c01,5c04,5c06,5c09-5c0a,5c0f,5c11,5c14-5c16,5c18,5c1a,5c1c-5c1d,5c22,5c24-5c25,5c27,5c2c,5c31,5c34,5c38-5c42,5c45,5c48-5c4b,5c4e-5c51,5c55,5c59,5c5e,5c60-5c61,5c63,5c65-5c66,5c6e-5c6f,5c71,5c79-5c7a,5c7f,5c81-5c82,5c88,5c8c-5c8d,5c90-5c91,5c94,5c96-5c9c,5ca2-5ca3,5ca9,5cab-5cad,5cb1,5cb3,5cb5,5cb7-5cb8,5cbd,5cbf,5cc1,5cc4,5ccb,5cd2,5cd9,5ce1,5ce4-5ce6,5ce8,5cea,5ced,5cf0,5cfb,5d02-5d03,5d06-5d07,5d0e,5d14,5d16,5d1b,5d1e,5d24,5d26-5d27,5d29,5d2d-5d2e,5d34,5d3d-5d3e,5d47,5d4a-5d4c,5d58,5d5b,5d5d,5d69,5d6b-5d6c,5d6f,5d74,5d82,5d99,5d9d,5db7,5dc5,5dcd,5ddb,5ddd-5dde,5de1-5de2,5de5-5de9,5deb,5dee-5def,5df1-5df4,5df7,5dfd-5dfe,5e01-5e03,5e05-5e06,5e08,5e0c,5e0f-5e11,5e14-5e16,5e18-5e1d,5e26-5e27,5e2d-5e2e,5e31,5e37-5e38,5e3b-5e3d,5e42,5e44-5e45,5e4c,5e54-5e55,5e5b,5e5e,5e61-5e62,5e72-5e74,5e76,5e78,5e7a-5e7d,5e7f-5e80,5e84,5e86-5e87,5e8a-5e8b,5e8f-5e91,5e93-5e97,5e99-5e9a,5e9c,5e9e-5ea0,5ea5-5ea7,5ead,5eb3,5eb5-5eb9,5ebe,5ec9-5eca,5ed1-5ed3,5ed6,5edb,5ee8,5eea,5ef4,5ef6-5ef7,5efa,5efe-5f04,5f08,5f0a-5f0b,5f0f,5f11,5f13,5f15,5f17-5f18,5f1b,5f1f-5f20,5f25-5f27,5f29-5f2a,5f2d,5f2f,5f31,5f39-5f3a,5f3c,5f40,5f50,5f52-5f53,5f55-5f58,5f5d,5f61-5f62,5f64,5f66,5f69-5f6a,5f6c-5f6d,5f70-5f71,5f73,5f77,5f79,5f7b-5f7c,5f80-5f82,5f84-5f85,5f87-5f8c,5f90,5f92,5f95,5f97-5f99,5f9c,5fa1,5fa8,5faa,5fad-5fae,5fb5,5fb7,5fbc-5fbd,5fc3-5fc6,5fc9,5fcc-5fcd,5fcf-5fd2,5fd6-5fd9,5fdd,5fe0-5fe1,5fe4,5fe7,5fea-5feb,5fed-5fee,5ff1,5ff5,5ff8,5ffb,5ffd-6006,600a,600d-600f,6012,6014-6016,6019,601b-601d,6020-6021,6025-602b,602f,6035,603b-603c,603f,6041-6043,604b,604d,6050,6052,6055,6059-605a,605d,6062-6064,6067-606d,606f-6070,6073,6076,6078-607d,607f,6083-6084,6089,608c-608d,6092,6094,6096,609a-609b,609d,609f-60a0,60a3,60a6,60a8,60ab-60ad,60af,60b1-60b2,60b4,60b8,60bb-60bc,60c5-60c6,60ca-60cb,60d1,60d5,60d8,60da,60dc-60dd,60df-60e0,60e6-60e9,60eb-60f0,60f3-60f4,60f6,60f9-60fa,6100-6101,6106,6108-6109,610d-610f,6115,611a,611f-6120,6123-6124,6126-6127,612b,613f,6148,614a,614c,614e,6151,6155,615d,6162,6167-6168,6170,6175,6177,618b,618e,6194,619d,61a7-61a9,61ac,61b7,61be,61c2,61c8,61ca-61cb,61d1-61d2,61d4,61e6,61f5,61ff,6206,6208,620a-6212,6215-6218,621a-621b,621f,6221-6222,6224-6225,622a,622c,622e,6233-6234,6237,623d-6241,6243,6247-6249,624b-624e,6251-6254,6258,625b,6263,6266-6267,6269-6270,6273,6276,6279,627c,627e-6280,6284,6289-628a,6291-6293,6295-6298,629a-629b,629f-62a2,62a4-62a5,62a8,62ab-62ac,62b1,62b5,62b9,62bb-62bd,62bf,62c2,62c4-62ca,62cc-62ce,62d0,62d2-62d4,62d6-62dc,62df,62e2-62e3,62e5-62e9,62ec-62ef,62f1,62f3-62f4,62f6-62f7,62fc-62ff,6301-6302,6307-6309,630e,6311,6316,631a-631b,631d-6325,6328,632a-632b,632f,6332,6339-633a,633d,6342-6343,6345-6346,6349,634b-6350,6355,635e-635f,6361-6363,6367,6369,636d-636e,6371,6376-6377,637a-637b,6380,6382,6387-638a,638c,638e-6390,6392,6396,6398,63a0,63a2-63a3,63a5,63a7-63aa,63ac-63ae,63b0,63b3-63b4,63b7-63b8,63ba,63bc,63be,63c4,63c6,63c9,63cd-63d0,63d2,63d6,63de,63e0-63e1,63e3,63e9-63ea,63ed,63f2,63f4,63f6,63f8,63fd,63ff-6402,6405,640b-640c,640f-6410,6413-6414,641b-641c,641e,6420-6421,6426,642a,642c-642d,6434,643a,643d,643f,6441,6444-6448,644a,6452,6454,6458,645e,6467,6469,646d,6478-647a,6482,6484-6485,6487,6491-6492,6495-6496,6499,649e,64a4,64a9,64ac-64ae,64b0,64b5,64b7-64b8,64ba,64bc,64c0,64c2,64c5,64cd-64ce,64d0,64d2,64d7-64d8,64de,64e2,64e4,64e6,6500,6509,6512,6518,6525,652b,652e-652f,6534-6536,6538-6539,653b,653e-653f,6545,6548-6549,654c,654f,6551,6555-6556,6559,655b,655d-655e,6562-6563,6566,656b-656c,6570,6572,6574,6577,6587,658b-658c,6590-6591,6593,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65a9,65ab,65ad,65af-65b0,65b9,65bc-65bd,65c1,65c3-65c6,65cb-65cc,65ce-65cf,65d2,65d6-65d7,65e0,65e2,65e5-65e9,65ec-65f1,65f6-65f7,65fa,6600,6602-6603,6606,660a,660c,660e-660f,6613-6615,6619,661d,661f-6620,6625,6627-6628,662d,662f,6631,6634-6636,663c,663e,6641,6643,664b-664c,664f,6652-6657,665a,665f,6661,6664,6666,6668,666e-6670,6674,6676-6677,667a,667e,6682,6684,6687,668c,6691,6696-6697,669d,66a7-66a8,66ae,66b4,66b9,66be,66d9,66db-66dd,66e6,66e9,66f0,66f2-66f4,66f7,66f9,66fc,66fe-6700,6708-670b,670d,6710,6714-6715,6717,671b,671d,671f,6726,6728,672a-672d,672f,6731,6734-6735,673a,673d,6740,6742-6743,6746,6748-6749,674c,674e-6751,6753,6756,675c,675e-6761,6765,6768-676a,676d,676f-6770,6772-6773,6775,6777,677c,677e-677f,6781,6784,6787,6789,678b,6790,6795,6797-6798,679a,679c-679e,67a2-67a3,67a5,67a7-67a8,67aa-67ab,67ad,67af-67b0,67b3,67b5-67b8,67c1,67c3-67c4,67cf-67d4,67d8-67da,67dc-67de,67e0,67e2,67e5,67e9,67ec,67ef-67f1,67f3-67f4,67fd,67ff-6800,6805,6807-680c,680e-680f,6811,6813,6816-6817,681d,6821,6829-682a,6832-6833,6837-6839,683c-683e,6840-6846,6848-684a,684c,684e,6850-6851,6853-6855,6860-6869,686b,6874,6876-6877,6881,6883,6885-6886,688f,6893,6897,68a2,68a6-68a8,68ad,68af-68b0,68b3,68b5,68c0,68c2,68c9,68cb,68cd,68d2,68d5,68d8,68da,68e0,68e3,68ee,68f0-68f1,68f5,68f9-68fa,68fc,6901,6905,690b,690d-690e,6910,6912,691f-6920,6924,692d,6930,6934,6939,693d,693f,6942,6954,6957,695a,695d-695e,6960,6963,6966,696b,696e,6971,6977-6979,697c,6980,6982,6984,6986-6989,698d,6994-6995,6998,699b-699c,69a7-69a8,69ab,69ad,69b1,69b4,69b7,69bb,69c1,69ca,69cc,69ce,69d0,69d4,69db,69df-69e0,69ed,69f2,69fd,69ff,6a0a,6a17-6a18,6a1f,6a21,6a28,6a2a,6a2f,6a31,6a35,6a3d-6a3e,6a44,6a47,6a50,6a58-6a59,6a5b,6a61,6a65,6a71,6a79,6a7c,6a80,6a84,6a8e,6a90-6a91,6a97,6aa0,6aa9,6aab-6aac,6b20-6b24,6b27,6b32,6b37,6b39-6b3a,6b3e,6b43,6b46-6b47,6b49,6b4c,6b59,6b62-6b67,6b6a,6b79,6b7b-6b7c,6b81-6b84,6b86-6b87,6b89-6b8b,6b8d,6b92-6b93,6b96,6b9a-6b9b,6ba1,6baa,6bb3-6bb5,6bb7,6bbf,6bc1-6bc2,6bc5,6bcb,6bcd,6bcf,6bd2-6bd7,6bd9,6bdb,6be1,6bea-6beb,6bef,6bf3,6bf5,6bf9,6bfd,6c05-6c07,6c0d,6c0f-6c11,6c13-6c16,6c18-6c1b,6c1f,6c21-6c22,6c24,6c26-6c2a,6c2e-6c30,6c32,6c34-6c35,6c38,6c3d,6c40-6c42,6c46-6c47,6c49-6c4a,6c50,6c54-6c55,6c57,6c5b-6c61,6c64,6c68-6c6a,6c70,6c72,6c74,6c76,6c79,6c7d-6c7e,6c81-6c83,6c85-6c86,6c88-6c89,6c8c,6c8f-6c90,6c93-6c94,6c99,6c9b,6c9f,6ca1,6ca3-6ca7,6ca9-6cab,6cad-6cae,6cb1-6cb3,6cb8-6cb9,6cbb-6cbf,6cc4-6cc5,6cc9-6cca,6ccc,6cd0,6cd3-6cd7,6cdb,6cde,6ce0-6ce3,6ce5,6ce8,6cea-6ceb,6cee-6cf1,6cf3,6cf5-6cf8,6cfa-6cfe,6d01,6d04,6d07,6d0b-6d0c,6d0e,6d12,6d17,6d19-6d1b,6d1e,6d25,6d27,6d2a-6d2b,6d2e,6d31-6d33,6d35,6d39,6d3b-6d3e,6d41,6d43,6d45-6d48,6d4a-6d4b,6d4d-6d4f,6d51-6d54,6d59-6d5a,6d5c,6d5e,6d60,6d63,6d66,6d69-6d6a,6d6e-6d6f,6d74,6d77-6d78,6d7c,6d82,6d85,6d88-6d89,6d8c,6d8e,6d91,6d93-6d95,6d9b,6d9d-6da1,6da3-6da4,6da6-6dab,6dae-6daf,6db2,6db5,6db8,6dbf-6dc0,6dc4-6dc7,6dcb-6dcc,6dd1,6dd6,6dd8-6dd9,6ddd-6dde,6de0-6de1,6de4,6de6,6deb-6dec,6dee,6df1,6df3,6df7,6df9,6dfb-6dfc,6e05,6e0a,6e0c-6e0e,6e10-6e11,6e14,6e16-6e17,6e1a,6e1d,6e20-6e21,6e23-6e25,6e29,6e2b,6e2d,6e2f,6e32,6e34,6e38,6e3a,6e43-6e44,6e4d-6e4e,6e53-6e54,6e56,6e58,6e5b,6e5f,6e6b,6e6e,6e7e-6e7f,6e83,6e85-6e86,6e89,6e8f-6e90,6e98,6e9c,6e9f,6ea2,6ea5,6ea7,6eaa,6eaf,6eb1-6eb2,6eb4,6eb6-6eb7,6eba-6ebb,6ebd,6ec1-6ec2,6ec7,6ecb,6ecf,6ed1,6ed3-6ed5,6ed7,6eda,6ede-6ee2,6ee4-6ee6,6ee8-6ee9,6ef4,6ef9,6f02,6f06,6f09,6f0f,6f13-6f15,6f20,6f24,6f29-6f2b,6f2d,6f2f,6f31,6f33,6f36,6f3e,6f46-6f47,6f4b,6f4d,6f58,6f5c,6f5e,6f62,6f66,6f6d-6f6e,6f72,6f74,6f78,6f7a,6f7c,6f84,6f88-6f89,6f8c-6f8e,6f9c,6fa1,6fa7,6fb3,6fb6,6fb9,6fc0,6fc2,6fc9,6fd1-6fd2,6fde,6fe0-6fe1,6fee-6fef,7011,701a-701b,7023,7035,7039,704c,704f,705e,706b-706d,706f-7070,7075-7076,7078,707c,707e-7080,7085,7089-708a,708e,7092,7094-7096,7099,709c-709d,70ab-70af,70b1,70b3,70b7-70b9,70bb-70bd,70c0-70c3,70c8,70ca,70d8-70d9,70db,70df,70e4,70e6-70e9,70eb-70ed,70ef,70f7,70f9,70fd,7109-710a,7110,7113,7115-7116,7118-711a,7126,712f-7131,7136,7145,714a,714c,714e,715c,715e,7164,7166-7168,716e,7172-7173,7178,717a,717d,7184,718a,718f,7194,7198-7199,719f-71a0,71a8,71ac,71b3,71b5,71b9,71c3,71ce,71d4-71d5,71e0,71e5,71e7,71ee,71f9,7206,721d,7228,722a,722c,7230-7231,7235-7239,723b,723d,723f,7247-7248,724c-724d,7252,7256,7259,725b,725d,725f,7261-7262,7266-7267,7269,726e-726f,7272,7275,7279-727a,727e-7281,7284,728a-728b,728d,728f,7292,729f,72ac-72ad,72af-72b0,72b4,72b6-72b9,72c1-72c4,72c8,72cd-72ce,72d0,72d2,72d7,72d9,72de,72e0-72e1,72e8-72e9,72ec-72f4,72f7-72f8,72fa-72fc,7301,7303,730a,730e,7313,7315-7317,731b-731e,7321-7322,7325,7329-732c,732e,7331,7334,7337-7339,733e-733f,734d,7350,7352,7357,7360,736c-736d,736f,737e,7384,7387,7389,738b,738e,7391,7396,739b,739f,73a2,73a9,73ab,73ae-73b0,73b2-73b3,73b7,73ba-73bb,73c0,73c2,73c8-73ca,73cd,73cf-73d1,73d9,73de,73e0,73e5,73e7,73e9,73ed,73f2,7403,7405-7406,7409-740a,740f-7410,741a-741b,7422,7425-7426,7428,742a,742c,742e,7430,7433-7436,743c,7441,7455,7457,7459-745c,745e-745f,746d,7470,7476-7477,747e,7480-7481,7483,7487,748b,748e,7490,749c,749e,74a7-74a9,74ba,74d2,74dc,74de,74e0,74e2-74e4,74e6,74ee-74ef,74f4,74f6-74f7,74ff,7504,750d,750f,7511,7513,7518-751a,751c,751f,7525,7528-7529,752b-752d,752f-7533,7535,7537-7538,753a-753b,753e,7540,7545,7548,754b-754c,754e-754f,7554,7559-755c,7565-7566,756a,7572,7574,7578-7579,757f,7583,7586,758b,758f,7591-7592,7594,7596-7597,7599-759a,759d,759f-75a1,75a3-75a5,75ab-75ac,75ae-75b5,75b8-75b9,75bc-75be,75c2-75c5,75c7-75ca,75cd,75d2,75d4-75d6,75d8,75db,75de,75e2-75e4,75e6-75e8,75ea-75eb,75f0-75f1,75f4,75f9,75fc,75ff-7601,7603,7605,760a,760c,7610,7615,7617-7619,761b,761f-7620,7622,7624-7626,7629-762b,762d,7630,7633-7635,7638,763c,763e-7640,7643,764c-764d,7654,7656,765c,765e,7663,766b,766f,7678,767b,767d-767e,7682,7684,7686-7688,768b,768e,7691,7693,7696,7699,76a4,76ae,76b1-76b2,76b4,76bf,76c2,76c4-9ce2,9e1f-9e23,9e25-9e26,9e28-9e2d,9e2f,9e31-9e33,9e35-9e3a,9e3d-9e3f,9e41-9e4c,9e4e-9e4f,9e51,9e55,9e57-9e58,9e5a-9e5c,9e5e,9e63-9e64,9e66-9e6d,9e70-9e71,9e73,9e7e-9e7f,9e82,9e87-9e88,9e8b,9e92-9e93,9e9d,9e9f,9ea6,9eb4,9eb8,9ebb,9ebd-9ebe,9ec4,9ec9,9ecd-9ecf,9ed1,9ed4,9ed8,9edb-9edd,9edf-9ee0,9ee2,9ee5,9ee7,9ee9-9eea,9eef,9ef9,9efb-9efc,9efe,9f0b,9f0d-9f0e,9f10,9f13,9f17,9f19,9f20,9f22,9f2c,9f2f,9f37,9f39,9f3b,9f3d-9f3e,9f50-9f51,9f7f-9f80,9f83-9f8c,9f99-9f9b,9f9f-9fa0,3000-303f,ff01-ff60,201c-201d,2018-2019,2014,2026,ffe5 -Chinese (All):3000-303f,3105-312c,31a0-31bf,4e00-9faf,ff01-ff60,f900-faff,201c-201d,2018-2019,2014,2026,ffe5 -Thai:0e01-0e5b -Devanagari:0900-097f -Latin I:0020,00a1-00ff,2000-206f,20a0-20cf,2100-2183 -Latin Extended A:0100-01ff,2000-206f,20a0-20cf,2100-2183 -Latin Extended B:0180-024f,2000-206f,20a0-20cf,2100-2183 -Latin Extended Add'l:1e00-1eff,2000-206f,20a0-20cf,2100-2183 -Greek:0374-03f2,1f00-1ffe,2000-206f,20a0-20cf,2100-2183 -Cyrillic:0400-04ce,2000-206f,20a0-20cf,2100-2183 -Armenian:0530-058f,fb13-fb17 -Arabic:0600-06ff,fb50-fdff,fe70-feff +Uppercase:0020,0041-005a +Lowercase:0020,0061-007a +Numerals:0030-0039 +Punctuation:0020-002f,003a-0040,005b-0060,007b-007e +Basic Latin:0020-002f,0030-0039,003a-0040,0041-005a,005b-0060,0061-007a,007b-007e +Japanese Kana:3000-303f,3041-309f,30a0-30ff,ff61-ff9f +Japanese Kanji - Level 1:00a7-00a8,00b0-00b1,00b4,00b6,00d7,00f7,2010,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2103,212b,2190-2193,21d2,21d4,2200,2202-2203,2207-2208,220b,221a,221d-221e,2220,2225,2227-222c,2234-2235,223d,2252,2260-2261,2266-2267,226a-226b,2282-2283,2286-2287,22a5,2312,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25ef,2605-2606,2640,2642,266a,266d,266f,3000-3003,3005-3015,309b-309e,30fb-30fe,4e00-4e01,4e03,4e07-4e0b,4e0d-4e0e,4e11,4e14,4e16,4e18-4e19,4e1e,4e21,4e26,4e2d,4e32,4e38-4e39,4e3b,4e43,4e45,4e4b,4e4d-4e4f,4e57,4e59,4e5d-4e5f,4e71,4e73,4e7e,4e80,4e86,4e88-4e89,4e8b-4e8c,4e91-4e92,4e94-4e95,4e98-4e99,4e9b-4e9c,4ea1,4ea4-4ea6,4ea8,4eab-4eae,4eba,4ec0-4ec1,4ec7,4eca-4ecb,4ecf,4ed4-4ed6,4ed8-4ed9,4edd,4ee3-4ee5,4eee,4ef0,4ef2,4ef6,4efb,4f01,4f0a,4f0d-4f11,4f1a,4f1d,4f2f,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46,4f4d-4f51,4f53,4f55,4f59,4f5c,4f73,4f75,4f7c,4f7f,4f83,4f8b,4f8d,4f9b,4f9d,4fa0-4fa1,4fad-4faf,4fb5-4fb6,4fbf,4fc2-4fc4,4fca,4fd7,4fdd,4fe1,4fe3,4fee,4ff3,4ff5,4ff8,4ffa,5009,500b,500d,5012,5016,5019,501f,5023-5024,5026,502b,502d,5036,5039,5049,504f,505c,5065,5072,5074-5076,507d,508d,5091,5098-5099,50ac-50ad,50b5,50b7,50be,50c5,50cd,50cf,50d1,50d5,50da,50e7,50fb,5100,5104,5112,511f,512a,5132,5141,5143-5149,514b,514d-514e,5150,515a,515c,5165,5168,516b-516d,5171,5175-5178,517c,5185-5186,518a,518d,5192,5197,5199,51a0,51a5,51a8,51ac,51b4,51b6-51b7,51c4,51c6,51cb-51cd,51dd,51e1,51e6-51e7,51ea,51f1,51f6,51f8-51fa,51fd,5200,5203,5206-5208,520a,5211,5217,521d,5224-5225,5229,5230,5236-5238,523a-523b,5243,5247,524a,524d,5256,525b,5263-5265,526f-5270,5272,5275,5283,5287,5289,529b,529f-52a0,52a3,52a9-52ab,52b1,52b4,52b9,52be,52c3,52c5,52c7,52c9,52d5,52d8-52d9,52dd,52df,52e2,52e4,52e7,52f2,52fa,52fe-52ff,5301-5302,5305,5316-5317,5319,531d,5320-5321,532a,5339-533b,533f,5341,5343,5347-5348,534a,5351-5354,5357-5358,535a,535c,5360,5366,536f-5371,5373-5375,5378,537f,5384,5398,539a,539f,53a8-53a9,53ad,53b3,53bb,53c2,53c8-53ce,53d4,53d6-53d7,53d9,53db,53e1-53e5,53e9-53ec,53ef-53f3,53f6-53f8,5403-5404,5408-5411,541b,541f-5420,5426,542b,5438-5439,543b,543e,5442,5446,5448-544a,5451,5468,546a,5473,547c-547d,548b-548c,54b2-54b3,54bd,54c0-54c1,54c9,54e1,54e8-54e9,54f2,5504,5506-5507,5510,5516,552f,5531,553e,5544,5546,554f,5553,5584,5589,558b,559a,559c-559d,55a7,55aa-55ac,55b0,55b6,55e3,5606,5609,5617-5618,5629,5631,5642,564c,565b,5668,5674,5678,567a,5687,56a2,56da-56db,56de,56e0,56e3,56f0,56f2-56f3,56fa,56fd,5703,570f,5712,571f,5727-5728,572d,5730,5742,5747,574a,5750-5751,5764,5766,576a,5782,578b,57a2-57a3,57cb,57ce,57dc,57df-57e0,57f4,57f7,57f9-57fa,57fc,5800,5802,5805-5806,5815,5824,582a,5830-5831,5834-5835,583a,5840-5841,584a,5851,5854,5857-585a,585e,5869,586b,5875,587e,5883,5893,5897,589c,58a8,58b3,58be,58c1,58c7,58ca,58cc,58d5,58eb-58ec,58ee,58f0-58f2,58f7,5909,590f,5915-5916,5919-591a,591c,5922,5927,5929-592b,592e,5931,5937,5944,5947-5949,594f,5951,5954,5957,5965,5968,596a,596e,5973-5974,597d,5982-5984,598a,5993,5996,5999,59a5,59a8,59ac,59b9,59bb,59be,59c9,59cb,59d0-59d1,59d3-59d4,59e5-59e6,59ea-59eb,59f6,59fb,59ff,5a01,5a03,5a18,5a20,5a29,5a2f,5a3c,5a41,5a46,5a5a,5a66,5a7f,5a92,5a9b,5ac1,5ac9,5acc,5ae1,5b09,5b22,5b2c,5b30,5b50,5b54,5b57-5b58,5b5c-5b5d,5b5f,5b63-5b64,5b66,5b6b,5b85,5b87-5b89,5b8b-5b8d,5b8f,5b95,5b97-5b9d,5b9f,5ba2-5ba5,5bae,5bb0,5bb3-5bb6,5bb9,5bbf,5bc2,5bc4-5bc6,5bcc,5bd2-5bd3,5bdb,5bdd,5bdf,5be1,5be7,5be9,5bee,5bf5,5bf8,5bfa,5bfe-5bff,5c01-5c02,5c04,5c06,5c09-5c0b,5c0e-5c0f,5c11,5c16,5c1a,5c24,5c2d,5c31,5c3a-5c40,5c45,5c48,5c4a-5c4b,5c4d,5c51,5c55,5c5e,5c60-5c61,5c64-5c65,5c6f,5c71,5c90,5ca1,5ca8-5ca9,5cac,5cb1,5cb3,5cb8,5ce0-5ce1,5ce8,5cef-5cf0,5cf6,5cfb,5d07,5d0e,5d16,5d29,5d50,5d69,5d6f,5d8b,5dba,5dcc,5ddd-5dde,5de1,5de3,5de5-5de8,5dee,5df1,5df3-5df4,5df7,5dfb,5dfd-5dfe,5e02-5e03,5e06,5e0c,5e16,5e1d,5e25,5e2b,5e2d,5e2f-5e30,5e33,5e38,5e3d,5e45,5e4c,5e55,5e61,5e63,5e72-5e74,5e78-5e79,5e7b-5e7e,5e81,5e83-5e84,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ec3,5ec9-5eca,5ed3,5edf-5ee0,5ef6-5ef7,5efa-5efc,5eff,5f01,5f04,5f0a,5f0f-5f10,5f13-5f15,5f17-5f18,5f1b,5f1f,5f25-5f27,5f31,5f35,5f37,5f3c,5f3e,5f4a,5f53,5f62,5f66,5f69-5f6c,5f70-5f71,5f79,5f7c,5f80-5f81,5f84-5f85,5f8b-5f8c,5f90,5f92-5f93,5f97,5fa1,5fa9-5faa,5fae,5fb3-5fb4,5fb9,5fbd,5fc3,5fc5,5fcc-5fcd,5fd7-5fd9,5fdc,5fe0,5feb,5ff5,5ffd,6012,6016,601c-601d,6020,6025,6027-6028,602a,602f,604b,6050,6052,6055,6062,6065,6068-6069,606d,606f-6070,6075,6089,608c,6094,609f-60a0,60a3,60a6,60a9-60aa,60b2,60b6,60bc,60c5,60c7,60d1,60da,60dc,60df,60e3,60e8,60f0,60f3,60f9,6101,6108-6109,610f,611a-611b,611f,6148,614b-614c,614e,6155,6162-6163,6167-6168,616e,6170,6176,617e,6182,618e,6190,61a4,61a7,61a9,61b2,61b6,61be,61c7,61d0,61f2,61f8,620a,620e,6210-6212,6216,621a,621f,6226,622f,6234,6238,623b,623f-6240,6247,6249,624b,624d,6253,6255,6258,626e,6271,6276,6279,627f-6280,6284,628a,6291,6295,6297-6298,629c,629e,62ab,62b1,62b5,62b9,62bc-62bd,62c5,62cd,62d0,62d2-62d3,62d8-62d9,62db,62dd,62e0-62e1,62ec-62ed,62f3,62f6-62f7,62fe,6301,6307,6309,6311,6319,631f,6328,632b,632f,633a,633d,633f,6349,634c,6355,6357,635c,6367-6368,636e,6372,6377,637a-637b,6383,6388,638c,6392,6398,639b,63a0-63a2,63a5,63a7-63aa,63ac,63b2,63b4,63bb,63c3,63cf-63d0,63d6,63da-63db,63e1,63ee,63f4,63fa,640d,642c-642d,643a,643e,6442,6458,6469,6478,647a,6483,6492,649a,649e,64a4,64ab,64ad-64ae,64b0,64b2,64b9,64c1,64cd,64e2,64e6,64ec,64fe,652f,6539,653b,653e-653f,6545,654f,6551,6557,6559,6562-6563,6566,656c,6570,6574-6575,6577,6587,6589,658c,658e,6590-6591,6597,6599,659c,65a1,65a4-65a5,65a7,65ac-65ad,65af-65b0,65b9,65bc-65bd,65c5,65cb,65cf,65d7,65e2,65e5-65e9,65ec-65ed,65fa,6602,6606-6607,660c,660e-660f,6613-6614,661f-6620,6625,6627-6628,662d,662f,663c,6642-6643,664b,6652,6666,6669,666e-666f,6674,6676,667a,6681,6687,6691,6696-6697,66a2,66a6,66ab,66ae,66b4,66c7,66d9,66dc-66dd,66f2-66f4,66f8-66f9,66fd-6700,6708-6709,670b,670d,6714-6715,6717,671b,671d,671f,6728,672a-672d,6731,6734,673a,673d,6749,674e-6751,6753,6756,675c,675f,6761-6762,6765,676d,676f,6771,6775,6777,677e-677f,6787,6790,6795,6797,679a,679c-679d,67a0,67a2,67af,67b6,67c1,67c4,67ca,67cf-67d1,67d3-67d4,67d8,67da,67f1,67f3-67f5,67fb,67fe-67ff,6802-6804,6813,6816-6817,6821-6822,682a,6834,6838-6839,683c-683d,6841-6843,6848,6850-6851,6853-6854,685c-685d,685f,6867,6876,6881,6885,6893,6897,68a2,68a7-68a8,68af-68b1,68b6,68bc,68c4,68c9,68cb,68d2,68da,68df,68ee,68f2,68fa,6900,6905,690b,690d-690e,6919,691b-691c,6934,693f,694a,6953,6955,695a,6960,6962,696d,696f,6973,6975,697c-697d,6982,698a,698e,6994,699b,69cb-69cd,69d8-69d9,69fb,69fd,6a0b,6a17,6a19,6a1f,6a21,6a29-6a2b,6a35,6a39-6a3a,6a3d,6a4b,6a58,6a5f,6a61,6a7f-6a80,6a8e,6ad3,6adb,6ae8,6b04,6b1d,6b20-6b21,6b23,6b27,6b32,6b3a,6b3d-6b3e,6b4c,6b4e,6b53,6b62-6b64,6b66,6b69-6b6a,6b6f,6b73-6b74,6b7b,6b86,6b89-6b8b,6b96,6bb4-6bb5,6bba-6bbb,6bbf,6bc5,6bcd-6bce,6bd2,6bd4,6bd8,6bdb,6c0f,6c11,6c17,6c34,6c37-6c38,6c3e,6c40-6c42,6c4e,6c50,6c57,6c5a,6c5d,6c5f-6c60,6c70,6c72,6c7a,6c7d,6c83,6c88,6c8c,6c93,6c96,6c99,6ca1-6ca2,6cab,6cb3,6cb8-6cb9,6cbb-6cbc,6cbf,6cc1,6cc9-6cca,6ccc,6cd5,6ce1-6ce3,6ce5,6ce8,6cf0,6cf3,6d0b,6d17,6d1b,6d1e,6d25,6d29-6d2a,6d32,6d3b,6d3e,6d41,6d44-6d45,6d5c,6d66,6d69-6d6a,6d6c,6d6e,6d74,6d77-6d78,6d88,6d8c,6d99,6d9b-6d9c,6daf,6db2,6dbc,6dc0,6dcb,6dd1,6dd8,6de1,6deb,6df1,6df3,6df5,6df7,6dfb,6e05,6e07-6e09,6e0b,6e13,6e1a-6e1b,6e20-6e21,6e25-6e26,6e29,6e2c,6e2f,6e4a,6e56,6e58,6e5b,6e67,6e6f,6e7e-6e80,6e8c,6e90,6e96,6e9c-6e9d,6ea2,6eb6,6eba,6ec5,6ecb,6ed1,6edd-6ede,6ef4,6f01-6f02,6f06,6f09,6f0f,6f14-6f15,6f20,6f22-6f23,6f2b-6f2c,6f38,6f45,6f54,6f5c,6f5f,6f64,6f6e,6f70,6f84,6f97,6fb1,6fc0-6fc1,6fc3,6fe0-6fe1,6feb,6fef,7015,701e,7026-7027,702c,7058,706b,706f-7070,7078,707c-707d,7089-708a,708e,70ad,70b9-70ba,70c8,70cf,70f9,7114,711a,7121,7126,7136,713c,7149,714e,7159,7164,7167,7169,716e,717d,718a,7194,719f,71b1,71c3,71c8,71d0,71d5,71e5-71e6,71ed,7206,722a,7235-7236,723a,723d-723e,7247-7248,724c,7252,7259,725b,725d,725f,7261-7262,7267,7269,7272,7279,727d,7280,72a0,72ac,72af,72b6,72c2,72d0,72d7,72d9,72db,72e9,72ec-72ed,72f8,72fc-72fd,731b,731f,732a-732b,732e,7336-7337,733f,7344-7345,7363,7372,7384,7387,7389,738b,7396,73a9,73b2,73c2,73ca,73cd,73e0,73ea,73ed,73fe,7403,7406,7409,7422,7433-7436,745a-745b,745e,7460,7473,7483,74b0,74bd,74dc,74e2,74e6,74f6,7511,7518,751a,751c,751f,7523,7525,7528,752b,7530-7533,7537,753a-753b,754c,754f,7551,7554,7559,755c-755d,7560,7562,7565-7566,756a,7570,7573,7577,757f,758b,758e-758f,7591,75ab,75b2,75b9,75be,75c5,75c7,75d4-75d5,75d8,75db,75e2,75e9,75f4,7642,764c,7652,7656,767a-767b,767d-767e,7684,7686-7687,7690,76ae,76bf,76c3,76c6,76c8,76ca,76d7,76db,76df,76e3-76e4,76ee,76f2,76f4,76f8,76fe,7701,7709,770b-770c,771f-7720,773a,773c,7740,7761,7763,7766,77a5,77ac-77ad,77b3,77db,77e2,77e5,77e7,77e9,77ed,77ef,77f3,7802,7814-7815,7825-7827,7832,7834,783a,783f,785d,786b-786c,786f,7872,7881,7887,788d,7891,7893,7895,7897,78a7,78a9,78ba,78c1,78d0,78e8,78ef,7901,790e,793a,793c,793e,7941,7947-7949,7950,7956,795d-795e,7962,7965,7968,796d,7977,7981,7984-7985,798d-798f,79a6,79b0,79bd-79c1,79cb,79d1-79d2,79d8,79df,79e4,79e6,79e9,79f0,79fb,7a00,7a0b,7a0e,7a14,7a17,7a1a,7a1c,7a2e,7a32,7a3c-7a3d,7a3f-7a40,7a42,7a46,7a4d-7a50,7a63,7a6b,7a74,7a76,7a7a,7a7f,7a81,7a83-7a84,7a92-7a93,7a9f,7aaa,7aae-7aaf,7aba,7ac3,7acb,7adc,7ae0,7ae3,7ae5,7aea,7aef,7af6,7af9-7afa,7aff,7b08,7b11,7b1b,7b20,7b25-7b26,7b2c,7b39,7b46,7b48-7b49,7b4b,7b4f,7b51-7b52,7b54,7b56,7b86-7b87,7b94-7b95,7b97,7ba1,7baa,7bad,7bb1,7bb8,7bc0,7bc4,7bc7,7bc9,7be0,7be4,7bed,7c21,7c38,7c3e-7c3f,7c4d,7c73,7c7e,7c81-7c82,7c89,7c8b,7c8d,7c92,7c95,7c97-7c98,7c9b,7c9f,7ca5,7ca7,7cbe,7cca,7cce,7cd6,7cde-7ce0,7ce7,7cf8,7cfb,7cfe,7d00,7d04-7d05,7d0b,7d0d,7d10,7d14,7d17-7d1b,7d20-7d22,7d2b-7d2c,7d2f-7d30,7d33,7d39-7d3a,7d42-7d44,7d4c,7d50,7d5e,7d61-7d62,7d66,7d71,7d75-7d76,7d79,7d99-7d9a,7d9c,7dac-7dad,7db1-7db2,7db4,7dbb,7dbe-7dbf,7dca-7dcb,7dcf,7dd1-7dd2,7dda,7de0,7de8-7de9,7dec,7def,7df4,7e01,7e04,7e1b,7e1e,7e26,7e2b,7e2e,7e3e,7e41,7e4a-7e4b,7e4d,7e54-7e55,7e6d,7e70,7e82,7e8f,7f36,7f6a-7f6b,7f6e,7f70,7f72,7f75,7f77,7f85,7f8a,7f8e,7fa4,7fa8-7fa9,7fbd,7fc1,7fcc,7fd2,7fe0,7feb,7ff0,7ffb-7ffc,8000-8001,8003,8005,800c,8010,8015,8017,8033,8036,803d,8056,805e,8061,806f,8074,8077,807e,8087,8089,808b-808c,8096,8098,809d,80a1-80a2,80a5,80a9-80aa,80af,80b1-80b2,80b4,80ba,80c3,80c6,80cc,80ce,80de,80e1,80e4,80f4,80f8,80fd,8102,8105-8108,810a,811a,8131,8133,8139,814e,8150,8154-8155,816b,8170,8178-817a,817f,818f,819a,819c-819d,81a8,81b3,81bf,81c6,81d3,81e3,81e5,81e8,81ea,81ed,81f3-81f4,81fc,8208,820c,820e,8217-8218,821b-821c,821e-821f,822a,822c,8235-8237,8239,8247,8266,826e-826f,8272,8276,828b,8299,829d,82a5-82a6,82ad,82af,82b1,82b3,82b8-82b9,82bd,82c5,82d1,82d3-82d4,82d7,82db,82e5-82e7,82eb,82f1,8302,8304-8305,830e,831c,8328,8336,8338,8349-834a,834f,8352,8358,8377,837b,839e,83ab,83b1,83c5,83ca,83cc,83d3,83d6,83dc,83df,83e9,83ef-83f1,8404,840c,840e,8429,8431,843d,8449,844e,8457,845b,8461,8463,8466,846c,8471,8475,847a,848b,8490,8494,8499,849c,84b2,84b8,84bc,84c4,84c9,84cb,84d1,84ec,84ee,8500,8511,8513,851a,8526,852d,8535,853d,8543,8549-854a,854e,8557,8568-856a,8584,8597,8599,85a6,85a9-85ac,85ae-85af,85c1,85cd,85e4,85e9,85f7,85fb,8607,862d,864e,8650,865a,865c,865e,866b,8679,867b,868a,8695,86a4,86c7,86cb,86cd-86ce,86d9,86e4,86ed-86ee,86f8,86fe,8702,8718,871c,8749,874b,8755,8766,8776,877f,878d,87ba,87f9,87fb,8840,8846,884c,8853,8857,885b,885d,8861,8863,8868,8870,8877,887f,8888,888b,8896,88ab,88b4,88b7,88c1-88c2,88c5,88cf,88d5,88dc,88df,88e1,88f3,88f8,88fd-88fe,8907,8910,8912,8956,895f,8972,897f,8981,8986-8987,898b,898f,8996-8997,899a,89a7,89aa,89b3,89d2,89e3,89e6,8a00,8a02,8a08,8a0a,8a0e,8a13,8a17-8a18,8a1f,8a23,8a2a,8a2d,8a31,8a33-8a34,8a3a-8a3c,8a50-8a51,8a54-8a55,8a5e,8a60,8a63,8a66,8a69,8a6b,8a6e,8a70-8a73,8a87,8a89,8a8c-8a8d,8a93,8a95,8a98,8a9e,8aa0,8aa4,8aac-8aad,8ab0,8ab2,8ab9,8abc,8abf,8ac7,8acb-8acc,8acf,8ad2,8ad6,8adc,8ae6,8aed-8aee,8af8,8afa,8afe,8b00-8b02,8b04,8b0e,8b19,8b1b,8b1d,8b21,8b2c,8b39,8b58,8b5c,8b66,8b70,8b72,8b77,8b83,8b90,8c37,8c46,8c4a,8c5a,8c61,8c6a,8c79,8c8c,8c9d-8c9e,8ca0-8ca2,8ca7-8ca9,8cab-8cac,8caf-8cb0,8cb4,8cb7-8cb8,8cbb-8cbc,8cbf-8cc0,8cc2-8cc4,8cc7,8cca,8cce,8cd1,8cd3,8cdb-8cdc,8cde,8ce0,8ce2,8ce6,8cea,8ced,8cfc,8d08,8d0b,8d64,8d66,8d6b,8d70,8d74,8d77,8d85,8d8a,8da3,8da8,8db3,8ddd,8de1,8de8,8def,8df3,8df5,8e0a,8e0f,8e44,8e5f,8e74,8e8d,8eab,8eaf,8eca,8ecc-8ecd,8ed2,8edf,8ee2,8ef8,8efd,8f03,8f09,8f14,8f1d,8f29-8f2a,8f2f,8f38,8f3f,8f44,8f4d,8f5f,8f61,8f9b,8f9e,8fb0-8fb2,8fba-8fbc,8fbf,8fc2,8fc4-8fc5,8fce,8fd1,8fd4,8fe6,8fe9,8feb,8fed,8ff0,8ff7,8ffd,9000-9001,9003,9006,900f-9010,9013-9014,9017,9019-901a,901d,901f-9020,9022-9023,902e,9031-9032,9038,903c,9041-9042,9045,9047,904a-904b,904d-904e,9053-9055,905c,9060-9061,9063,9065,9069,906d-906e,9075,9077-9078,907a,907c,907f,9084,9091,90a3,90a6,90aa,90b8,90c1,90ca,90ce,90e1,90e8,90ed,90f5,90f7,90fd,912d,9149,914b-914e,9152,9154,9162,916a,916c,9175,9177-9178,9187,918d,9190,9192,9197,919c,91a4,91b8,91c6-91c8,91cc-91cf,91d1,91d8,91dc-91dd,91e3,91e6-91e7,920d-920e,9234,9237,9244,925b,9262,9266,9271,927e,9280,9283,9285,9291,9298,929a,92ad,92d2,92e4,92ea,92ed,92f2-92f3,92f8,92fc,9306,9310,9318,9320,9326,9328,932b-932c,932f,9332,934b,934d,9354,935b,936c,9375,937e,938c,9396-9397,939a,93a7,93ae,93d1,93e1,9418-9419,9438,9451,9453,9577,9580,9583,9589,958b,958f,9591,9593,95a2-95a5,95b2,95c7,95d8,961c,962a,9632,963b,963f-9640,9644,964d,9650,965b,9662-9665,966a,9670,9673,9675-9676,9678,967a,967d,9685-9686,9688,968a,968e-968f,9694,9699,969b-969c,96a0,96a3,96b7,96bb-96bc,96c0-96c1,96c4-96c7,96cc,96d1,96db,96e2-96e3,96e8,96ea-96eb,96f0,96f2,96f6-96f7,96fb,9700,9707,970a,971c,971e,9727,9732,9752,9756,9759,975e,9762,9769,976d,9774,9784,978d,9798,97a0,97ad,97d3,97ee,97f3,97fb,97ff,9801-9803,9805-9806,9808,9810-9813,9817-9818,981a,982c-982d,9834,983b-983c,984c-984e,9854-9855,9858,985b,985e,9867,98a8,98db,98df,98e2,98ef,98f2,98f4,98fc-98fe,9905,990a,990c,9910,9913,9928,9957,9996,9999,99a8,99ac,99b3-99b4,99c1,99c4-99c6,99c8,99d0,99d2,99d5,99ff,9a0e,9a12-9a13,9a28,9a30,9a5a,9aa8,9ab8,9ac4,9ad8,9aea,9aed,9b3c,9b41-9b42,9b45,9b54,9b5a,9b6f,9b8e,9b92,9baa-9bab,9bad-9bae,9bc9,9bd6,9bdb,9be8,9bf5,9c0d,9c10,9c2d,9c2f,9c39,9c3b,9c48,9c52,9c57,9ce5,9ce9,9cf3-9cf4,9cf6,9d07,9d0e,9d1b,9d28,9d2b-9d2c,9d3b,9d5c,9d60-9d61,9d6c,9d8f,9db4,9df2,9df9-9dfa,9e78,9e7f,9e93,9e97,9e9f,9ea6,9eb9-9ebb,9ebf,9ec4,9ecd,9ed2,9ed9,9edb,9f0e,9f13,9f20,9f3b,9f62,9f8d,ff01,ff03-ff06,ff08-ff5e,ffe0-ffe3 +Japanese (All):0000-007f,00a7-00a8,00b0-00b1,00b4,00b6,00d7,00f7,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,0401,0410-044f,0451,2010,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2103,2116,2121,212b,2160-2169,2170-2179,2190-2193,21d2,21d4,2200,2202-2203,2207-2208,220b,2211,221a,221d-2220,2225,2227-222c,222e,2234-2235,223d,2252,2260-2261,2266-2267,226a-226b,2282-2283,2286-2287,22a5,22bf,2312,2460-2473,2500-2503,250c,250f-2510,2513-2514,2517-2518,251b-251d,2520,2523-2525,2528,252b-252c,252f-2530,2533-2534,2537-2538,253b-253c,253f,2542,254b,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25ef,2605-2606,2640,2642,266a,266d,266f,3000-3003,3005-3015,301d,301f,3041-3093,309b-309e,30a1-30f6,30fb-30fe,3231-3232,3239,32a4-32a8,3303,330d,3314,3318,3322-3323,3326-3327,332b,3336,333b,3349-334a,334d,3351,3357,337b-337e,338e-338f,339c-339e,33a1,33c4,33cd,4e00-4e01,4e03,4e07-4e0b,4e0d-4e0e,4e10-4e11,4e14-4e19,4e1e,4e21,4e26,4e28,4e2a,4e2d,4e31-4e32,4e36,4e38-4e39,4e3b-4e3c,4e3f,4e42-4e43,4e45,4e4b,4e4d-4e4f,4e55-4e59,4e5d-4e5f,4e62,4e71,4e73,4e7e,4e80,4e82,4e85-4e86,4e88-4e8c,4e8e,4e91-4e92,4e94-4e95,4e98-4e99,4e9b-4e9c,4e9e-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb0,4eb3,4eb6,4eba,4ec0-4ec2,4ec4,4ec6-4ec7,4eca-4ecb,4ecd-4ecf,4ed4-4ed9,4edd-4edf,4ee1,4ee3-4ee5,4eed-4eee,4ef0,4ef2,4ef6-4ef7,4efb-4efc,4f00-4f01,4f03,4f09-4f0a,4f0d-4f11,4f1a,4f1c-4f1d,4f2f-4f30,4f34,4f36,4f38-4f3a,4f3c-4f3d,4f43,4f46-4f47,4f4d-4f51,4f53,4f55-4f57,4f59-4f5e,4f69,4f6f-4f70,4f73,4f75-4f76,4f7b-4f7c,4f7f,4f83,4f86,4f88,4f8a-4f8b,4f8d,4f8f,4f91-4f92,4f94,4f96,4f98,4f9a-4f9b,4f9d,4fa0-4fa1,4fab,4fad-4faf,4fb5-4fb6,4fbf,4fc2-4fc4,4fc9-4fca,4fcd-4fce,4fd0-4fd1,4fd4,4fd7-4fd8,4fda-4fdb,4fdd,4fdf,4fe1,4fe3-4fe5,4fee-4fef,4ff3,4ff5-4ff6,4ff8,4ffa,4ffe-4fff,5005-5006,5009,500b,500d,500f,5011-5012,5014,5016,5019-501a,501e-501f,5021-5026,5028-502d,5036,5039,5040,5042-5043,5046-5049,504f-5050,5055-5056,505a,505c,5065,506c,5070,5072,5074-5076,5078,507d,5080,5085,508d,5091,5094,5098-509a,50ac-50ad,50b2-50b5,50b7,50be,50c2,50c5,50c9-50ca,50cd,50cf,50d1,50d5-50d6,50d8,50da,50de,50e3,50e5,50e7,50ed-50ee,50f4-50f5,50f9,50fb,5100-5102,5104,5109,5112,5114-5116,5118,511a,511f,5121,512a,5132,5137,513a-513c,513f-5141,5143-514e,5150,5152,5154,515a,515c,5162,5164-5165,5168-516e,5171,5175-5178,517c,5180,5182,5185-5186,5189-518a,518c-518d,518f-5193,5195-5197,5199,519d,51a0,51a2,51a4-51a6,51a8-51ac,51b0-51b7,51bd-51be,51c4-51c6,51c9,51cb-51cd,51d6,51db-51dd,51e0-51e1,51e6-51e7,51e9-51ea,51ec-51ed,51f0-51f1,51f5-51f6,51f8-51fa,51fd-51fe,5200,5203-5204,5206-5208,520a-520b,520e,5211,5214-5215,5217,521d,5224-5225,5227,5229-522a,522e,5230,5233,5236-523b,5243-5244,5247,524a-524d,524f,5254,5256,525b,525e,5263-5265,5269-526a,526f-5275,527d,527f,5283,5287-5289,528d,5291-5292,5294,529b-529c,529f-52a0,52a3,52a6,52a9-52ad,52af,52b1,52b4-52b5,52b9,52bc,52be,52c0-52c1,52c3,52c5,52c7,52c9,52cd,52d2,52d5,52d7-52d9,52db,52dd-52e0,52e2-52e4,52e6-52e7,52f2-52f3,52f5,52f8-52fa,52fe-5302,5305-5308,530d,530f-5310,5315-5317,5319-531a,531d,5320-5321,5323-5324,532a,532f,5331,5333,5338-533b,533f-5341,5343,5345-534a,534d,5351-5354,5357-5358,535a,535c,535e,5360,5366,5369,536e-5375,5377-5378,537b,537f,5382,5384,5393,5396,5398,539a,539f-53a0,53a5-53a6,53a8-53a9,53ad-53ae,53b0,53b2-53b3,53b6,53bb,53c2-53c3,53c8-53ce,53d4,53d6-53d7,53d9,53db,53dd,53df,53e1-53e5,53e8-53f3,53f6-53f8,53fa,5401,5403-5404,5408-5411,541b,541d,541f-5420,5426,5429,542b-542e,5436,5438-5439,543b-543e,5440,5442,5446,5448-544a,544e,5451,545f,5468,546a,5470-5471,5473,5475-5477,547b-547d,5480,5484,5486,548a-548c,548e-5490,5492,549c,54a2,54a4-54a5,54a8-54a9,54ab-54ac,54af,54b2-54b3,54b8,54bc-54be,54c0-54c2,54c4,54c7-54c9,54d8,54e1-54e2,54e5-54e6,54e8-54e9,54ed-54ee,54f2,54fa,54fd,54ff,5504,5506-5507,550f-5510,5514,5516,552e-552f,5531,5533,5538-5539,553e,5540,5544-5546,554c,554f,5553,5556-5557,555c-555d,5563,557b-557c,557e,5580,5583-5584,5586-5587,5589-558b,5598-559a,559c-559f,55a7-55ac,55ae,55b0,55b6,55c4-55c5,55c7,55d4,55da,55dc,55df,55e3-55e4,55f7,55f9,55fd-55fe,5606,5609,5614,5616-5618,561b,5629,562f,5631-5632,5634,5636,5638,5642,564c,564e,5650,565b,5664,5668,566a-566c,5674,5678,567a,5680,5686-5687,568a,568f,5694,56a0,56a2,56a5,56ae,56b4,56b6,56bc,56c0-56c3,56c8,56ce,56d1,56d3,56d7-56d8,56da-56db,56de,56e0,56e3,56ee,56f0,56f2-56f3,56f9-56fa,56fd,56ff-5700,5703-5704,5708-5709,570b,570d,570f,5712-5713,5716,5718,571c,571f,5726-5728,572d,5730,5737-5738,573b,5740,5742,5747,574a,574e-5751,5759,5761,5764-5766,5769-576a,577f,5782,5788-5789,578b,5793,57a0,57a2-57a4,57aa,57ac,57b0,57b3,57c0,57c3,57c6-57c8,57cb,57ce,57d2-57d4,57d6,57dc,57df-57e0,57e3,57f4,57f7,57f9-57fa,57fc,5800,5802,5805-5806,580a-580b,5815,5819,581d,5821,5824,582a,582f-5831,5834-5835,583a,583d,5840-5841,584a-584b,5851-5852,5854,5857-585a,585e,5862,5869,586b,5870,5872,5875,5879,587e,5883,5885,5893,5897,589c,589e-589f,58a8,58ab,58ae,58b2-58b3,58b8-58bb,58be,58c1,58c5,58c7,58ca,58cc,58d1,58d3,58d5,58d7-58d9,58dc,58de-58df,58e4-58e5,58eb-58ec,58ee-58f2,58f7,58f9-58fd,5902,5909-590b,590f-5910,5915-5916,5918-591c,5922,5925,5927,5929-592e,5931-5932,5937-5938,593e,5944,5947-5949,594e-5951,5953-5955,5957-5958,595a-595b,595d,5960,5962-5963,5965,5967-596a,596c,596e,5973-5974,5978,597d,5981-5984,598a,598d,5993,5996,5999,599b,599d,59a3-59a5,59a8,59ac,59b2,59b9-59bb,59be,59c6,59c9,59cb,59d0-59d1,59d3-59d4,59d9-59da,59dc,59e5-59e6,59e8,59ea-59eb,59f6,59fb,59ff,5a01,5a03,5a09,5a11,5a18,5a1a,5a1c,5a1f-5a20,5a25,5a29,5a2f,5a35-5a36,5a3c,5a40-5a41,5a46,5a49,5a5a,5a62,5a66,5a6a,5a6c,5a7f,5a92,5a9a-5a9b,5abc-5abe,5ac1-5ac2,5ac9,5acb-5acc,5ad0,5ad6-5ad7,5ae1,5ae3,5ae6,5ae9,5afa-5afb,5b09,5b0b-5b0c,5b16,5b22,5b2a,5b2c,5b30,5b32,5b36,5b3e,5b40,5b43,5b45,5b50-5b51,5b54-5b58,5b5a-5b5d,5b5f,5b63-5b66,5b69,5b6b,5b70-5b71,5b73,5b75,5b78,5b7a,5b80,5b83,5b85,5b87-5b89,5b8b-5b8d,5b8f,5b95,5b97-5b9d,5b9f,5ba2-5ba6,5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf-5bc0,5bc2-5bc7,5bc9,5bcc,5bd0,5bd2-5bd4,5bd8,5bdb,5bdd-5bdf,5be1-5be2,5be4-5be9,5beb-5bec,5bee,5bf0,5bf3,5bf5-5bf6,5bf8,5bfa,5bfe-5bff,5c01-5c02,5c04-5c0b,5c0d-5c0f,5c11,5c13,5c16,5c1a,5c1e,5c20,5c22,5c24,5c28,5c2d,5c31,5c38-5c41,5c45-5c46,5c48,5c4a-5c4b,5c4d-5c51,5c53,5c55,5c5e,5c60-5c61,5c64-5c65,5c6c,5c6e-5c6f,5c71,5c76,5c79,5c8c,5c90-5c91,5c94,5ca1,5ca6,5ca8-5ca9,5cab-5cac,5cb1,5cb3,5cb6-5cb8,5cba-5cbc,5cbe,5cc5,5cc7,5cd9,5ce0-5ce1,5ce8-5cea,5ced,5cef-5cf0,5cf5-5cf6,5cfa-5cfb,5cfd,5d07,5d0b,5d0e,5d11,5d14-5d1b,5d1f,5d22,5d27,5d29,5d42,5d4b-5d4c,5d4e,5d50,5d52-5d53,5d5c,5d69,5d6c-5d6d,5d6f,5d73,5d76,5d82,5d84,5d87,5d8b-5d8c,5d90,5d9d,5da2,5dac,5dae,5db7-5dba,5dbc-5dbd,5dc9,5dcc-5dcd,5dd0,5dd2-5dd3,5dd6,5ddb,5ddd-5dde,5de1,5de3,5de5-5de8,5deb,5dee,5df1-5df5,5df7,5dfb,5dfd-5dfe,5e02-5e03,5e06,5e0b-5e0c,5e11,5e16,5e19-5e1b,5e1d,5e25,5e2b,5e2d,5e2f-5e30,5e33,5e36-5e38,5e3d,5e40,5e43-5e45,5e47,5e4c,5e4e,5e54-5e55,5e57,5e5f,5e61-5e64,5e72-5e76,5e78-5e7f,5e81,5e83-5e84,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea0,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ec1-5ec3,5ec8-5eca,5ecf-5ed0,5ed3,5ed6,5eda-5edb,5edd,5edf-5ee3,5ee8-5ee9,5eec,5ef0-5ef1,5ef3-5ef4,5ef6-5ef8,5efa-5efc,5efe-5eff,5f01,5f03-5f04,5f09-5f0d,5f0f-5f11,5f13-5f18,5f1b,5f1f,5f21,5f25-5f27,5f29,5f2d,5f2f,5f31,5f34-5f35,5f37-5f38,5f3c,5f3e,5f41,5f45,5f48,5f4a,5f4c,5f4e,5f51,5f53,5f56-5f57,5f59,5f5c-5f5d,5f61-5f62,5f66-5f67,5f69-5f6d,5f70-5f71,5f73,5f77,5f79,5f7c,5f7f-5f85,5f87-5f88,5f8a-5f8c,5f90-5f93,5f97-5f99,5f9e,5fa0-5fa1,5fa8-5faa,5fad-5fae,5fb3-5fb4,5fb7,5fb9,5fbc-5fbd,5fc3,5fc5,5fcc-5fcd,5fd6-5fd9,5fdc-5fde,5fe0,5fe4,5feb,5ff0-5ff1,5ff5,5ff8,5ffb,5ffd,5fff,600e-6010,6012,6015-6016,6019,601b-601d,6020-6021,6025-602b,602f,6031,603a,6041-6043,6046,604a-604b,604d,6050,6052,6055,6059-605a,605d,605f-6060,6062-6065,6068-606d,606f-6070,6075,6077,6081,6083-6085,6089-608d,6092,6094,6096-6097,609a-609b,609f-60a0,60a3,60a6-60a7,60a9-60aa,60b2-60b6,60b8,60bc-60bd,60c5-60c7,60d1,60d3,60d5,60d8,60da,60dc,60de-60e1,60e3,60e7-60e8,60f0-60f4,60f6-60f7,60f9-60fb,6100-6101,6103,6106,6108-6109,610d-610f,6111,6115,611a-611b,611f-6121,6127-6128,612c,6130,6134,6137,613c-613f,6142,6144,6147-6148,614a-614e,6153,6155,6158-615a,615d,615f,6162-6163,6165,6167-6168,616b,616e-6171,6173-6177,617e,6182,6187,618a,618e,6190-6191,6194,6196,6198-619a,61a4,61a7,61a9,61ab-61ac,61ae,61b2,61b6,61ba,61be,61c3,61c6-61cd,61d0,61e3,61e6,61f2,61f4,61f6-61f8,61fa,61fc-6200,6208-620a,620c-620e,6210-6214,6216,621a-621b,621d-621f,6221,6226,622a,622e-6230,6232-6234,6238,623b,623f-6241,6247-6249,624b,624d-624e,6253,6255,6258,625b,625e,6260,6263,6268,626e,6271,6276,6279,627c,627e-6280,6282-6284,6289-628a,6291-6298,629b-629c,629e,62a6,62ab-62ac,62b1,62b5,62b9,62bb-62bd,62c2,62c5-62ca,62cc-62cd,62cf-62d4,62d7-62d9,62db-62dd,62e0-62e1,62ec-62ef,62f1,62f3,62f5-62f7,62fe-62ff,6301-6302,6307-6309,630c,6311,6319,631f,6327-6328,632b,632f,633a,633d-633f,6349,634c-634d,634f-6350,6355,6357,635c,6367-6369,636b,636e,6372,6376-6377,637a-637b,6380,6383,6388-6389,638c,638e-638f,6392,6396,6398,639b,639f-63a3,63a5,63a7-63ac,63b2,63b4-63b5,63bb,63be,63c0,63c3-63c4,63c6,63c9,63cf-63d0,63d2,63d6,63da-63db,63e1,63e3,63e9,63ee,63f4-63f6,63fa,6406,640d,640f,6413,6416-6417,641c,6426,6428,642c-642d,6434,6436,643a,643e,6442,644e,6458,6460,6467,6469,646f,6476,6478,647a,6483,6488,6492-6493,6495,649a,649d-649e,64a4-64a5,64a9,64ab,64ad-64ae,64b0,64b2,64b9,64bb-64bc,64c1-64c2,64c5,64c7,64cd-64ce,64d2,64d4,64d8,64da,64e0-64e3,64e6-64e7,64ec,64ef,64f1-64f2,64f4,64f6,64fa,64fd-64fe,6500,6505,6518,651c-651d,6523-6524,652a-652c,652f,6534-6539,653b,653e-653f,6545,6548,654d-654f,6551,6555-6559,655d-655e,6562-6563,6566,656c,6570,6572,6574-6575,6577-6578,6582-6583,6587-6589,658c,658e,6590-6591,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65ab-65ad,65af-65b0,65b7,65b9,65bc-65bd,65c1,65c3-65c6,65cb-65cc,65cf,65d2,65d7,65d9,65db,65e0-65e2,65e5-65e9,65ec-65ed,65f1,65fa-65fb,6600,6602-6603,6606-6607,6609-660a,660c,660e-660f,6613-6615,661c,661e-6620,6624-6625,6627-6628,662d-662f,6631,6634-6636,663b-663c,663f,6641-6644,6649,664b,664f,6652,6657,6659,665d-665f,6662,6664-6669,666e-6670,6673-6674,6676,667a,6681,6683-6684,6687-6689,668e,6691,6696-6699,669d,66a0,66a2,66a6,66ab,66ae,66b2,66b4,66b8-66b9,66bc,66be-66bf,66c1,66c4,66c7,66c9,66d6,66d9-66da,66dc-66dd,66e0,66e6,66e9,66f0,66f2-66f5,66f7-6700,6703,6708-6709,670b,670d-670f,6714-6717,671b,671d-671f,6726-6728,672a-672e,6731,6734,6736-6738,673a,673d,673f,6741,6746,6749,674e-6751,6753,6756,6759,675c,675e-6766,676a,676d,676f-6773,6775,6777,677c,677e-677f,6785,6787,6789,678b-678c,6790,6795,6797,679a,679c-679d,67a0-67a2,67a6,67a9,67af,67b3-67b4,67b6-67b9,67bb,67c0-67c1,67c4,67c6,67ca,67ce-67d1,67d3-67d4,67d8,67da,67dd-67de,67e2,67e4,67e7,67e9,67ec,67ee-67ef,67f1,67f3-67f5,67fb,67fe-67ff,6801-6804,6813,6816-6817,681e,6821-6822,6829-682b,6832,6834,6838-6839,683c-683d,6840-6844,6846,6848,684d-684e,6850-6854,6859,685c-685d,685f,6863,6867,6874,6876-6877,687e-687f,6881,6883,6885,688d,688f,6893-6894,6897,689b,689d,689f-68a0,68a2,68a6-68a8,68ad,68af-68b1,68b3,68b5-68b6,68b9-68ba,68bc,68c4,68c6,68c8-68cb,68cd,68cf,68d2,68d4-68d5,68d7-68d8,68da,68df-68e1,68e3,68e7,68ee-68ef,68f2,68f9-68fa,6900-6901,6904-6905,6908,690b-690f,6912,6919-691c,6921-6923,6925-6926,6928,692a,6930,6934,6936,6939,693d,693f,694a,6953-6955,6959-695a,695c-695e,6960-6962,6968,696a-696b,696d-696f,6973-6975,6977-6979,697c-697e,6981-6982,698a,698e,6991,6994-6995,6998,699b-699c,69a0,69a7,69ae,69b1-69b2,69b4,69bb,69be-69bf,69c1,69c3,69c7,69ca-69ce,69d0,69d3,69d8-69d9,69dd-69de,69e2,69e7-69e8,69eb,69ed,69f2,69f9,69fb,69fd,69ff,6a02,6a05,6a0a-6a0c,6a12-6a14,6a17,6a19,6a1b,6a1e-6a1f,6a21-6a23,6a29-6a2b,6a2e,6a30,6a35-6a36,6a38-6a3a,6a3d,6a44,6a46-6a48,6a4b,6a58-6a59,6a5f,6a61-6a62,6a66,6a6b,6a72-6a73,6a78,6a7e-6a80,6a84,6a8d-6a8e,6a90,6a97,6a9c,6aa0,6aa2-6aa3,6aaa,6aac,6aae,6ab3,6ab8,6abb,6ac1-6ac3,6ad1,6ad3,6ada-6adb,6ade-6adf,6ae2,6ae4,6ae8,6aea,6afa-6afb,6b04-6b05,6b0a,6b12,6b16,6b1d,6b1f-6b21,6b23,6b27,6b32,6b37-6b3a,6b3d-6b3e,6b43,6b47,6b49,6b4c,6b4e,6b50,6b53-6b54,6b59,6b5b,6b5f,6b61-6b64,6b66,6b69-6b6a,6b6f,6b73-6b74,6b78-6b79,6b7b,6b7f-6b80,6b83-6b84,6b86,6b89-6b8b,6b8d,6b95-6b96,6b98,6b9e,6ba4,6baa-6bab,6baf,6bb1-6bb5,6bb7,6bba-6bbc,6bbf-6bc0,6bc5-6bc6,6bcb,6bcd-6bce,6bd2-6bd4,6bd6,6bd8,6bdb,6bdf,6beb-6bec,6bef,6bf3,6c08,6c0f,6c11,6c13-6c14,6c17,6c1b,6c23-6c24,6c34,6c37-6c38,6c3e-6c42,6c4e,6c50,6c55,6c57,6c5a,6c5c-6c60,6c62,6c68,6c6a,6c6f-6c70,6c72-6c73,6c7a,6c7d-6c7e,6c81-6c83,6c86,6c88,6c8c-6c8d,6c90,6c92-6c93,6c96,6c99-6c9b,6ca1-6ca2,6cab,6cae,6cb1,6cb3,6cb8-6cbf,6cc1,6cc4-6cc5,6cc9-6cca,6ccc,6cd3,6cd5,6cd7,6cd9-6cdb,6cdd,6ce1-6ce3,6ce5,6ce8,6cea,6cef-6cf1,6cf3,6d04,6d0b-6d0c,6d12,6d17,6d19,6d1b,6d1e-6d1f,6d25,6d29-6d2b,6d32-6d33,6d35-6d36,6d38,6d3b,6d3d-6d3e,6d41,6d44-6d45,6d59-6d5a,6d5c,6d63-6d64,6d66,6d69-6d6a,6d6c,6d6e-6d6f,6d74,6d77-6d79,6d85,6d87-6d88,6d8c,6d8e,6d93,6d95-6d96,6d99,6d9b-6d9c,6dac,6daf,6db2,6db5,6db8,6dbc,6dc0,6dc5-6dc7,6dcb-6dcc,6dcf,6dd1-6dd2,6dd5,6dd8-6dd9,6dde,6de1,6de4,6de6,6de8,6dea-6dec,6dee,6df1-6df3,6df5,6df7-6dfc,6e05,6e07-6e0b,6e13,6e15,6e19-6e1b,6e1d,6e1f-6e21,6e23-6e27,6e29,6e2b-6e2f,6e38-6e3a,6e3c,6e3e,6e43,6e4a,6e4d-6e4e,6e56,6e58,6e5b-6e5c,6e5f,6e67,6e6b,6e6e-6e6f,6e72,6e76,6e7e-6e80,6e82,6e8c,6e8f-6e90,6e96,6e98,6e9c-6e9d,6e9f,6ea2,6ea5,6eaa,6eaf,6eb2,6eb6-6eb7,6eba,6ebd,6ebf,6ec2,6ec4-6ec5,6ec9,6ecb-6ecc,6ed1,6ed3-6ed5,6edd-6ede,6eec,6eef,6ef2,6ef4,6ef7-6ef8,6efe-6eff,6f01-6f02,6f06,6f09,6f0f,6f11,6f13-6f15,6f20,6f22-6f23,6f2b-6f2c,6f31-6f32,6f38,6f3e-6f3f,6f41,6f45,6f54,6f58,6f5b-6f5c,6f5f,6f64,6f66,6f6d-6f70,6f74,6f78,6f7a,6f7c,6f80-6f82,6f84,6f86,6f88,6f8e,6f91,6f97,6fa1,6fa3-6fa4,6faa,6fb1,6fb3,6fb5,6fb9,6fc0-6fc3,6fc6,6fd4-6fd5,6fd8,6fdb,6fdf-6fe1,6fe4,6feb-6fec,6fee-6fef,6ff1,6ff3,6ff5-6ff6,6ffa,6ffe,7001,7005,7007,7009,700b,700f,7011,7015,7018,701a-701b,701d-701f,7026-7028,702c,7030,7032,703e,704c,7051,7058,7063,706b,706f-7070,7078,707c-707d,7085,7089-708a,708e,7092,7099,70ab-70af,70b3,70b8-70bb,70c8,70cb,70cf,70d9,70dd,70df,70f1,70f9,70fd,7104,7109,710f,7114,7119-711a,711c,7121,7126,7136,713c,7146-7147,7149,714c,714e,7155-7156,7159,715c,7162,7164-7167,7169,716c,716e,717d,7184,7188,718a,718f,7194-7195,7199,719f,71a8,71ac,71b1,71b9,71be,71c1,71c3,71c8-71c9,71ce,71d0,71d2,71d4-71d5,71d7,71df-71e0,71e5-71e7,71ec-71ee,71f5,71f9,71fb-71fc,71fe-71ff,7206,720d,7210,721b,7228,722a,722c-722d,7230,7232,7235-7236,723a-7240,7246-7248,724b-724c,7252,7258-7259,725b,725d,725f,7261-7262,7267,7269,7272,7274,7279,727d-727e,7280-7282,7287,7292,7296,72a0,72a2,72a7,72ac,72af,72b1-72b2,72b6,72b9,72be,72c2-72c4,72c6,72ce,72d0,72d2,72d7,72d9,72db,72e0-72e2,72e9,72ec-72ed,72f7-72f9,72fc-72fd,730a,7316-7317,731b-731d,731f,7324-7325,7329-732b,732e-732f,7334,7336-7337,733e-733f,7344-7345,734e-734f,7357,7363,7368,736a,7370,7372,7375,7377-7378,737a-737b,7384,7387,7389,738b,7396,73a9,73b2-73b3,73bb,73bd,73c0,73c2,73c8-73ca,73cd-73ce,73d2,73d6,73de,73e0,73e3,73e5,73ea,73ed-73ee,73f1,73f5,73f8,73fe,7403,7405-7407,7409,7422,7425-7426,7429-742a,742e,7432-7436,743a,743f,7441,7455,7459-745c,745e-7460,7462-7464,7469-746a,746f-7470,7473,7476,747e,7483,7489,748b,749e-749f,74a2,74a7,74b0,74bd,74ca,74cf,74d4,74dc,74e0,74e2-74e3,74e6-74e7,74e9,74ee,74f0-74f2,74f6-74f8,7501,7503-7505,750c-750e,7511,7513,7515,7518,751a,751c,751e-751f,7523,7525-7526,7528,752b-752c,752f-7533,7537-7538,753a-753c,7544,7546,7549-754d,754f,7551,7554,7559-755d,7560,7562,7564-7567,7569-756b,756d,756f-7570,7573-7574,7576-7578,757f,7582,7586-7587,7589-758b,758e-758f,7591,7594,759a,759d,75a3,75a5,75ab,75b1-75b3,75b5,75b8-75b9,75bc-75be,75c2-75c3,75c5,75c7,75ca,75cd,75d2,75d4-75d5,75d8-75d9,75db,75de,75e2-75e3,75e9,75f0,75f2-75f4,75fa,75fc,75fe-75ff,7601,7609,760b,760d,761f-7622,7624,7627,7630,7634,763b,7642,7646-7648,764c,7652,7656,7658,765c,7661-7662,7667-766a,766c,7670,7672,7676,7678,767a-767e,7680,7682-7684,7686-7688,768b,768e,7690,7693,7696,7699-769c,769e,76a6,76ae,76b0,76b4,76b7-76ba,76bf,76c2-76c3,76c6,76c8,76ca,76cd,76d2,76d6-76d7,76db-76dc,76de-76df,76e1,76e3-76e5,76e7,76ea,76ee,76f2,76f4,76f8,76fb,76fe,7701,7704,7707-7709,770b-770c,771b,771e-7720,7724-7726,7729,7737-7738,773a,773c,7740,7746-7747,775a-775b,7761,7763,7765-7766,7768,776b,7779,777e-777f,778b,778e,7791,779e,77a0,77a5,77ac-77ad,77b0,77b3,77b6,77b9,77bb-77bd,77bf,77c7,77cd,77d7,77da-77dc,77e2-77e3,77e5,77e7,77e9,77ed-77ef,77f3,77fc,7802,780c,7812,7814-7815,7820-7821,7825-7827,7832,7834,783a,783f,7845,784e,785d,7864,786b-786c,786f,7872,7874,787a,787c,7881,7886-7887,788c-788e,7891,7893,7895,7897,789a,78a3,78a7,78a9-78aa,78af,78b5,78ba,78bc,78be,78c1,78c5-78c6,78ca-78cb,78d0-78d1,78d4,78da,78e7-78e8,78ec,78ef,78f4,78fd,7901,7907,790e,7911-7912,7919,7926,792a-792c,7930,793a,793c,793e,7940-7941,7947-7949,7950,7953,7955-7957,795a,795d-7960,7962,7965,7968,796d,7977,797a,797f-7981,7984-7985,798a,798d-798f,7994,799b,799d,79a6-79a7,79aa,79ae,79b0,79b3,79b9-79ba,79bd-79c1,79c9,79cb,79d1-79d2,79d5,79d8,79df,79e1,79e3-79e4,79e6-79e7,79e9,79ec,79f0,79fb,7a00,7a08,7a0b,7a0d-7a0e,7a14,7a17-7a1a,7a1c,7a1f-7a20,7a2e,7a31-7a32,7a37,7a3b-7a40,7a42-7a43,7a46,7a49,7a4d-7a50,7a57,7a61-7a63,7a69,7a6b,7a70,7a74,7a76,7a79-7a7a,7a7d,7a7f,7a81,7a83-7a84,7a88,7a92-7a93,7a95-7a98,7a9f,7aa9-7aaa,7aae-7ab0,7ab6,7aba,7abf,7ac3-7ac5,7ac7-7ac8,7aca-7acb,7acd,7acf,7ad1-7ad3,7ad5,7ad9-7ada,7adc-7add,7adf-7ae3,7ae5-7ae7,7aea-7aeb,7aed,7aef-7af0,7af6,7af8-7afa,7aff,7b02,7b04,7b06,7b08,7b0a-7b0b,7b0f,7b11,7b18-7b19,7b1b,7b1e,7b20,7b25-7b26,7b28,7b2c,7b33,7b35-7b36,7b39,7b45-7b46,7b48-7b49,7b4b-7b4d,7b4f-7b52,7b54,7b56,7b5d,7b65,7b67,7b6c,7b6e,7b70-7b71,7b74-7b75,7b7a,7b86-7b87,7b8b,7b8d,7b8f,7b92,7b94-7b95,7b97-7b9a,7b9c-7b9f,7ba1,7baa,7bad,7bb1,7bb4,7bb8,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9,7bcb-7bcc,7bcf,7bdd,7be0,7be4-7be6,7be9,7bed,7bf3,7bf6-7bf7,7c00,7c07,7c0d,7c11-7c14,7c17,7c1f,7c21,7c23,7c27,7c2a-7c2b,7c37-7c38,7c3d-7c40,7c43,7c4c-7c4d,7c4f-7c50,7c54,7c56,7c58,7c5f-7c60,7c64-7c65,7c6c,7c73,7c75,7c7e,7c81-7c83,7c89,7c8b,7c8d,7c90,7c92,7c95,7c97-7c98,7c9b,7c9f,7ca1-7ca2,7ca4-7ca5,7ca7-7ca8,7cab,7cad-7cae,7cb1-7cb3,7cb9,7cbd-7cbe,7cc0,7cc2,7cc5,7cca,7cce,7cd2,7cd6,7cd8,7cdc,7cde-7ce0,7ce2,7ce7,7cef,7cf2,7cf4,7cf6,7cf8,7cfa-7cfb,7cfe,7d00,7d02,7d04-7d06,7d0a-7d0b,7d0d,7d10,7d14-7d15,7d17-7d1c,7d20-7d22,7d2b-7d2c,7d2e-7d30,7d32-7d33,7d35,7d39-7d3a,7d3f,7d42-7d46,7d48,7d4b-7d4c,7d4e-7d50,7d56,7d5b-7d5c,7d5e,7d61-7d63,7d66,7d68,7d6e,7d71-7d73,7d75-7d76,7d79,7d7d,7d89,7d8f,7d93,7d99-7d9c,7d9f-7da0,7da2-7da3,7dab-7db2,7db4-7db5,7db7-7db8,7dba-7dbb,7dbd-7dbf,7dc7,7dca-7dcb,7dcf,7dd1-7dd2,7dd5-7dd6,7dd8,7dda,7ddc-7dde,7de0-7de1,7de4,7de8-7de9,7dec,7def,7df2,7df4,7dfb,7e01,7e04-7e05,7e09-7e0b,7e12,7e1b,7e1e-7e1f,7e21-7e23,7e26,7e2b,7e2e,7e31-7e32,7e35,7e37,7e39-7e3b,7e3d-7e3e,7e41,7e43,7e46,7e4a-7e4b,7e4d,7e52,7e54-7e56,7e59-7e5a,7e5d-7e5e,7e66-7e67,7e69-7e6a,7e6d,7e70,7e79,7e7b-7e7d,7e7f,7e82-7e83,7e88-7e8a,7e8c,7e8e-7e90,7e92-7e94,7e96,7e9b-7e9c,7f36,7f38,7f3a,7f45,7f47,7f4c-7f4e,7f50-7f51,7f54-7f55,7f58,7f5f-7f60,7f67-7f6b,7f6e,7f70,7f72,7f75,7f77-7f79,7f82-7f83,7f85-7f88,7f8a,7f8c,7f8e,7f94,7f9a,7f9d-7f9e,7fa1,7fa3-7fa4,7fa8-7fa9,7fae-7faf,7fb2,7fb6,7fb8-7fb9,7fbd,7fc1,7fc5-7fc6,7fca,7fcc,7fd2,7fd4-7fd5,7fe0-7fe1,7fe6,7fe9,7feb,7ff0,7ff3,7ff9,7ffb-7ffc,8000-8001,8003-8006,800b-800c,8010,8012,8015,8017-8019,801c,8021,8028,8033,8036,803b,803d,803f,8046,804a,8052,8056,8058,805a,805e-805f,8061-8062,8068,806f-8070,8072-8074,8076-8077,8079,807d-807f,8084-8087,8089,808b-808c,8093,8096,8098,809a-809b,809d,80a1-80a2,80a5,80a9-80aa,80ac-80ad,80af,80b1-80b2,80b4,80ba,80c3-80c4,80c6,80cc,80ce,80d6,80d9-80db,80dd-80de,80e1,80e4-80e5,80ef,80f1,80f4,80f8,80fc-80fd,8102,8105-810a,811a-811b,8123,8129,812f,8131,8133,8139,813e,8146,814b,814e,8150-8151,8153-8155,815f,8165-8166,816b,816e,8170-8171,8174,8178-817a,817f-8180,8182-8183,8188,818a,818f,8193,8195,819a,819c-819d,81a0,81a3-81a4,81a8-81a9,81b0,81b3,81b5,81b8,81ba,81bd-81c0,81c2,81c6,81c8-81c9,81cd,81d1,81d3,81d8-81da,81df-81e0,81e3,81e5,81e7-81e8,81ea,81ed,81f3-81f4,81fa-81fc,81fe,8201-8202,8205,8207-820a,820c-820e,8210,8212,8216-8218,821b-821c,821e-821f,8229-822c,822e,8233,8235-8239,8240,8247,8258-825a,825d,825f,8262,8264,8266,8268,826a-826b,826e-826f,8271-8272,8276-8278,827e,828b,828d,8292,8299,829d,829f,82a5-82a6,82ab-82ad,82af,82b1,82b3,82b8-82b9,82bb,82bd,82c5,82d1-82d4,82d7,82d9,82db-82dc,82de-82df,82e1,82e3,82e5-82e7,82eb,82f1,82f3-82f4,82f9-82fb,8301-8306,8309,830e,8316-8318,831c,8323,8328,832b,832f,8331-8332,8334-8336,8338-8339,8340,8345,8349-834a,834f-8350,8352,8358,8362,8373,8375,8377,837b-837c,837f,8385,8387,8389-838a,838e,8393,8396,839a,839e-83a0,83a2,83a8,83aa-83ab,83b1,83b5,83bd,83c1,83c5,83c7,83ca,83cc,83ce,83d3,83d6,83d8,83dc,83df-83e0,83e9,83eb,83ef-83f2,83f4,83f6-83f7,83fb,83fd,8403-8404,8407,840b-840e,8413,8420,8422,8429-842a,842c,8431,8435,8438,843c-843d,8446,8448-8449,844e,8457,845b,8461-8463,8466,8469,846b-846f,8471,8475,8477,8479-847a,8482,8484,848b,8490,8494,8499,849c,849f,84a1,84ad,84b2,84b4,84b8-84b9,84bb-84bc,84bf,84c1,84c4,84c6,84c9-84cb,84cd,84d0-84d1,84d6,84d9-84da,84dc,84ec,84ee,84f4,84fc,84ff-8500,8506,8511,8513-8515,8517-8518,851a,851f,8521,8526,852c-852d,8535,853d,8540-8541,8543,8548-854b,854e,8553,8555,8557-855a,8563,8568-856b,856d,8577,857e,8580,8584,8587-8588,858a,8590-8591,8594,8597,8599,859b-859c,85a4,85a6,85a8-85ac,85ae-85b0,85b9-85ba,85c1,85c9,85cd,85cf-85d0,85d5,85dc-85dd,85e4-85e5,85e9-85ea,85f7,85f9-85fb,85fe,8602,8606-8607,860a-860b,8613,8616-8617,861a,8622,862d,862f-8630,863f,864d-864e,8650,8654-8655,865a,865c,865e-865f,8667,866b,8671,8679,867b,868a-868c,8693,8695,86a3-86a4,86a9-86ab,86af-86b0,86b6,86c4,86c6-86c7,86c9,86cb,86cd-86ce,86d4,86d9,86db,86de-86df,86e4,86e9,86ec-86ef,86f8-86f9,86fb,86fe,8700,8702-8703,8706,8708-870a,870d,8711-8712,8718,871a,871c,8725,8729,8734,8737,873b,873f,8749,874b-874c,874e,8753,8755,8757,8759,875f-8760,8763,8766,8768,876a,876e,8774,8776,8778,877f,8782,878d,879f,87a2,87ab,87af,87b3,87ba-87bb,87bd,87c0,87c4,87c6-87c7,87cb,87d0,87d2,87e0,87ef,87f2,87f6-87f7,87f9,87fb,87fe,8805,8807,880d-880f,8811,8815-8816,8821-8823,8827,8831,8836,8839,883b,8840,8842,8844,8846,884c-884d,8852-8853,8857,8859,885b,885d-885e,8861-8863,8868,886b,8870,8872,8875,8877,887d-887f,8881-8882,8888,888b,888d,8892,8896-8897,8899,889e,88a2,88a4,88ab,88ae,88b0-88b1,88b4-88b5,88b7,88bf,88c1-88c5,88cf,88d4-88d5,88d8-88d9,88dc-88dd,88df,88e1,88e8,88f2-88f5,88f8-88f9,88fc-88fe,8902,8904,8907,890a,890c,8910,8912-8913,891c-891e,8925,892a-892b,8936,8938,893b,8941,8943-8944,894c-894d,8956,895e-8960,8964,8966,896a,896d,896f,8972,8974,8977,897e-897f,8981,8983,8986-8988,898a-898b,898f,8993,8996-8998,899a,89a1,89a6-89a7,89a9-89aa,89ac,89af,89b2-89b3,89ba,89bd,89bf-89c0,89d2,89da,89dc-89dd,89e3,89e6-89e7,89f4,89f8,8a00,8a02-8a03,8a08,8a0a,8a0c,8a0e,8a10,8a12-8a13,8a16-8a18,8a1b,8a1d,8a1f,8a23,8a25,8a2a,8a2d,8a31,8a33-8a34,8a36-8a37,8a3a-8a3c,8a41,8a46,8a48,8a50-8a52,8a54-8a55,8a5b,8a5e,8a60,8a62-8a63,8a66,8a69,8a6b-8a6e,8a70-8a73,8a79,8a7c,8a82,8a84-8a85,8a87,8a89,8a8c-8a8d,8a91,8a93,8a95,8a98,8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aac-8aad,8ab0,8ab2,8ab9,8abc,8abe-8abf,8ac2,8ac4,8ac7,8acb-8acd,8acf,8ad2,8ad6,8ada-8adc,8ade-8ae2,8ae4,8ae6-8ae7,8aeb,8aed-8aee,8af1,8af3,8af6-8af8,8afa,8afe,8b00-8b02,8b04,8b07,8b0c,8b0e,8b10,8b14,8b16-8b17,8b19-8b1b,8b1d,8b20-8b21,8b26,8b28,8b2b-8b2c,8b33,8b39,8b3e,8b41,8b49,8b4c,8b4e-8b4f,8b53,8b56,8b58,8b5a-8b5c,8b5f,8b66,8b6b-8b6c,8b6f-8b72,8b74,8b77,8b7d,8b7f-8b80,8b83,8b8a,8b8c,8b8e,8b90,8b92-8b93,8b96,8b99-8b9a,8c37,8c3a,8c3f,8c41,8c46,8c48,8c4a,8c4c,8c4e,8c50,8c55,8c5a,8c61-8c62,8c6a-8c6c,8c78-8c7a,8c7c,8c82,8c85,8c89-8c8a,8c8c-8c8e,8c94,8c98,8c9d-8c9e,8ca0-8ca2,8ca7-8cb0,8cb2-8cb4,8cb6-8cb8,8cbb-8cbd,8cbf-8cc4,8cc7-8cc8,8cca,8ccd-8cce,8cd1,8cd3,8cda-8cdc,8cde,8ce0,8ce2-8ce4,8ce6,8cea,8ced,8cf0,8cf4,8cfa-8cfd,8d04-8d05,8d07-8d08,8d0a-8d0b,8d0d,8d0f-8d10,8d12-8d14,8d16,8d64,8d66-8d67,8d6b,8d6d,8d70-8d71,8d73-8d74,8d76-8d77,8d81,8d85,8d8a,8d99,8da3,8da8,8db3,8dba,8dbe,8dc2,8dcb-8dcc,8dcf,8dd6,8dda-8ddb,8ddd,8ddf,8de1,8de3,8de8,8dea-8deb,8def,8df3,8df5,8dfc,8dff,8e08-8e0a,8e0f-8e10,8e1d-8e1f,8e2a,8e30,8e34-8e35,8e42,8e44,8e47-8e4a,8e4c,8e50,8e55,8e59,8e5f-8e60,8e63-8e64,8e72,8e74,8e76,8e7c,8e81,8e84-8e85,8e87,8e8a-8e8b,8e8d,8e91,8e93-8e94,8e99,8ea1,8eaa-8eac,8eaf-8eb1,8ebe,8ec5-8ec6,8ec8,8eca-8ecd,8ecf,8ed2,8edb,8edf,8ee2-8ee3,8eeb,8ef8,8efb-8efe,8f03,8f05,8f09-8f0a,8f0c,8f12-8f15,8f19,8f1b-8f1d,8f1f,8f26,8f29-8f2a,8f2f,8f33,8f38-8f39,8f3b,8f3e-8f3f,8f42,8f44-8f46,8f49,8f4c-8f4e,8f57,8f5c,8f5f,8f61-8f64,8f9b-8f9c,8f9e-8f9f,8fa3,8fa7-8fa8,8fad-8fb2,8fb7,8fba-8fbc,8fbf,8fc2,8fc4-8fc5,8fce,8fd1,8fd4,8fda,8fe2,8fe5-8fe6,8fe9-8feb,8fed,8fef-8ff0,8ff4,8ff7-8ffa,8ffd,9000-9001,9003,9005-9006,900b,900d-9011,9013-9017,9019-901a,901d-9023,9027,902e,9031-9032,9035-9036,9038-9039,903c,903e,9041-9042,9045,9047,9049-904b,904d-9056,9058-9059,905c,905e,9060-9061,9063,9065,9067-9069,906d-906f,9072,9075-9078,907a,907c-907d,907f-9084,9087,9089-908a,908f,9091,90a3,90a6,90a8,90aa,90af,90b1,90b5,90b8,90c1,90ca,90ce,90db,90de,90e1-90e2,90e4,90e8,90ed,90f5,90f7,90fd,9102,9112,9115,9119,9127,912d,9130,9132,9149-914e,9152,9154,9156,9158,9162-9163,9165,9169-916a,916c,9172-9173,9175,9177-9178,9182,9187,9189,918b,918d,9190,9192,9197,919c,91a2,91a4,91aa-91ab,91af,91b4-91b5,91b8,91ba,91c0-91c1,91c6-91c9,91cb-91d1,91d6-91d8,91da-91df,91e1,91e3-91e7,91ed-91ee,91f5-91f6,91fc,91ff,9206,920a,920d-920e,9210-9211,9214-9215,921e,9229,922c,9234,9237,9239-923a,923c,923f-9240,9244-9245,9248-9249,924b,924e,9250-9251,9257,9259-925b,925e,9262,9264,9266-9267,9271,9277-9278,927e,9280,9283,9285,9288,9291,9293,9295-9296,9298,929a-929c,92a7,92ad,92b7,92b9,92cf-92d0,92d2-92d3,92d5,92d7,92d9,92e0,92e4,92e7,92e9-92ea,92ed,92f2-92f3,92f8-92fc,92ff,9302,9306,930f-9310,9318-931a,931d-931e,9320-9323,9325-9326,9328,932b-932c,932e-932f,9332,9335,933a-933b,9344,9348,934b,934d,9354,9356-9357,935b-935c,9360,936c,936e,9370,9375,937c,937e,938c,9394,9396-9397,939a,93a4,93a7,93ac-93ae,93b0,93b9,93c3,93c6,93c8,93d0-93d1,93d6-93d8,93dd-93de,93e1,93e4-93e5,93e8,93f8,9403,9407,9410,9413-9414,9418-941a,9421,942b,9431,9435-9436,9438,943a,9441,9444-9445,9448,9451-9453,945a-945b,945e,9460,9462,946a,9470,9475,9477,947c-947f,9481,9577,9580,9582-9583,9587,9589-958b,958f,9591-9594,9596,9598-9599,95a0,95a2-95a5,95a7-95a8,95ad,95b2,95b9,95bb-95bc,95be,95c3,95c7,95ca,95cc-95cd,95d4-95d6,95d8,95dc,95e1-95e2,95e5,961c,9621,9628,962a,962e-962f,9632,963b,963f-9640,9642,9644,964b-964d,964f-9650,965b-965f,9662-9666,966a,966c,9670,9672-9673,9675-9678,967a,967d,9685-9686,9688,968a-968b,968d-968f,9694-9695,9697-9699,969b-969d,96a0,96a3,96a7-96a8,96aa,96af-96b2,96b4,96b6-96b9,96bb-96bc,96c0-96c1,96c4-96c7,96c9,96cb-96ce,96d1,96d5-96d6,96d9,96db-96dc,96e2-96e3,96e8,96ea-96eb,96f0,96f2,96f6-96f7,96f9,96fb,9700,9704,9706-9708,970a,970d-970f,9711,9713,9716,9719,971c,971e,9724,9727,972a,9730,9732-9733,9738-9739,973b,973d-973e,9742-9744,9746,9748-9749,974d,974f,9751-9752,9755-9756,9759,975c,975e,9760-9762,9764,9766,9768-9769,976b,976d,9771,9774,9779-977a,977c,9781,9784-9786,978b,978d,978f-9790,9798,979c,97a0,97a3,97a6,97a8,97ab,97ad,97b3-97b4,97c3,97c6,97c8,97cb,97d3,97dc,97ed-97ee,97f2-97f3,97f5-97f6,97fb,97ff,9801-9803,9805-9806,9808,980c,980f-9813,9817-9818,981a,9821,9824,982c-982d,9834,9837-9838,983b-983d,9846,984b-984f,9854-9855,9857-9858,985b,985e,9865,9867,986b,986f-9871,9873-9874,98a8,98aa,98af,98b1,98b6,98c3-98c4,98c6,98db-98dc,98df,98e2,98e9,98eb,98ed-98ef,98f2,98f4,98fc-98fe,9903,9905,9909-990a,990c,9910,9912-9914,9918,991d-991e,9920-9921,9924,9927-9928,992c,992e,993d-993e,9942,9945,9949,994b-994c,9950-9952,9955,9957,9996-9999,999e,99a5,99a8,99ac-99ae,99b3-99b4,99bc,99c1,99c4-99c6,99c8,99d0-99d2,99d5,99d8,99db,99dd,99df,99e2,99ed-99ee,99f1-99f2,99f8,99fb,99ff,9a01,9a05,9a0e-9a0f,9a12-9a13,9a19,9a28,9a2b,9a30,9a37,9a3e,9a40,9a42-9a43,9a45,9a4d-9a4e,9a55,9a57,9a5a-9a5b,9a5f,9a62,9a64-9a65,9a69-9a6b,9aa8,9aad,9ab0,9ab8,9abc,9ac0,9ac4,9acf,9ad1,9ad3-9ad4,9ad8-9ad9,9adc,9ade-9adf,9ae2-9ae3,9ae6,9aea-9aeb,9aed-9aef,9af1,9af4,9af7,9afb,9b06,9b18,9b1a,9b1f,9b22-9b23,9b25,9b27-9b2a,9b2e-9b2f,9b31-9b32,9b3b-9b3c,9b41-9b45,9b4d-9b4f,9b51,9b54,9b58,9b5a,9b6f,9b72,9b74-9b75,9b83,9b8e-9b8f,9b91-9b93,9b96-9b97,9b9f-9ba0,9ba8,9baa-9bab,9bad-9bae,9bb1,9bb4,9bb9,9bbb,9bc0,9bc6,9bc9-9bca,9bcf,9bd1-9bd2,9bd4,9bd6,9bdb,9be1-9be4,9be8,9bf0-9bf2,9bf5,9c00,9c04,9c06,9c08-9c0a,9c0c-9c0d,9c10,9c12-9c15,9c1b,9c21,9c24-9c25,9c2d-9c30,9c32,9c39-9c3b,9c3e,9c46-9c48,9c52,9c57,9c5a,9c60,9c67,9c76,9c78,9ce5,9ce7,9ce9,9ceb-9cec,9cf0,9cf3-9cf4,9cf6,9d03,9d06-9d09,9d0e,9d12,9d15,9d1b,9d1f,9d23,9d26,9d28,9d2a-9d2c,9d3b,9d3e-9d3f,9d41,9d44,9d46,9d48,9d50-9d51,9d59,9d5c-9d5e,9d60-9d61,9d64,9d6b-9d6c,9d6f-9d70,9d72,9d7a,9d87,9d89,9d8f,9d9a,9da4,9da9,9dab,9daf,9db2,9db4,9db8,9dba-9dbb,9dc1-9dc2,9dc4,9dc6,9dcf,9dd3,9dd9,9de6,9ded,9def,9df2,9df8-9dfa,9dfd,9e19-9e1b,9e1e,9e75,9e78-9e79,9e7d,9e7f,9e81,9e88,9e8b-9e8c,9e91-9e93,9e95,9e97,9e9d,9e9f,9ea5-9ea6,9ea9-9eaa,9ead,9eb8-9ebc,9ebe-9ebf,9ec4,9ecc-9ed2,9ed4,9ed8-9ed9,9edb-9ede,9ee0,9ee5,9ee8,9eef,9ef4,9ef6-9ef7,9ef9,9efb-9efd,9f07-9f08,9f0e,9f13,9f15,9f20-9f21,9f2c,9f3b,9f3e,9f4a-9f4b,9f4e-9f4f,9f52,9f54,9f5f-9f63,9f66-9f67,9f6a,9f6c,9f72,9f76-9f77,9f8d,9f95,9f9c-9f9d,9fa0,f929,f9dc,fa0e-fa2d,ff01-ff5e,ff61-ff9f,ffe0-ffe5 +Basic Hangul:3000-303f,3131-318e,0000-007f,00a1,00a4,00a7-00a8,00aa,00ad-00ae,00b0-00b4,00b6-00ba,00bc-00bf,00c6,00d0,00d7-00d8,00de-00df,00e6,00f0,00f7-00f8,00fe,0111,0126-0127,0131-0133,0138,013f-0142,0149-014b,0152-0153,0166-0167,02c7,02d0,02d8-02db,02dd,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,0401,0410-044f,0451,2015,2018-2019,201c-201d,2020-2021,2025-2026,2030,2032-2033,203b,2074,207f,2081-2084,20ac,2103,2109,2113,2116,2121-2122,2126,212b,2153-2154,215b-215e,2160-2169,2170-2179,2190-2199,21d2,21d4,2200,2202-2203,2207-2208,220b,220f,2211,221a,221d-221e,2220,2225,2227-222c,222e,2234-2235,223c-223d,2252,2260-2261,2264-2265,226a-226b,2282-2283,2286-2287,2299,22a5,2312,2460-246e,2474-2482,249c-24b5,24d0-24e9,2500-2503,250c-2549,254b,2592,25a0-25a1,25a3-25a9,25b2-25b3,25b6-25b7,25bc-25bd,25c0-25c1,25c6-25c8,25cb,25ce-25d1,2605-2606,260e-260f,261c,261e,2640,2642,2660-2661,2663-2665,2667-266a,266c-266d,3000-3003,3008-3011,3013-3015,3131-318e,3200-321c,3260-327b,327f,3380-3384,3388-33ca,33cf-33d0,33d3,33d6,33d8,33db-33dd,ac00-ac01,ac04,ac07-ac0a,ac10-ac17,ac19-ac1d,ac20,ac24,ac2c-ac2d,ac2f-ac31,ac38-ac39,ac3c,ac40,ac4b,ac4d,ac54,ac58,ac5c,ac70-ac71,ac74,ac77-ac78,ac7a,ac80-ac81,ac83-ac86,ac89-ac8c,ac90,ac94,ac9c-ac9d,ac9f-aca1,aca8-acaa,acac,acaf-acb0,acb8-acb9,acbb-acbd,acc1,acc4,acc8,accc,acd5,acd7,ace0-ace1,ace4,ace7-ace8,acea,acec,acef-acf1,acf3,acf5-acf6,acfc-acfd,ad00,ad04,ad06,ad0c-ad0d,ad0f,ad11,ad18,ad1c,ad20,ad29,ad2c-ad2d,ad34-ad35,ad38,ad3c,ad44-ad45,ad47,ad49,ad50,ad54,ad58,ad61,ad63,ad6c-ad6d,ad70,ad73-ad76,ad7b-ad7d,ad7f,ad81-ad82,ad88-ad89,ad8c,ad90,ad9c-ad9d,ada4,adb7,adc0-adc1,adc4,adc8,add0-add1,add3,addc,ade0,ade4,adf8-adf9,adfc,adff-ae01,ae08-ae09,ae0b,ae0d,ae14,ae30-ae31,ae34,ae37-ae38,ae3a,ae40-ae41,ae43,ae45-ae46,ae4a,ae4c-ae4e,ae50,ae54,ae56,ae5c-ae5d,ae5f-ae61,ae65,ae68-ae69,ae6c,ae70,ae78-ae79,ae7b-ae7d,ae84-ae85,ae8c,aebc-aebe,aec0,aec4,aecc-aecd,aecf-aed1,aed8-aed9,aedc,aee8,aeeb,aeed,aef4,aef8,aefc,af07-af08,af0d,af10,af2c-af2d,af30,af32,af34,af3c-af3d,af3f,af41-af43,af48-af49,af50,af5c-af5d,af64-af65,af79,af80,af84,af88,af90-af91,af95,af9c,afb8-afb9,afbc,afc0,afc7-afc9,afcb,afcd-afce,afd4,afdc,afe8-afe9,aff0-aff1,aff4,aff8,b000-b001,b004,b00c,b010,b014,b01c-b01d,b028,b044-b045,b048,b04a,b04c,b04e,b053-b055,b057,b059,b05d,b07c-b07d,b080,b084,b08c-b08d,b08f,b091,b098-b09a,b09c,b09f-b0a2,b0a8-b0a9,b0ab-b0af,b0b1,b0b3-b0b5,b0b8,b0bc,b0c4-b0c5,b0c7-b0c9,b0d0-b0d1,b0d4,b0d8,b0e0,b0e5,b108-b109,b10b-b10c,b110,b112-b113,b118-b119,b11b-b11d,b123-b125,b128,b12c,b134-b135,b137-b139,b140-b141,b144,b148,b150-b151,b154-b155,b158,b15c,b160,b178-b179,b17c,b180,b182,b188-b189,b18b,b18d,b192-b194,b198,b19c,b1a8,b1cc,b1d0,b1d4,b1dc-b1dd,b1df,b1e8-b1e9,b1ec,b1f0,b1f9,b1fb,b1fd,b204-b205,b208,b20b-b20c,b214-b215,b217,b219,b220,b234,b23c,b258,b25c,b260,b268-b269,b274-b275,b27c,b284-b285,b289,b290-b291,b294,b298-b29a,b2a0-b2a1,b2a3,b2a5-b2a6,b2aa,b2ac,b2b0,b2b4,b2c8-b2c9,b2cc,b2d0,b2d2,b2d8-b2d9,b2db,b2dd,b2e2,b2e4-b2e6,b2e8,b2eb-b2ef,b2f3-b2f5,b2f7-b2fb,b2ff-b301,b304,b308,b310-b311,b313-b315,b31c,b354-b356,b358,b35b-b35c,b35e-b35f,b364-b365,b367,b369,b36b,b36e,b370-b371,b374,b378,b380-b381,b383-b385,b38c,b390,b394,b3a0-b3a1,b3a8,b3ac,b3c4-b3c5,b3c8,b3cb-b3cc,b3ce,b3d0,b3d4-b3d5,b3d7,b3d9,b3db,b3dd,b3e0,b3e4,b3e8,b3fc,b410,b418,b41c,b420,b428-b429,b42b,b434,b450-b451,b454,b458,b460-b461,b463,b465,b46c,b480,b488,b49d,b4a4,b4a8,b4ac,b4b5,b4b7,b4b9,b4c0,b4c4,b4c8,b4d0,b4d5,b4dc-b4dd,b4e0,b4e3-b4e4,b4e6,b4ec-b4ed,b4ef,b4f1,b4f8,b514-b515,b518,b51b-b51c,b524-b525,b527-b52a,b530-b531,b534,b538,b540-b541,b543-b545,b54b-b54d,b550,b554,b55c-b55d,b55f-b561,b5a0-b5a1,b5a4,b5a8,b5aa-b5ab,b5b0-b5b1,b5b3-b5b5,b5bb-b5bd,b5c0,b5c4,b5cc-b5cd,b5cf-b5d1,b5d8,b5ec,b610-b611,b614,b618,b625,b62c,b634,b648,b664,b668,b69c-b69d,b6a0,b6a4,b6ab-b6ac,b6b1,b6d4,b6f0,b6f4,b6f8,b700-b701,b705,b728-b729,b72c,b72f-b730,b738-b739,b73b,b744,b748,b74c,b754-b755,b760,b764,b768,b770-b771,b773,b775,b77c-b77d,b780,b784,b78c-b78d,b78f-b792,b796-b799,b79c,b7a0,b7a8-b7a9,b7ab-b7ad,b7b4-b7b5,b7b8,b7c7,b7c9,b7ec-b7ed,b7f0,b7f4,b7fc-b7fd,b7ff-b801,b807-b809,b80c,b810,b818-b819,b81b,b81d,b824-b825,b828,b82c,b834-b835,b837-b839,b840,b844,b851,b853,b85c-b85d,b860,b864,b86c-b86d,b86f,b871,b878,b87c,b88d,b8a8,b8b0,b8b4,b8b8,b8c0-b8c1,b8c3,b8c5,b8cc,b8d0,b8d4,b8dd,b8df,b8e1,b8e8-b8e9,b8ec,b8f0,b8f8-b8f9,b8fb,b8fd,b904,b918,b920,b93c-b93d,b940,b944,b94c,b94f,b951,b958-b959,b95c,b960,b968-b969,b96b,b96d,b974-b975,b978,b97c,b984-b985,b987,b989-b98a,b98d-b98e,b9ac-b9ad,b9b0,b9b4,b9bc-b9bd,b9bf,b9c1,b9c8-b9c9,b9cc,b9ce-b9d2,b9d8-b9d9,b9db,b9dd-b9de,b9e1,b9e3-b9e5,b9e8,b9ec,b9f4-b9f5,b9f7-b9fa,ba00-ba01,ba08,ba15,ba38-ba39,ba3c,ba40,ba42,ba48-ba49,ba4b,ba4d-ba4e,ba53-ba55,ba58,ba5c,ba64-ba65,ba67-ba69,ba70-ba71,ba74,ba78,ba83-ba85,ba87,ba8c,baa8-baa9,baab-baac,bab0,bab2,bab8-bab9,babb,babd,bac4,bac8,bad8-bad9,bafc,bb00,bb04,bb0d,bb0f,bb11,bb18,bb1c,bb20,bb29,bb2b,bb34-bb36,bb38,bb3b-bb3e,bb44-bb45,bb47,bb49,bb4d,bb4f-bb50,bb54,bb58,bb61,bb63,bb6c,bb88,bb8c,bb90,bba4,bba8,bbac,bbb4,bbb7,bbc0,bbc4,bbc8,bbd0,bbd3,bbf8-bbf9,bbfc,bbff-bc00,bc02,bc08-bc09,bc0b-bc0d,bc0f,bc11,bc14-bc18,bc1b-bc1f,bc24-bc25,bc27,bc29,bc2d,bc30-bc31,bc34,bc38,bc40-bc41,bc43-bc45,bc49,bc4c-bc4d,bc50,bc5d,bc84-bc85,bc88,bc8b-bc8c,bc8e,bc94-bc95,bc97,bc99-bc9a,bca0-bca1,bca4,bca7-bca8,bcb0-bcb1,bcb3-bcb5,bcbc-bcbd,bcc0,bcc4,bccd,bccf-bcd1,bcd5,bcd8,bcdc,bcf4-bcf6,bcf8,bcfc,bd04-bd05,bd07,bd09,bd10,bd14,bd24,bd2c,bd40,bd48-bd49,bd4c,bd50,bd58-bd59,bd64,bd68,bd80-bd81,bd84,bd87-bd8a,bd90-bd91,bd93,bd95,bd99-bd9a,bd9c,bda4,bdb0,bdb8,bdd4-bdd5,bdd8,bddc,bde9,bdf0,bdf4,bdf8,be00,be03,be05,be0c-be0d,be10,be14,be1c-be1d,be1f,be44-be45,be48,be4c,be4e,be54-be55,be57,be59-be5b,be60-be61,be64,be68,be6a,be70-be71,be73-be75,be7b-be7d,be80,be84,be8c-be8d,be8f-be91,be98-be99,bea8,bed0-bed1,bed4,bed7-bed8,bee0,bee3-bee5,beec,bf01,bf08-bf09,bf18-bf19,bf1b-bf1d,bf40-bf41,bf44,bf48,bf50-bf51,bf55,bf94,bfb0,bfc5,bfcc-bfcd,bfd0,bfd4,bfdc,bfdf,bfe1,c03c,c051,c058,c05c,c060,c068-c069,c090-c091,c094,c098,c0a0-c0a1,c0a3,c0a5,c0ac-c0ad,c0af-c0b0,c0b3-c0b6,c0bc-c0bd,c0bf-c0c1,c0c5,c0c8-c0c9,c0cc,c0d0,c0d8-c0d9,c0db-c0dd,c0e4-c0e5,c0e8,c0ec,c0f4-c0f5,c0f7,c0f9,c100,c104,c108,c110,c115,c11c-c120,c123-c124,c126-c127,c12c-c12d,c12f-c131,c136,c138-c139,c13c,c140,c148-c149,c14b-c14d,c154-c155,c158,c15c,c164-c165,c167-c169,c170,c174,c178,c185,c18c-c18e,c190,c194,c196,c19c-c19d,c19f,c1a1,c1a5,c1a8-c1a9,c1ac,c1b0,c1bd,c1c4,c1c8,c1cc,c1d4,c1d7-c1d8,c1e0,c1e4,c1e8,c1f0-c1f1,c1f3,c1fc-c1fd,c200,c204,c20c-c20d,c20f,c211,c218-c219,c21c,c21f-c220,c228-c229,c22b,c22d,c22f,c231-c232,c234,c248,c250-c251,c254,c258,c260,c265,c26c-c26d,c270,c274,c27c-c27d,c27f,c281,c288-c289,c290,c298,c29b,c29d,c2a4-c2a5,c2a8,c2ac-c2ad,c2b4-c2b5,c2b7,c2b9,c2dc-c2dd,c2e0,c2e3-c2e4,c2eb-c2ed,c2ef,c2f1,c2f6,c2f8-c2f9,c2fb-c2fc,c300,c308-c309,c30c-c30d,c313-c315,c318,c31c,c324-c325,c328-c329,c345,c368-c369,c36c,c370,c372,c378-c379,c37c-c37d,c384,c388,c38c,c3c0,c3d8-c3d9,c3dc,c3df-c3e0,c3e2,c3e8-c3e9,c3ed,c3f4-c3f5,c3f8,c408,c410,c424,c42c,c430,c434,c43c-c43d,c448,c464-c465,c468,c46c,c474-c475,c479,c480,c494,c49c,c4b8,c4bc,c4e9,c4f0-c4f1,c4f4,c4f8,c4fa,c4ff-c501,c50c,c510,c514,c51c,c528-c529,c52c,c530,c538-c539,c53b,c53d,c544-c545,c548-c54a,c54c-c54e,c553-c555,c557-c559,c55d-c55e,c560-c561,c564,c568,c570-c571,c573-c575,c57c-c57d,c580,c584,c587,c58c-c58d,c58f,c591,c595,c597-c598,c59c,c5a0,c5a9,c5b4-c5b5,c5b8-c5b9,c5bb-c5be,c5c4-c5ca,c5cc,c5ce,c5d0-c5d1,c5d4,c5d8,c5e0-c5e1,c5e3,c5e5,c5ec-c5ee,c5f0,c5f4,c5f6-c5f7,c5fc-c601,c605-c608,c60c,c610,c618-c619,c61b-c61c,c624-c625,c628,c62c-c62e,c630,c633-c635,c637,c639,c63b,c640-c641,c644,c648,c650-c651,c653-c655,c65c-c65d,c660,c66c,c66f,c671,c678-c679,c67c,c680,c688-c689,c68b,c68d,c694-c695,c698,c69c,c6a4-c6a5,c6a7,c6a9,c6b0-c6b1,c6b4,c6b8-c6ba,c6c0-c6c1,c6c3,c6c5,c6cc-c6cd,c6d0,c6d4,c6dc-c6dd,c6e0-c6e1,c6e8-c6e9,c6ec,c6f0,c6f8-c6f9,c6fd,c704-c705,c708,c70c,c714-c715,c717,c719,c720-c721,c724,c728,c730-c731,c733,c735,c737,c73c-c73d,c740,c744,c74a,c74c-c74d,c74f,c751-c758,c75c,c760,c768,c76b,c774-c775,c778,c77c-c77e,c783-c785,c787-c78a,c78e,c790-c791,c794,c796-c798,c79a,c7a0-c7a1,c7a3-c7a6,c7ac-c7ad,c7b0,c7b4,c7bc-c7bd,c7bf-c7c1,c7c8-c7c9,c7cc,c7ce,c7d0,c7d8,c7dd,c7e4,c7e8,c7ec,c800-c801,c804,c808,c80a,c810-c811,c813,c815-c816,c81c-c81d,c820,c824,c82c-c82d,c82f,c831,c838,c83c,c840,c848-c849,c84c-c84d,c854,c870-c871,c874,c878,c87a,c880-c881,c883,c885-c887,c88b-c88d,c894,c89d,c89f,c8a1,c8a8,c8bc-c8bd,c8c4,c8c8,c8cc,c8d4-c8d5,c8d7,c8d9,c8e0-c8e1,c8e4,c8f5,c8fc-c8fd,c900,c904-c906,c90c-c90d,c90f,c911,c918,c92c,c934,c950-c951,c954,c958,c960-c961,c963,c96c,c970,c974,c97c,c988-c989,c98c,c990,c998-c999,c99b,c99d,c9c0-c9c1,c9c4,c9c7-c9c8,c9ca,c9d0-c9d1,c9d3,c9d5-c9d6,c9d9-c9da,c9dc-c9dd,c9e0,c9e2,c9e4,c9e7,c9ec-c9ed,c9ef-c9f1,c9f8-c9f9,c9fc,ca00,ca08-ca09,ca0b-ca0d,ca14,ca18,ca29,ca4c-ca4d,ca50,ca54,ca5c-ca5d,ca5f-ca61,ca68,ca7d,ca84,ca98,cabc-cabd,cac0,cac4,cacc-cacd,cacf,cad1,cad3,cad8-cad9,cae0,caec,caf4,cb08,cb10,cb14,cb18,cb20-cb21,cb41,cb48-cb49,cb4c,cb50,cb58-cb59,cb5d,cb64,cb78-cb79,cb9c,cbb8,cbd4,cbe4,cbe7,cbe9,cc0c-cc0d,cc10,cc14,cc1c-cc1d,cc21-cc22,cc27-cc29,cc2c,cc2e,cc30,cc38-cc39,cc3b-cc3e,cc44-cc45,cc48,cc4c,cc54-cc55,cc57-cc59,cc60,cc64,cc66,cc68,cc70,cc75,cc98-cc99,cc9c,cca0,cca8-cca9,ccab-ccad,ccb4-ccb5,ccb8,ccbc,ccc4-ccc5,ccc7,ccc9,ccd0,ccd4,cce4,ccec,ccf0,cd01,cd08-cd09,cd0c,cd10,cd18-cd19,cd1b,cd1d,cd24,cd28,cd2c,cd39,cd5c,cd60,cd64,cd6c-cd6d,cd6f,cd71,cd78,cd88,cd94-cd95,cd98,cd9c,cda4-cda5,cda7,cda9,cdb0,cdc4,cdcc,cdd0,cde8,cdec,cdf0,cdf8-cdf9,cdfb,cdfd,ce04,ce08,ce0c,ce14,ce19,ce20-ce21,ce24,ce28,ce30-ce31,ce33,ce35,ce58-ce59,ce5c,ce5f-ce61,ce68-ce69,ce6b,ce6d,ce74-ce75,ce78,ce7c,ce84-ce85,ce87,ce89,ce90-ce91,ce94,ce98,cea0-cea1,cea3-cea5,ceac-cead,cec1,cee4-cee5,cee8,ceeb-ceec,cef4-cef5,cef7-cef9,cf00-cf01,cf04,cf08,cf10-cf11,cf13,cf15,cf1c,cf20,cf24,cf2c-cf2d,cf2f-cf31,cf38,cf54-cf55,cf58,cf5c,cf64-cf65,cf67,cf69,cf70-cf71,cf74,cf78,cf80,cf85,cf8c,cfa1,cfa8,cfb0,cfc4,cfe0-cfe1,cfe4,cfe8,cff0-cff1,cff3,cff5,cffc,d000,d004,d011,d018,d02d,d034-d035,d038,d03c,d044-d045,d047,d049,d050,d054,d058,d060,d06c-d06d,d070,d074,d07c-d07d,d081,d0a4-d0a5,d0a8,d0ac,d0b4-d0b5,d0b7,d0b9,d0c0-d0c1,d0c4,d0c8-d0c9,d0d0-d0d1,d0d3-d0d5,d0dc-d0dd,d0e0,d0e4,d0ec-d0ed,d0ef-d0f1,d0f8,d10d,d130-d131,d134,d138,d13a,d140-d141,d143-d145,d14c-d14d,d150,d154,d15c-d15d,d15f,d161,d168,d16c,d17c,d184,d188,d1a0-d1a1,d1a4,d1a8,d1b0-d1b1,d1b3,d1b5,d1ba,d1bc,d1c0,d1d8,d1f4,d1f8,d207,d209,d210,d22c-d22d,d230,d234,d23c-d23d,d23f,d241,d248,d25c,d264,d280-d281,d284,d288,d290-d291,d295,d29c,d2a0,d2a4,d2ac,d2b1,d2b8-d2b9,d2bc,d2bf-d2c0,d2c2,d2c8-d2c9,d2cb,d2d4,d2d8,d2dc,d2e4-d2e5,d2f0-d2f1,d2f4,d2f8,d300-d301,d303,d305,d30c-d30e,d310,d314,d316,d31c-d31d,d31f-d321,d325,d328-d329,d32c,d330,d338-d339,d33b-d33d,d344-d345,d37c-d37d,d380,d384,d38c-d38d,d38f-d391,d398-d399,d39c,d3a0,d3a8-d3a9,d3ab,d3ad,d3b4,d3b8,d3bc,d3c4-d3c5,d3c8-d3c9,d3d0,d3d8,d3e1,d3e3,d3ec-d3ed,d3f0,d3f4,d3fc-d3fd,d3ff,d401,d408,d41d,d440,d444,d45c,d460,d464,d46d,d46f,d478-d479,d47c,d47f-d480,d482,d488-d489,d48b,d48d,d494,d4a9,d4cc,d4d0,d4d4,d4dc,d4df,d4e8,d4ec,d4f0,d4f8,d4fb,d4fd,d504,d508,d50c,d514-d515,d517,d53c-d53d,d540,d544,d54c-d54d,d54f,d551,d558-d559,d55c,d560,d565,d568-d569,d56b,d56d,d574-d575,d578,d57c,d584-d585,d587-d589,d590,d5a5,d5c8-d5c9,d5cc,d5d0,d5d2,d5d8-d5d9,d5db,d5dd,d5e4-d5e5,d5e8,d5ec,d5f4-d5f5,d5f7,d5f9,d600-d601,d604,d608,d610-d611,d613-d615,d61c,d620,d624,d62d,d638-d639,d63c,d640,d645,d648-d649,d64b,d64d,d651,d654-d655,d658,d65c,d667,d669,d670-d671,d674,d683,d685,d68c-d68d,d690,d694,d69d,d69f,d6a1,d6a8,d6ac,d6b0,d6b9,d6bb,d6c4-d6c5,d6c8,d6cc,d6d1,d6d4,d6d7,d6d9,d6e0,d6e4,d6e8,d6f0,d6f5,d6fc-d6fd,d700,d704,d711,d718-d719,d71c,d720,d728-d729,d72b,d72d,d734-d735,d738,d73c,d744,d747,d749,d750-d751,d754,d756-d759,d760-d761,d763,d765,d769,d76c,d770,d774,d77c-d77d,d781,d788-d789,d78c,d790,d798-d799,d79b,d79d,ff01-ff5e,ffe0-ffe3,ffe5-ffe6 +Hangul (All):0020-007e,1100-11f9,3000-303f,3131-318e,327f,ac00-d7a3,ff01-ff60 +Traditional Chinese - Level 1:0085,3000-301e,4e00-4e01,4e03,4e08-4e0b,4e0d,4e10-4e11,4e14-4e16,4e18-4e19,4e1e-4e1f,4e26,4e2b,4e2d,4e30,4e32,4e38-4e39,4e3b,4e43,4e45,4e48,4e4b,4e4d-4e4f,4e52-4e53,4e56,4e58-4e59,4e5d-4e5f,4e69,4e73,4e7e,4e82,4e86,4e88,4e8b-4e8c,4e8e,4e91-4e92,4e94-4e95,4e99,4e9b,4e9e-4e9f,4ea1-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb3,4eba,4ec0-4ec1,4ec3-4ec4,4ec6-4ec7,4eca-4ecb,4ecd,4ed4-4ed9,4ede-4edf,4ee3-4ee5,4ef0,4ef2-4ef3,4ef6,4efb,4efd,4eff,4f01,4f09-4f0b,4f0d,4f0f-4f11,4f15,4f19,4f2f-4f30,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46-4f48,4f4d-4f51,4f54-4f55,4f57,4f59-4f5e,4f60,4f63,4f69,4f6c,4f6f-4f70,4f73,4f75,4f7a-4f7b,4f7e-4f7f,4f83,4f86,4f88,4f8b,4f8d,4f8f,4f91,4f96,4f9b,4f9d,4fae-4faf,4fb5-4fb7,4fbf,4fc2-4fc4,4fca,4fce-4fd1,4fd7-4fd8,4fda,4fdd-4fe1,4fee-4fef,4ff1,4ff3,4ff8,4ffa,4ffe,5000,5006,5009,500b-500d,500f,5011-5012,5014,5016,5018-501a,501f,5021,5023,5025-5026,5028-502b,502d,503c,5043,5047,5049,504c,504e-504f,5055,505a,505c,5065,506d,506f,5074-5077,507a,507d,5080,5085,508d,5091,5096,5098-509a,50a2,50ac-50ad,50af,50b2-50b3,50b5,50b7,50bb,50be,50c5,50c7,50ce-50cf,50d1,50d5-50d6,50da,50e5,50e7,50e9,50ed-50ee,50f1,50f5,50f9,50fb,5100,5102,5104-5105,5108-5109,5110,5112,5114-5115,5118,511f,5121,512a,5132-5133,5137-5138,513b-513c,513f-5141,5143-5149,514b-514d,5152,5154-5155,5157,515c,5162,5165,5167-5169,516b-516e,5171,5175-5178,517c,5180,5189-518a,518d,5191-5192,5195,5197,51a0,51a2,51a4-51a5,51aa,51ac,51b0,51b6-51b7,51bd,51c6,51cb-51cd,51dc-51dd,51e0-51e1,51f0-51f1,51f3,51f6,51f8-51fa,51fd,5200-5201,5203,5206-5208,520a,520e,5211-5212,5216-5217,521d,5224-5225,5228-522a,522e,5230,5236-5238,523a-523b,5241,5243,5247,524a-524e,5254,5256,525b-525d,5269-526a,526f,5272,5274-5275,5277,527d,527f,5282-5283,5287-528a,528d,5291,5293,529b,529f-52a0,52a3,52a9-52ac,52bb,52be,52c1,52c3,52c7,52c9,52d2,52d5,52d7-52d9,52db,52dd-52df,52e2-52e4,52e6,52f0,52f3,52f5,52f8,52fa-52fb,52fe-52ff,5305-5306,5308,530d,530f-5310,5315-5317,5319,531d,5320-5321,5323,532a,532f,5331,5339,533e-5341,5343,5345,5347-534a,5351-5354,5357,535a,535c,535e,5360-5361,5366,536e-5371,5373,5375,5377-5379,537b,537f,5384,539a,539d,539f,53a5,53ad,53b2,53bb,53c3,53c8-53cb,53cd,53d4,53d6-53d7,53db,53df,53e2-53e6,53e8-53f3,53f5,53f8,53fb-53fc,5401,5403-5404,5406,5408-5412,541b,541d-5420,5426-5427,5429,542b-542e,5431,5433,5435-5436,5438-5439,543b-543c,543e,5440,5442-5443,5446,5448,544a,544e,5462,5468,5471,5473,5475-5478,547b-547d,5480,5484,5486,548b-548c,548e,5490,5492,5495-5496,549a,54a6-54ac,54af,54b1,54b3,54b8,54bb,54bd,54bf-54c2,54c4,54c7-54c9,54ce,54e1,54e5-54e6,54e8-54ea,54ed-54ee,54f2,54fa,54fc-54fd,5501,5506-5507,5509,550f-5510,5514,5527,552c,552e-552f,5531,5533,5537-5538,553e,5541,5543-5544,5546,554a,554f,5555-5557,555c,555e-555f,5561,5563-5564,5566,556a,557b-557c,557e,5580,5582-5584,5587,5589-558b,5594,5598-559a,559c-559d,559f,55a7,55aa-55ac,55ae,55b1-55b3,55bb,55c5-55c7,55c9,55ce,55d1,55d3,55da,55dc,55df,55e1,55e3-55e6,55e8,55ef,55f6-55f7,55fd-55fe,5600,5606,5608-5609,560d-560e,5610,5614,5616-5617,561b,561f,5629,562e-5630,5632,5634,5636,5639,563b,563f,564e,5653,5657,5659,5662,5664-5665,5668-566c,566f,5671,5674,5676,5678-5679,5680,5685,5687,568e-5690,5695,56a5,56a8,56ae,56b4,56b6-56b7,56bc,56c0-56c2,56c8-56ca,56cc,56d1,56da-56db,56dd-56de,56e0,56e4,56ea-56eb,56f0,56fa,56ff,5703-5704,5708-5709,570b,570d,5712-5713,5716,5718,571f,5728-5729,572c-572d,572f-5730,5733,573b,573e,5740,5747,574a,574d-5751,5761,5764,5766,5769-576a,5777,577c,5782-5783,578b,5793,57a0,57a2-57a3,57ae,57c2-57c3,57cb,57ce,57d4,57df-57e0,57e4,57f7,57f9-57fa,5802,5805-5806,5809-580a,581d,5820-5821,5824,582a,582f-5831,5834-5835,584a-584c,5851-5852,5854,5857-5858,585a,585e,5862,586b,586d,5875,5879,587d-587e,5880,5883,5885,588a,5893,589c,589e-589f,58a6,58a8-58a9,58ae,58b3,58be,58c1,58c5,58c7,58ce,58d1,58d3,58d5,58d8-58d9,58de-58df,58e2,58e4,58e9,58eb-58ec,58ef,58f9-58fa,58fd,590f,5914-5916,5919-591a,591c,5920,5922,5924-5925,5927,5929-592b,592d-592e,5931,5937-5938,593e,5944,5947-5949,594e-5951,5954-5955,5957-5958,595a,5960,5962,5967,5969-596a,596d-596e,5973-5974,5976,5978-5979,597d,5981-5984,598a,598d,5992-5993,5996,5999,599d-599e,59a3-59a5,59a8,59ae-59af,59b3,59b9,59bb,59be,59c5-59c6,59ca-59cb,59cd,59d0-59d4,59d8,59da,59dc,59e3,59e5-59e6,59e8,59ea,59ec,59fb,59ff,5a01,5a03,5a09,5a0c,5a11,5a13,5a18,5a1b-5a1c,5a1f-5a20,5a23,5a25,5a29,5a36,5a3c,5a40-5a41,5a46,5a49-5a4a,5a5a,5a62,5a66,5a6a,5a77,5a7f,5a92,5a9a-5a9b,5aa7,5ab2-5ab3,5abc-5abe,5ac1-5ac2,5ac9,5acc,5ad6-5ad8,5ae1,5ae3,5ae6,5ae9,5af5,5afb,5b08-5b09,5b0b-5b0c,5b1d,5b24,5b2a,5b30,5b34,5b38,5b40,5b43,5b50-5b51,5b53-5b55,5b57-5b58,5b5a-5b5d,5b5f,5b63-5b64,5b69,5b6b,5b70-5b71,5b73,5b75,5b78,5b7a,5b7d,5b7f,5b83,5b85,5b87-5b89,5b8b-5b8c,5b8f,5b97-5b9c,5ba2-5ba6,5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf,5bc2,5bc4-5bc7,5bcc,5bd0,5bd2-5bd3,5bde-5bdf,5be1-5be2,5be4-5be9,5beb-5bec,5bee,5bf0,5bf5-5bf6,5bf8,5bfa,5c01,5c04,5c07-5c0b,5c0d-5c0f,5c11,5c16,5c1a,5c22,5c24,5c2c,5c31,5c37-5c3a,5c3c,5c3e-5c41,5c45-5c46,5c48,5c4b,5c4d-5c51,5c55,5c58,5c5c-5c5d,5c60,5c62,5c64-5c65,5c68,5c6c,5c6f,5c71,5c79,5c8c,5c90-5c91,5c94,5ca1,5ca9,5cab,5cb1,5cb3,5cb7-5cb8,5cd2,5cd9,5ce8,5cea,5ced,5cf0,5cf4,5cf6,5cfb,5cfd,5d01,5d06-5d07,5d0e,5d11,5d14,5d16-5d17,5d19,5d1b,5d22,5d24,5d27,5d29,5d34,5d47,5d4c,5d50,5d69,5d6f,5d84,5d87,5d94,5d9d,5db8,5dba,5dbc-5dbd,5dc9,5dcd,5dd2,5dd4,5dd6,5ddd-5dde,5de1-5de2,5de5-5de8,5deb,5dee,5df1-5df4,5df7,5dfd-5dfe,5e02-5e03,5e06,5e0c,5e11,5e15-5e16,5e18,5e1a-5e1b,5e1d,5e1f,5e25,5e2b,5e2d,5e33,5e36-5e38,5e3d,5e40,5e43,5e45,5e4c,5e54-5e55,5e57,5e5b,5e5f,5e61-5e63,5e6b,5e72-5e74,5e76,5e78-5e79,5e7b-5e7e,5e87,5e8a,5e8f,5e95-5e97,5e9a,5e9c,5ea0,5ea6-5ea7,5eab,5ead,5eb5-5eb8,5ebe,5ec1-5ec2,5ec4,5ec8-5eca,5ed3,5ed6,5eda,5edd,5edf-5ee0,5ee2-5ee3,5eec,5ef3,5ef6-5ef7,5efa,5efe-5eff,5f01,5f04,5f08,5f0a-5f0b,5f0f,5f12-5f15,5f17-5f18,5f1b,5f1f,5f26-5f27,5f29,5f2d,5f31,5f35,5f37,5f3c,5f46,5f48,5f4a,5f4c,5f4e,5f57,5f59,5f5d,5f62,5f64-5f65,5f69-5f6d,5f70-5f71,5f77,5f79,5f7c,5f7f-5f81,5f85,5f87-5f8c,5f90-5f92,5f97-5f99,5f9c,5f9e,5fa0-5fa1,5fa8-5faa,5fac,5fae,5fb5,5fb7,5fb9,5fbd,5fc3,5fc5,5fcc-5fcd,5fd6-5fd9,5fdd,5fe0,5fea-5feb,5ff1,5ff5,5ff8,5ffd,5fff,600e-600f,6012,6014-6016,601b,601d,6020-6021,6025,6027-602b,602f,6035,6043,6046,604d,6050,6055,6059,6062-6065,6068-606d,606f-6070,607f,6084-6085,6089,608c-608d,6094,6096,609a,609f-60a0,60a3,60a8,60b2,60b4-60b6,60b8,60bb-60bd,60c5-60c7,60cb,60d1,60d5,60d8,60da,60dc,60df-60e1,60e6,60f0-60f1,60f3-60f4,60f6,60f9-60fb,6100-6101,6106,6108-6109,610d-610f,6112,6115,611a-611c,611f,6123,6127,6134,6137,613e-613f,6144,6147-6148,614b-614e,6155,6158,615a,615d,615f,6162-6163,6167-6168,616b,616e,6170,6175-6177,617c,617e,6182,618a,618e,6190-6191,6194,619a,61a4,61a7,61a9,61ab-61ac,61ae,61b2,61b6,61be,61c2,61c7-61cb,61cd,61e3,61e6,61f2,61f5-61f8,61fa,61fc,61fe-6200,6208,620a,620c-620e,6210-6212,6215-6216,621a-621b,621f,6221-6222,622a,622e,6230,6232-6234,6236,623e-6241,6247-6249,624b,624d-624e,6251-6254,6258,625b,6263,626d-626f,6273,6276,6279,627c,627e-6280,6284,6286,6289-628a,6291-6293,6295-6298,62a8,62ab-62ac,62b1,62b5,62b9,62bc-62bd,62bf,62c2,62c4,62c6-62c9,62cb-62ce,62d0,62d2-62d4,62d6-62dc,62ec-62ef,62f1,62f3-62f4,62f7,62fc-62ff,6301-6302,6307-6309,6311,6316,6328,632a-632b,632f,633a,633d-633e,6342,6346,6349,634c-6350,6355,6367-6369,636b,6371-6372,6376-6377,637a-637b,6380,6383-6384,6388-6389,638c,638f,6392,6396,6398-6399,639b,63a0-63a3,63a5,63a7-63aa,63ac,63c0,63c6,63c9,63cd,63cf-63d0,63d2,63d6,63da-63db,63e1,63e3,63e9-63ea,63ed-63ee,63f4,63f9,6406,640d,640f,6413-6414,6416-6417,641c,641e,642a,642c-642d,6434,6436,643d-643e,6451-6452,6454,6458,645f,6467,6469,646d,646f,6478-647b,6487-6488,6490,6492-6493,6495,6499-649a,649e,64a2,64a4-64a5,64a9,64ab-64ae,64b0,64b2-64b3,64bb-64bc,64be-64bf,64c1-64c2,64c4-64c5,64c7,64ca-64cb,64cd-64ce,64d2,64d4,64d8,64da,64e0,64e2,64e6,64ec-64ed,64f0-64f2,64f4,64f7,64fa-64fb,64fe,6500,6506,650f,6514,6518-6519,651c-651d,6523-6524,652a-652c,652f,6536,6538-6539,653b,653e-653f,6545,6548-6549,654f,6551,6554-6559,655d-655e,6562-6563,6566,656c,6572,6574-6575,6577-6578,6582-6583,6587,6590-6591,6595,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65ab-65ac,65af-65b0,65b7,65b9,65bc-65bd,65c1,65c5,65cb-65cc,65ce-65cf,65d6-65d7,65e2,65e5-65e6,65e8-65e9,65ec-65ed,65f1,65fa,6600,6602,6606-6607,660a,660c,660e-660f,6613-6615,661f-6620,6624-6625,6627-6628,662d,662f,6631,6641-6643,6645,6649,664c,664f,6652,665a,665d-665e,6664,6666,6668,666e-6670,6674,6676-6677,667a,667e,6684,6687-6689,668d,6691,6696-6698,669d,66a2,66a8,66ab,66ae,66b1,66b4,66b8-66b9,66c4,66c6-66c7,66c9,66d6,66d9,66dc-66dd,66e0,66e6,66e9,66ec,66f0,66f2-66f4,66f7-66f9,66fc,66fe-6700,6703,6708-6709,670b,670d,6714-6715,6717,671b,671d,671f,6726-6728,672a-672e,6731,6734-6735,673d,6746,6749,674e-6751,6753,6756-6757,675c,675e-6760,676a,676d,676f-6773,6775,6777,677c,677e-677f,6787,6789,678b,6790,6793,6795,6797,679a,679c-679d,67af-67b0,67b4,67b6,67b8,67c4,67cf-67d4,67d9-67da,67dd-67de,67e2,67e5,67e9,67ec,67ef,67f1,67f3-67f5,67ff,6813,6817-6818,6821,6829-682a,6838-6839,683c-683d,6840-6843,6845-6846,6848,684c,6850-6851,6853-6854,6876,687f,6881-6883,6885-6886,6893-6894,6897,689d,689f,68a1-68a2,68a7-68a8,68ad,68af-68b1,68b3,68b5,68c4,68c9,68cb,68cd,68d2,68d5,68d7-68d8,68da,68df-68e0,68e3,68e7,68ee,68f2,68f5,68f9-68fb,6905,690d-690e,6912,6930,694a,6953-6954,695a-695b,695d-695e,6960,6963,6968,696b,696d-696e,6975,6977,6979,6982,6986,6994-6995,699b-699c,69a3,69a6,69a8,69ab,69ad-69ae,69b4,69b7,69bb,69c1,69c3,69cb-69cd,69d0,69d3,69e8,69ed,69f3,69fd,6a01-6a02,6a05,6a0a,6a11,6a13,6a19,6a1e-6a1f,6a21,6a23,6a35,6a38-6a3a,6a3d,6a44,6a47-6a48,6a4b,6a58-6a59,6a5f,6a61-6a62,6a6b,6a7e,6a80,6a84,6a90,6a94,6a97,6a9c,6aa0,6aa2-6aa3,6aac,6aae-6aaf,6ab3,6ab8,6abb,6ac2-6ac3,6ad3,6ada-6adb,6add,6ae5,6aec,6afa-6afb,6b04,6b0a,6b10,6b16,6b20-6b21,6b23,6b32,6b3a,6b3d-6b3e,6b47,6b49,6b4c,6b4e,6b50,6b59,6b5c,6b5f,6b61-6b67,6b6a,6b72,6b77-6b79,6b7b,6b7f,6b83,6b86,6b89-6b8a,6b96,6b98,6ba4,6bae-6baf,6bb2,6bb5,6bb7,6bba,6bbc,6bbf-6bc0,6bc5-6bc6,6bcb,6bcd,6bcf,6bd2-6bd4,6bd7,6bda-6bdb,6beb-6bec,6bef,6bfd,6c05,6c08,6c0f-6c11,6c13,6c16,6c1b,6c1f,6c23-6c24,6c26-6c28,6c2b-6c2c,6c2e-6c2f,6c33-6c34,6c38,6c3e,6c40-6c42,6c4d-6c4e,6c50,6c55,6c57,6c59,6c5b,6c5d-6c61,6c68,6c6a,6c70,6c72,6c74,6c76,6c7a,6c7d-6c7e,6c81-6c83,6c85-6c86,6c88-6c89,6c8c-6c8d,6c90,6c92,6c94,6c96,6c98-6c99,6c9b,6cab-6cac,6cae,6cb1,6cb3,6cb8-6cb9,6cbb-6cbf,6cc1,6cc4-6cc5,6cc9-6cca,6ccc,6cd3,6cd5-6cd7,6cdb-6cdc,6ce0-6ce3,6ce5,6ce8,6cef-6cf1,6cf3,6cf5,6d0b-6d0c,6d0e,6d17,6d1b,6d1e,6d25,6d27,6d29-6d2b,6d2e,6d31-6d32,6d35-6d36,6d38-6d39,6d3b,6d3d-6d3e,6d41,6d59-6d5a,6d65-6d66,6d69-6d6a,6d6c,6d6e,6d74,6d77-6d79,6d85,6d87-6d8a,6d8c,6d8e,6d93-6d95,6daa,6dae-6daf,6db2,6db5,6db8,6dbc,6dbf,6dc4-6dc7,6dcb-6dcc,6dd1-6dd2,6dd8-6dda,6dde,6de1,6de4,6de6,6de8,6dea-6dec,6dee,6df1,6df3,6df5,6df7,6df9-6dfb,6e05,6e19-6e1b,6e1d,6e20-6e21,6e23-6e26,6e2c-6e2d,6e2f,6e32,6e34,6e38,6e3a,6e3e,6e43-6e44,6e4a,6e4d-6e4e,6e54,6e56,6e58,6e5b,6e5f,6e63,6e67,6e69,6e6e-6e6f,6e72,6e89,6e90,6e96,6e98,6e9c-6e9d,6ea2,6ea5,6ea7,6eaa-6eab,6eaf,6eb4,6eb6,6eba,6ebc,6ec2,6ec4-6ec5,6ec7,6ecb-6ecc,6ed1,6ed3-6ed5,6eec,6eef,6ef2,6ef4,6ef7,6efe-6eff,6f01-6f02,6f06,6f0f,6f13-6f15,6f20,6f22-6f23,6f29-6f2c,6f2f,6f31-6f33,6f38,6f3e-6f3f,6f51,6f54,6f58,6f5b,6f5f-6f60,6f64,6f66,6f6d-6f70,6f78,6f7a,6f7c,6f80,6f84,6f86,6f88,6f8e,6f97,6fa0-6fa1,6fa4,6fa6-6fa7,6fb1,6fb3-6fb4,6fb6,6fb9,6fc0-6fc3,6fd5,6fd8,6fdb,6fdf-6fe1,6fe4,6fe9,6feb-6fec,6fee-6ff1,6ffa,6ffe,7006,7009,700b,700f,7011,7015,7018,701a-701b,701d,701f,7028,7030,7032,703e,704c,7051,7058,705e,7063-7064,706b,7070,7076,7078,707c-707d,708a,708e,7092,7095,7099,70a4,70ab-70af,70b3,70b8,70ba,70c8,70ca,70cf,70d8-70d9,70e4,70ef,70f9,70fd,7109-710a,7119-711a,711c,7121,7126,7130,7136,7146,7149,714c,714e,7156,7159,715c,715e,7164-7169,716c,716e,717d,7184,718a,7192,7194,7199,719f,71a8,71ac,71b1,71b9,71be,71c3-71c4,71c8-71c9,71ce,71d0,71d2,71d5,71d9,71dc,71df-71e0,71e5-71e7,71ec-71ee,71f4,71f8,71fb-71fc,71fe,7206,720d,7210,721b,7228,722a,722c-722d,7230,7235-7236,7238-723b,723d-723e,7246-7248,724c,7252,7256,7258-7259,725b,725d,725f-7262,7267,7269,726f,7272,7274,7279,727d,7280-7281,7284,7292,7296,729b,72a2,72a7,72ac,72af,72c0,72c2,72c4,72ce,72d0,72d7,72d9,72e0-72e1,72e9,72f7-72f9,72fc-72fd,7313,7316,7319,731b-731c,7325,7329,7334,7336-7337,733e-733f,7344-7345,734e,7350,7357,7368,7370,7372,7375,7377-7378,737a-737b,7380,7384,7386-7387,7389,738b,7396,739f,73a5,73a8-73a9,73ab,73b2-73b3,73b7,73bb,73c0,73ca,73cd,73de,73e0,73ea,73ed-73ee,73fe,7403,7405-7406,7409-740a,740d,741b,7422,7425-7426,7428,742a,742f,7433-7436,743a,743f,7441,7455,7459-745c,745e-745f,7463-7464,7469-746a,746d,746f-7470,747e,7480,7483,748b,7498,749c,749e-749f,74a3,74a6-74a9,74b0,74bd,74bf,74ca,74cf,74d4,74d6,74da,74dc,74e0,74e2-74e4,74e6,74f6-74f7,7504,750c-750d,7515,7518,751a,751c,751f,7522,7525-7526,7528-7529,752b-752d,7530-7533,7537-7538,753d,754b-754c,754e-754f,7554,7559-755a,755c-755d,7562,7565-7566,756a-756b,7570,7576,7578,757f,7586-7587,758a-758b,758f,7591,7599-759a,759d,75a2-75a5,75ab,75b2-75b3,75b5,75b8-75b9,75bc-75be,75c2,75c5,75c7,75ca,75cd,75d4-75d5,75d8-75d9,75db,75de,75e0,75e2-75e3,75f0-75f4,75fa,75ff-7601,7609,760b,760d,7613,761f-7622,7624,7626-7627,7629,7634,7638,763a,7642,7646,764c,7652,7656,7658,765f,7661-7662,7665,7669,766c,766e,7671-7672,7678,767b-767e,7682,7684,7686-7688,768b,768e,7693,7696,769a,76ae,76b0,76b4,76ba,76bf,76c2-76c3,76c5-76c6,76c8,76ca,76cd-76ce,76d2,76d4,76db-76dc,76de-76df,76e1,76e3-76e5,76e7,76ea,76ee-76ef,76f2,76f4,76f8-76f9,76fc,76fe,7701,7707,7709,770b,771f-7720,7728-7729,7736-7738,773a,773c,773e,774f,775b-775c,775e,7761-7763,7765-7766,7768,776a-776c,7779,777d,777f,7784,7787,778b-778c,778e,7791,779e-77a0,77a5,77a7,77aa,77ac-77ad,77b0,77b3,77bb-77bd,77bf,77c7,77d3,77d7,77da-77dc,77e2-77e3,77e5,77e9,77ed-77ef,77f3,77fd,7802,780c-780d,7814,781d,781f-7820,7825,7827,782d,7830,7832,7834,7837-7838,7843,784e,785d,786b-786c,786f,787c,787f,7889,788c,788e,7891,7893,7897-7898,789f,78a3,78a7,78a9,78b0,78b3,78ba,78bc,78be,78c1,78c5,78ca-78cb,78d0,78d5,78da,78e7-78e8,78ec,78ef,78f4,78f7,78fa,7901,790e,7919,7926,792a-792c,793a,793e,7940-7941,7946-7949,7950,7955-7957,795a,795d-7960,7965,7968,796d,797a,797f,7981,798d-798f,79a6-79a7,79aa,79ae,79b1,79b3,79b9-79ba,79bd-79c1,79c8-79c9,79cb,79d1-79d2,79d8,79df,79e3-79e4,79e6-79e7,79e9,79fb,7a00,7a05,7a08,7a0b,7a0d,7a14,7a1a,7a1c,7a1e-7a20,7a2e,7a31,7a37,7a3b-7a3d,7a3f-7a40,7a46,7a4b-7a4e,7a57,7a60-7a62,7a69,7a6b,7a74,7a76,7a79-7a7a,7a7f,7a81,7a84,7a88,7a92,7a95-7a98,7a9f-7aa0,7aa9-7aaa,7aae-7aaf,7aba,7abf,7ac4-7ac5,7ac7,7aca-7acb,7ad9,7adf-7ae0,7ae3,7ae5,7aed,7aef,7af6,7af9-7afa,7afd,7aff,7b06,7b11,7b19,7b1b,7b1e,7b20,7b26,7b28,7b2c,7b2e,7b46,7b49,7b4b,7b4d,7b4f-7b52,7b54,7b56,7b60,7b67,7b6e,7b75,7b77,7b84,7b87,7b8b,7b8f,7b94-7b95,7b97,7b9d,7ba0-7ba1,7bad,7bb1,7bb4,7bb8,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9,7bcc,7bd9,7bdb,7be0-7be1,7be4,7be6,7be9,7bf7,7bfe,7c07,7c0c-7c0d,7c11,7c1e,7c21,7c23,7c27,7c2a-7c2b,7c37-7c38,7c3d-7c40,7c43,7c4c-7c4d,7c50,7c5f-7c60,7c63-7c65,7c6c,7c6e,7c73,7c7d,7c89,7c92,7c95,7c97,7c9f,7ca5,7cb1,7cb3,7cb5,7cb9,7cbd-7cbe,7cca,7cd5-7cd6,7cd9,7cdc-7ce0,7ce2,7ce7,7cef-7cf0,7cf8,7cfb,7cfe,7d00,7d02,7d04-7d07,7d09-7d0b,7d0d,7d10,7d14-7d15,7d17,7d19-7d1c,7d20-7d22,7d2b,7d2e-7d33,7d39,7d3c,7d40,7d42-7d44,7d46,7d50,7d55,7d5b,7d5e,7d61-7d62,7d66,7d68,7d6e,7d70-7d73,7d79,7d81,7d8f,7d91,7d93,7d9c,7d9e,7da0,7da2,7dac-7dad,7db0-7db2,7db4-7db5,7db8,7dba-7dbb,7dbd-7dbf,7dc7,7dca,7dd2,7dd8-7dda,7ddd-7dde,7de0,7de3,7de8-7de9,7dec,7def,7df2,7df4,7df9,7dfb,7e08-7e0a,7e10-7e11,7e1b,7e1d-7e1e,7e23,7e2b,7e2e-7e2f,7e31-7e32,7e34-7e35,7e37,7e39,7e3d-7e3f,7e41,7e43,7e45-7e46,7e48,7e52,7e54-7e55,7e59-7e5a,7e5e,7e61,7e69-7e6b,7e6d,7e73,7e79,7e7c-7e7d,7e82,7e8c,7e8f,7e93-7e94,7e96,7e9c,7f36,7f38,7f3a,7f3d,7f44,7f48,7f4c,7f50,7f54-7f55,7f5f,7f69-7f6a,7f6e,7f70,7f72,7f75,7f77,7f79,7f85,7f88,7f8a-7f8c,7f8e,7f94,7f9a,7f9e,7fa4,7fa8-7fa9,7faf,7fb2,7fb6,7fb8-7fb9,7fbc-7fbd,7fbf,7fc1,7fc5,7fcc,7fce,7fd2,7fd4-7fd5,7fdf-7fe1,7fe9,7fee,7ff0-7ff1,7ff3,7ff9,7ffb-7ffc,8000-8001,8003-8006,800b-800d,8010-8012,8015,8017-8019,801c,8026,8028,8033,8036,803d,803f,8046,804a,8052,8056,8058,805a,805e,806f-8073,8076-8077,807d-807f,8084-8087,8089,808b-808c,8093,8096,8098,809a-809b,809d,80a1-80a2,80a5,80a9-80ab,80af,80b1-80b2,80b4,80ba,80c3-80c4,80cc,80ce,80d6,80da-80db,80dd-80de,80e1,80e4-80e5,80ed,80ef-80f1,80f3-80f4,80f8,80fc-80fd,8102,8105-8106,8108,810a,8116,8123-8124,8129,812b,812f-8130,8139,813e,8146,814b-814c,814e,8150-8151,8153-8155,8165-8166,816b,816e,8170-8171,8173-8174,8178-817a,817f-8180,8182,8188,818a,818f,8198,819a-819d,81a0,81a8-81a9,81b3,81ba,81bd-81c0,81c2-81c3,81c6,81c9,81cd,81cf,81d8,81da,81df,81e2-81e3,81e5,81e7-81e8,81ea,81ec-81ed,81f3-81f4,81fa-81fc,81fe,8200,8202,8205,8207-820a,820c-820d,8210,8212,8214,821b-821c,821e-821f,8222,8228,822a-822c,8235-8237,8239,8247,824b,8258-8259,8266,826e-826f,8271-8272,8277,827e,828b,828d,8292,8299,829d,829f,82a3,82a5,82ac-82ad,82af-82b1,82b3,82b7-82b9,82bb,82bd-82be,82d1-82d4,82d7,82db-82dc,82de-82df,82e3,82e5-82e7,82ef,82f1,8301-8306,8309,8317,8328,832b,8331-8332,8334-8336,8338-8339,8340,8343,8349-834a,834f-8350,8352,8354,8377-8378,837b-837c,8386,8389-838a,838e,8392-8393,8396,8398,839e,83a0,83a2,83a7,83ab,83bd,83c1,83c5,83ca,83cc,83d4,83dc,83df-83e0,83e9,83ef-83f2,83f4,83f8,83fd,8403-8404,8407,840a-840e,842c,8431,8435,8438,843c-843d,8446,8449,8457,845b,8461,8463,8466,8469,846b-846d,8475,8477,8482,8490,8499,849c,849e,84b2,84b8,84bc,84bf-84c0,84c4,84c6,84c9-84cb,84d1,84d3,84ec,84ee,84ff,8506,8511,8513-8514,8517,851a,8521,8523,8525,852c-852d,853d,8543,8548-854a,8559,855e,8568-856a,856d,857e,8584,8587,858a,8591,8594,859b-859c,85a6,85a8-85aa,85af-85b0,85b9-85ba,85c9,85cd,85cf-85d0,85d5,85dd,85e4-85e5,85e9-85ea,85f7,85f9-85fb,8606-8607,860a-860b,8611,8617,861a,862d,8638,863f,864e,8650,8654-8655,865b-865c,865e-865f,8667,866b,8671,8679-867b,868a,868c,8693,869c,86a3-86a4,86a9-86aa,86af,86b1,86b5-86b6,86c0,86c4,86c6-86c7,86c9,86cb,86d0,86d4,86d9,86db,86de-86df,86e4,86ed,86f9,86fb,86fe,8700,8702-8703,8706-8708,870a,8713,8718,871c,8722,8725,8729,8734,8737,873b,873f,874c,8753,8755,8757,8759,8760,8766,8768,8774,8776,8778,8782-8783,878d,879e-879f,87a2,87ab,87b3,87ba-87bb,87c0,87c6,87c8,87cb,87d1-87d2,87e0,87ec,87ef,87f2,87f9,87fb,87fe,8805,880d,8814-8815,881f,8821-8823,8831,8836,8839,883b,8840,884c-884d,8853,8857,8859,885b,885d,8861-8863,8868,886b,8870,8877,8879,887d,8881-8882,8888,888b,888d,8892,8896,889e,88ab,88b1,88c1-88c2,88ca,88d2,88d4-88d5,88d8-88d9,88dc-88dd,88df,88e1,88e8,88ef,88f3-88f4,88f8-88f9,88fd,8902,8907,890a,8910,8912-8913,8915,891a,8921,8925,892a-892b,8932,8936,8938,893b,893d,8944,8956,895e-8960,8964,896a,896c,896f,8972,897f,8981,8983,8986,898b,898f,8993,8996,899c,89a6,89aa,89ac,89b2,89ba,89bd,89c0,89d2,89d4,89e3,89f4,89f8,89fc,8a00,8a02-8a03,8a08,8a0a,8a0c,8a0e-8a11,8a13,8a15-8a18,8a1b,8a1d,8a1f,8a22-8a23,8a25,8a2a,8a2d,8a31,8a34,8a36,8a3a-8a3c,8a3e,8a41,8a46,8a50,8a54-8a56,8a5b,8a5e,8a60,8a62-8a63,8a66,8a68-8a69,8a6b-8a6e,8a70-8a73,8a79,8a7b-8a7c,8a85,8a87,8a8c-8a8d,8a91,8a93,8a95,8a98,8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aaa,8ab0,8ab2,8ab6,8ab9,8abc,8abf,8ac2,8ac4,8ac7,8ac9,8acb,8acd,8ad2,8ad6,8adb-8adc,8ae6-8ae7,8aeb,8aed-8aee,8af1,8af3,8af6-8af8,8afa,8afc,8afe,8b00-8b02,8b04,8b0a,8b0e,8b10,8b17,8b19,8b1b,8b1d,8b20,8b28,8b2b-8b2c,8b39,8b41,8b46,8b49,8b4e-8b4f,8b58-8b5a,8b5c,8b5f,8b66,8b6b-8b6c,8b6f-8b70,8b74,8b77,8b7d,8b80,8b8a,8b92-8b93,8b96,8b9a,8b9c,8c37,8c3f,8c41,8c46,8c48-8c49,8c4c,8c4e,8c50,8c54-8c55,8c5a,8c61-8c62,8c6a-8c6d,8c73,8c79-8c7a,8c82,8c89-8c8a,8c8c-8c8d,8c93,8c9d-8c9e,8ca0-8ca2,8ca7-8cac,8caf,8cb2-8cb4,8cb6-8cb8,8cbb-8cbd,8cbf-8cc5,8cc7-8cc8,8cca,8cd1-8cd3,8cdc,8cde,8ce0-8ce4,8ce6,8cea,8cec-8ced,8cf4,8cf8,8cfa-8cfd,8d05,8d08,8d0a,8d0d,8d0f,8d13,8d16-8d17,8d1b,8d64,8d66-8d67,8d6b,8d6d,8d70,8d73-8d74,8d77,8d81,8d85,8d8a,8d95,8d99,8d9f,8da3,8da8,8db3-8db4,8dba,8dbe,8dc6,8dcb-8dcc,8dce,8dd1,8dda-8ddb,8ddd,8ddf,8de1,8de4,8de6,8de8,8dea,8def,8df3,8dfa,8dfc,8e0f-8e10,8e1d-8e1f,8e21-8e22,8e29,8e2b,8e31,8e34-8e35,8e39,8e42,8e44,8e48-8e4b,8e55,8e59,8e5f,8e63-8e64,8e66,8e6c,8e72,8e74,8e76,8e7a,8e7c,8e81-8e82,8e85,8e87,8e89-8e8b,8e8d,8e91,8e93,8ea1,8eaa-8eac,8eb2,8eba,8ec0,8eca-8ecd,8ecf,8ed2,8ed4,8edb,8edf,8ef8,8efb-8efc,8efe,8f03,8f09-8f0a,8f12-8f15,8f1b-8f1f,8f25-8f26,8f29-8f2a,8f2f,8f33,8f38,8f3b,8f3e-8f3f,8f42,8f44-8f45,8f49,8f4d-8f4e,8f54,8f5f,8f61,8f9b-8f9c,8f9f,8fa3,8fa6,8fa8,8fad-8fb2,8fc2,8fc4-8fc6,8fce,8fd1,8fd4,8fe2,8fe4-8fe6,8fe8,8fea-8feb,8fed,8ff0,8ff4,8ff7-8ff8,8ffa,8ffd,9000-9001,9003,9005-9006,900d,900f-9010,9014-9017,9019-901b,901d-9020,9022-9023,902e,9031-9032,9035-9036,9038,903c,903e,9041-9042,9047,904a-904b,904d-9051,9053-9055,9058-9059,905b-905e,9060,9062-9063,9068-9069,906d-906e,9072,9074-9075,9077-9078,907a,907c-907d,907f-9084,9087-9088,908a-908b,908f-9091,9095,90a2-90a3,90a6,90aa,90b1,90b5-90b6,90b8,90c1,90c3,90ca,90ce,90dd,90e1-90e2,90e8,90ed,90f5,90fd-90fe,9102,9109,9112,9117-9119,911e,9127,912d,9130-9131,9134,9139,9148-914d,9152,9157,9163,9165,9169-916a,916c,9174-9175,9177-9178,9183,9187,9189,918b,9192,919c,919e,91a3,91ab-91ac,91ae,91b1,91b4,91ba,91c0-91c1,91c5-91c7,91c9,91cb-91d1,91d7-91d9,91dc-91dd,91e3,91e6-91e7,91e9,91ed,91f5,9207,9209,920d,9210-9211,9214-9215,921e,9223,9234,9237-9239,923d-9240,9245,9249,924b,924d,9251,9257,925a-925b,9264,9278,927b-927c,9280,9285,9291,9293,9296,9298,929c,92a8,92ac,92b2-92b3,92b7,92bb-92bc,92c1,92c5,92c7,92d2,92e4,92ea,92f0,92f8,92fc,9304,9310,9315,9318-931a,9320-9322,9326,9328,932b,932e-932f,9333,9336,934a-934b,934d,9354,935a-935b,9365,936c,9370,9375,937e,9382,938a,9394,9396-9398,939a,93a2,93ac,93ae,93b0,93b3,93c3,93c8,93cd,93d1,93d6-93d8,93dc-93dd,93df,93e1-93e2,93e4,93e8,93fd,9403,9418,942b,942e,9432-9433,9435,9438,943a,9444,9451-9452,9460,9463-9464,946a,9470,9472,9477,947c-947f,9577,9580,9582-9583,9589,958b,958e-958f,9591-9594,9598,95a1,95a3-95a5,95a8-95a9,95ad,95b1,95bb,95c6,95c8,95ca-95cc,95d0,95d4-95d6,95dc,95e1-95e2,961c,9621,962a,962c,962e,9631-9632,963b,963f-9640,9642,9644,964b-964d,9650,9658,965b,965d-965e,9661-9664,966a,966c,9670,9672-9678,967d,9684-9686,968a-968b,968d-968e,9694-9695,9698-9699,969b-969c,96a7-96a8,96aa,96b1,96b4,96b8-96b9,96bb,96c0-96c1,96c4-96c7,96c9-96cd,96d2,96d5-96d6,96d9,96db-96dc,96de,96e2-96e3,96e8-96ea,96ef,96f2,96f6-96f7,96f9,96fb,9700,9704,9706-9707,9709,970d-970f,9711,9713,9716,971c,971e,9724,9727,972a,9730,9732,9738-9739,973d-973e,9742,9744,9748,9752,9756,975b-975c,975e,9760-9762,9766,9768-9769,9774,9776,977c,9785,978b,978d,978f,9798,97a0,97a3,97a6,97ad,97c1,97c3,97c6,97c9,97cb-97cc,97d3,97dc,97ed,97f3,97f6,97f9,97fb,97ff,9801-9803,9805-9806,9808,980a,980c,9810-9813,9817-9818,981c,9821,9824,982b,982d,9830,9837-9839,983b,9846,984c-984f,9853,9858,985b,985e,9865,9867,986b,986f-9871,98a8,98af,98b1,98b3,98b6,98ba,98bc,98c4,98db,98df,98e2,98e7,98e9-98ea,98ed,98ef,98f2,98f4,98fc-98fe,9903,9905,9909-990a,990c,9910,9912-9913,9918,991a-991b,991e,9921,9928,992e,9935,993d-993f,9945,9949,9951-9952,9955,9957,995c,995e,9996,9999,99a5,99a8,99ac-99ae,99b1,99b3-99b4,99c1,99d0-99d2,99d5,99d9,99db,99dd,99df,99e2,99ed,99f1,99ff,9a01,9a0e,9a16,9a19,9a2b,9a30,9a35,9a37,9a3e,9a40,9a43,9a45,9a4d,9a55,9a57,9a5a-9a5b,9a5f,9a62,9a65,9a6a,9aa8,9aaf-9ab0,9ab7-9ab8,9abc,9ac1,9acf,9ad1-9ad4,9ad6,9ad8,9ae1,9ae6,9aed-9aef,9afb,9b03,9b06,9b0d,9b1a,9b22-9b23,9b25,9b27-9b28,9b31-9b32,9b3c,9b41-9b42,9b44-9b45,9b4d-9b4f,9b51,9b54,9b58,9b5a,9b6f,9b77,9b91,9baa-9bab,9bad-9bae,9bc0,9bc8-9bca,9bd6,9bdb,9be7-9be8,9bfd,9c0d,9c13,9c25,9c2d,9c31,9c3b,9c3e,9c49,9c54,9c56-9c57,9c5f,9c77-9c78,9ce5,9ce9,9cf3-9cf4,9cf6,9d03,9d06,9d09,9d12,9d15,9d1b,9d23,9d26,9d28,9d3b,9d3f,9d51,9d5d,9d60-9d61,9d6a,9d6c,9d72,9d89,9daf,9db4,9db8,9dc2,9dd3,9dd7,9de5,9df9-9dfa,9e1a-9e1b,9e1e,9e75,9e79,9e7c-9e7d,9e7f,9e82,9e8b,9e92-9e93,9e97,9e9d,9e9f,9ea5,9ea9,9eb4-9eb5,9ebb-9ebc,9ebe,9ec3,9ecc-9ecf,9ed1,9ed4,9ed8,9edb-9ede,9ee0,9ee8,9eef,9ef4,9ef7,9f07,9f0e,9f13,9f15,9f19,9f20,9f2c,9f2f,9f34,9f3b,9f3e,9f4a-9f4b,9f52,9f5c,9f5f,9f61,9f63,9f66-9f67,9f6a,9f6c,9f72,9f77,9f8d,9f90,9f94,9f9c,2010-201e,2024-2026,fe30-fe6b,ff01-ff5e,25cb,0028-0029,ffe5 +Traditional Chinese (All):0000-007f,00a7,00a8,00c0-00c1,00c8-00ca,00d2-00d3,00e0-00e1,00e8-00ea,00ec-00ed,00f2-00f3,00f8-00fa,00fc,0100-0101,0112-0113,011a-011b,012b,014b-014d,0153,016b,01cd-01ce,01d0-01d2,01d4,01d6,01d8,01da,01dc,0250-0251,0254,025b,0261,026a,0275,0283,028a,02c6,0401,0410-044f,0451,1ebe-1ec1,2116,2121,2170-2179,21b8-21b9,21e7,2460-2469,2474-247d,2550-2570,273d,2e80,2e84,2e86-2e88,2e8a,2e8c-2e8d,2e95,2e9c-2e9d,2ea5,2ea7,2eaa,2eac,2eae,2eb6,2ebc,2ebe,2ec6,2eca,2ecc-2ecd,2ecf,2ed6-2ed7,2ede,2ee3,2f33,3005-3007,3041-3093,309b-309e,30a1-30f6,30fc-30fe,3231,3435,3440,344c,3464,3473,347a,347d-347e,3493,3496,34a5,34af,34bc,34c1,34c8,34df,34e4,34fb,3506,353e,3551,3553,3559,3561,356d,3570,3572,3577-3578,3584,3597-3598,35a1,35a5,35ad,35bf,35c1,35c5,35c7,35ca,35ce,35d2,35d6,35db,35dd,35f1-35f3,35fb,35fe,3609,3618,361a,3623,362d,3635,3639,363e,3647-3649,364e,365f,367a,3681,369a,36a5,36aa,36ac,36b0-36b1,36b5,36b9,36bc,36c1,36c3-36c5,36c7-36c8,36d3-36d4,36d6,36dd,36e1-36e2,36e5-36e6,36f5,3701,3703,3708,370a,370d,371c,3722-3723,3725,372c-372d,3730,3732-3733,373a,3740,3743,3762,376f,3797,37a0,37b9,37be,37f2,37f8,37fb,380f,3819,3820,382d,3836,3838,3863,38a0,38c3,38cc,38d1,38fa,3908,3914,3927,3932,393f,394d,3963,3980,3989-398a,3992,3999,399b,39a1,39a4,39b8,39dc,39e2,39e5,39ec,39f8,39fb,39fe,3a01,3a03,3a06,3a17-3a18,3a29-3a2a,3a34,3a4b,3a52,3a57,3a5c,3a5e,3a66-3a67,3a97,3aab,3abd,3ade,3ae0,3af0,3af2,3afb,3b0e,3b19,3b22,3b2b,3b39,3b42,3b58,3b60,3b71-3b72,3b7b-3b7c,3b80,3b96,3b99,3ba1,3bbc,3bbe,3bc2,3bc4,3bd7,3bdd,3bec,3bf2-3bf4,3c0d,3c11,3c15,3c18,3c54,3c8b,3ccb,3ccd,3cd1,3cd6,3cdc,3ceb,3cef,3d13,3d1d,3d32,3d3b,3d46,3d4c,3d4e,3d51,3d5f,3d62,3d69-3d6a,3d6f,3d75,3d7d,3d85,3d8a,3d8f,3d91,3da5,3dad,3db4,3dbf,3dc6-3dc7,3dc9,3dcc-3dcd,3dd3,3ddb,3de7-3de8,3deb,3df3,3df7,3dfc-3dfd,3e06,3e40,3e43,3e48,3e55,3e74,3ea8-3eaa,3ead,3eb1,3eb8,3ebf,3ec2,3ec7,3eca,3ecc,3ed0-3ed1,3ed6-3ed7,3eda-3edb,3ede,3ee1-3ee2,3ee7,3ee9,3eeb,3ef0,3ef3-3ef4,3efa,3efc,3eff-3f00,3f04,3f06,3f0e,3f53,3f58-3f59,3f63,3f7c,3f93,3fc0,3fd7,3fdc,3fe5,3fed,3ff9-3ffa,4004,4009,401d,4039,4045,4053,4057,4062,4065,406a,406f,4071,40a8,40bb,40bf,40c8,40d8,40df,40fa,4103-4104,4109,410e,4132,4167,416c,416e,417f,4190,41b2,41c4,41ca,41cf,41db,41ef,41f9,4211,4223,4240,4260,426a,4276,427a,428c,4294,42a2,42b5,42b9,42bc,42f4,42fb-42fc,432b,436e,4397,43ba,43c1,43d9,43df,43ed,43f2,4401-4402,4413,4425,442d,447a,448f,449f-44a0,44a2,44b0,44b7,44c0,44c5,44ce,44dd,44df,44e4,44e9-44ec,44f4,4503-4504,4509,450b,4516,451d,4527,452e,4533,453b,453d,453f,4543,4551-4552,4555,455c,4562,456a,4577,4585,45e9,4606,460f,4615,4617,465b,467a,4680,46cf-46d0,46f5,4713,4718,474e,477c,4798,47a6,47b6,47d5,47ed,47f4,4800,480b,4837,485d,4871,489b,48ad-48ae,48d0,48dd,48ed,48f3,48fa,4906,4911,491e,4925,492a,492d,4935,493c,493e,4945,4951,4953,4965,496a,4972,4989,49a1,49a7,49df,49e5,49e7,4a0f,4a1d,4a24,4a35,4a96,4ab4,4ab8,4ad1,4ae4,4aff,4b10,4b19,4b20,4b2c,4b37,4b6f-4b70,4b72,4b7b,4b7e,4b8e,4b90,4b93,4b96-4b97,4b9d,4bbd-4bbe,4bc0,4c04,4c07,4c0e,4c3b,4c3e,4c5b,4c6d,4c7d,4c81,4ca4,4cae,4cb0,4cb7,4ccd,4ce1,4ced,4d09,4d10,4d34,4d91,4d9c,4e04,4e1a,4e1c,4e21,4e24,4e28,4e2a,4e2c,4e2f,4e36-4e37,4e3d,4e3f,4e49,4e5a-4e5b,4e6a,4e78,4e80-4e81,4e85,4e87,4e89,4e98,4e9a,4ea0,4ea3,4eb7,4ebb-4ebc,4ebf,4ece,4eea-4eeb,4eee,4ef8,4f03,4f17,4f1a,4f28-4f29,4f32,4f37,4f39,4f42,4f45,4f4b,4f72,4f8a,4fa2,4fa8,4fab,4fb0,4fbd,4fc8,4fcc,4fe4-4fe5,4ff0,4ff2,4ff9,4ffd,5003,5008,502e,5034,503b,5056,5058,5066,506c,5081,5088,5090,50a6,50bc,50cd,50d0,50d9,50df,50e1,50f4,50fc,5101,510d-510e,512b,5156,5160,516a,5174,5179,5182,5186,5188,5196,519a,519c,51a7-51a8,51ab,51ae,51b2-51b5,51b8,51c3,51c7,51c9,51cf,51d1-51d3,51db,51df,51e2,51e4,51ed,51f4,51fc,51fe,5202,5205,520b,521f-5220,5226-5227,5234,523c,5257,5259,5260,5268,5273,5279,528f-5290,5294,529a,52a1,52a4,52a8,52b5,52b9,52c5,52cc,52d0-52d1,52e0-52e1,52f9,5301,5324,5327,532c,5332-5333,5338,533b,5342,534e,535d,535f,5364,5367,5369,536d,5374,537d-537e,5393,53a0,53a2,53a6,53a8-53ab,53ae,53b0,53b6,53c1-53c2,53c5,53cc,53d0-53d2,53d8-53da,53e0,53f6-53f7,53fe,5413-5414,5416,541a,5421,5423,542f,5432,5434,544b,544d,5469-546a,546d,5485,548f,5493-5494,5497,549c,549e,54a3-54a4,54b2,54b4,54b9,54cb-54cd,54d0,54da,54e3,54ef,5502,550d,5513,5518,551e,5523,5525,5528,552b,553f,5547,5549,5553,555d,5569,556b,5571-5573,5579,5586,5590,55a9,55b0,55b4,55b9-55ba,55bc,55c1,55d7-55d8,55de,55ea,55ec,55f0-55f1,55f5,55fb,5605,5611,561e,5620-5623,5625,562d,5637,5643,564d,564f-5650,5652,5654,565d,5661,567a-567c,5689-568b,5692,569e-569f,56a1,56a4,56af,56b1,56b9,56bf,56d6,56e2,56ed,56ef,56f1,56fd,5700,5715,571d,5732,573d,573f,5742-5743,5746,5754,5757,575b,575f,5767,577a,577e-577f,5788,578a,578d,5790,579c,57a1,57a7,57aa,57b4,57bb,57be,57c4,57c8,57d7,57dd-57de,57e6,57ef,57fe,5803,5812,5822,5826,583a,5840,5844,5847,585c,585f,5869,586c,5872-5873,5892,5899-589a,58a7,58aa,58b0,58b5-58b6,58bb,58cb,58d0,58dc,58e0,58f0,58f2-58f3,58fb,5902,5904-5905,5907,590a,5911,591f,5932,5934,5965,5975,5989,5994,599a,599f,59ac,59b0,59b7-59b8,59c4,59c9,59d9,59eb,59ef-59f0,59f8-59f9,5a02,5a0b,5a0d,5a12,5a1a,5a21,5a24,5a27,5a2a-5a2c,5a3d,5a45,5a54,5a59,5a61,5a63,5a68,5a6b,5a6e,5a71,5a79,5a7e,5a81-5a82,5a86,5a88,5a91,5a96,5a99,5aa0-5aa1,5aab,5ac3,5ace-5acf,5ad3,5ae4,5af0,5af2,5afa,5afe,5b0d,5b11,5b15,5b1f,5b2b,5b41,5b44,5b46,5b4a,5b4f,5b66,5b68,5b6d,5b74,5b76,5b7c,5b80,5b82,5b90,5b96,5b9d-5b9f,5baa,5bc3,5bd5,5bd7,5bf3,5bff,5c05,5c13-5c14,5c1c,5c1e,5c20,5c23,5c49-5c4a,5c53,5c5e,5c85,5c99-5c9a,5c9c,5c9e,5cba,5cc1-5cc2,5cd1,5ce5,5ce9,5cef,5cf5,5d10,5d15,5d18,5d2c,5d2f,5d3e,5d46,5d48,5d56-5d57,5d5b,5d70,5d74,5d7b,5d85,5d8b,5d8e,5da4,5dab,5db6,5db9,5dc1,5dd7,5ddb,5df5,5e09,5e0b,5e12,5e2e,5e42,5e48,5e5e,5e7a,5e7f,5e83,5e86,5e92,5e99,5ebd,5ecd,5ed0,5ef4,5ef8-5ef9,5efb-5efc,5f0c-5f0e,5f25,5f3a,5f4d,5f50-5f51,5f5c,5f61,5f63,5f72,5f7b,5f83,5fa4,5fa7,5fb1,5fba,5fc2,5fc4,5fdb,5fdf,6023,6031,603b,604a,6052,6075,6077,607e,609e,60a4,60a7,60b3,60d7,60de,60e3,60e7-60e9,60fd,6107,610c,6119,6122,6130,613d,6142,6150,6159,615c,6160,6164,616f,617d,6181,6187,6195,6198-6199,619c,61b7,61b9,61c0,61cf-61d0,61d3,61da,61e2,622c,6237,6239,624c,6268,6282,6285,6290,629d,62a4,62a6,62c3,62c5,62d5,62df,62e5,6318,632e,6331,6335,6337,6364,636c,6379,637f,638b,63b9,63c1,63d1,63de,63e2,63e6,63f8,63fb-63fc,63fe,6407,6432,6438,643a-643b,645a,6471,647c,648d,6491,64af,64b4,64b6,64c0,64d3,64dd,64e1,64e5,64e7,64ea,650a,6511,651e-651f,6530,6534-6535,654d,655f,656b,656d,6585-6586,6588-6589,658b,65b5,65be,65d1,65d4,65e0,65e3,65ff,6618,661e,6623,6630,6644,6648,664b,6653,6657,6663,6667,666b,6673,667d,6685,668e,6692,669a,66a4,66ad,66b3,66b6,66bf,66cd-66ce,66f1,6702,670c,670e,6716,6719,671e,6725,6736,6744,6761-6762,6767,676b,678f,67a0,67a4,67ac,67b1,67bf,67d6-67d7,67f9,67fe,6800-6804,680d,6810,681b,681e,6822,6836-6837,683e,6847,684a,6855-6856,685d,6865,6884,6888,6898,68a6,68b6,68b9,68bd,68c3,68c5,68ca,6900-6903,6909,6918-691b,692c,6936,693e,6943,6946,6955,6961,6964,6967,6972-6973,6980,6985,698a,6998,699f,69a2,69b2,69c0,69d1,69d5-69d6,69e1,69e9,69f9-69fa,6a03,6a0b-6a0c,6a1a,6a1c,6a2b-6a2d,6a33,6a43,6a45,6a4c,6a52-6a53,6a57,6a63,6a65,6a71,6a74,6a7a,6a82,6a8a,6a8f,6a99,6a9d,6aa7,6aab,6ab1-6ab2,6ab5,6abe,6ac8-6aca,6ad4,6ad8,6af6,6b05,6b1d,6b35,6b52,6b57,6b6f,6b74,6b7a,6b81,6bc1,6bdc,6be1,6bea,6bfa,6c1c,6c31,6c35,6c37,6c39-6c3a,6c3d,6c49,6c58,6c5a,6c6e,6c75,6c79,6c7f,6c9f,6ca2,6caa,6caf,6cb2,6ccb,6cce,6cdf,6cea,6cff,6d02,6d05-6d06,6d24,6d26,6d4e,6d57,6d5b-6d5c,6d71-6d72,6d81,6d8f,6d96,6da4-6da5,6db1,6db9,6dfe,6e02,6e04,6e0a,6e0f,6e15,6e18,6e29-6e2a,6e4f-6e50,6e59,6e76,6e7c,6e86,6e8b,6e9a,6eb5,6eb8,6ebb,6ed9-6edb,6edd,6ee2,6ee8-6ee9,6efa,6f04,6f0b-6f0c,6f16-6f17,6f24,6f34,6f3d,6f44,6f56,6f5c,6f74,6f79,6f81,6f8a,6f9d,6f9f,6fb5,6fbb,6fbe,6fd3,6fd9-6fda,6ff6,6ff8,7003,701e,702c,704b,704d,7050,7054,705c,7067,706c,706f,7075,7077,7079,707e-707f,7081,7089,708b,708f,70a0,70a3,70a5-70a7,70b9,70bb-70bd,70c0,70c4,70cc,70d0,70d5-70d6,70df,70f1,70f5,70fe,7105,711d,7129,712b-712c,7133-7135,713b,713e,7140,7145,714a,714f,7151,716b,7171,7173,7175-7177,717a,717c,717e,7188,718c,718e,7191,7196,7198,71a2-71a3,71ad,71b4,71b7,71ba,71d1,71dd,71eb,71f5-71f6,7200,7209,720e-720f,7215-7217,7224,722b,722e,7240,7250,7255,7257,725c,7266,7282,7287,728f,7294,729f,72ad,72b2,72cd,72e2,7302,7304,7310,7328,732a-732c,732e,7338-7339,7341,7348,734f,7371,7374,738c,738f,7398,739c,739e,73a7,73aa,73ba,73c9,73ce-73d0,73d5,73e1-73e2,73e4,73e6,73ef,73f3,73f7,73f9,73fb,7402,7411-7412,7414-7415,7417,7419,741c,741e-741f,7437-7439,743c,7443,7445,7447-7449,7453,7456,745d,7460,7465,7468,746b-746c,7474,7476,747a,7482,748c-748d,7499,749b,74a4,74b4,74b9,74c8,74cc,74d0,74d3,74e7,74f0-74f2,74f8,7505,750e,7519,751e,7534-7535,753b,7542,7546,754a,754d,7551,7553,7555,7560,7567,756d-756e,7572,757a,7583,758d-758e,7592,759e,75b1,75b4,75c3,75c8,75dc,7602,7607,762c,763b,7640,764d-764f,7651,7654,7666-7667,766f,7673-7674,7676,767a,7690,76a1,76a5,76b7,76cc,76d6,76d9,770c,770e-770f,771e,7724,7726,772b,7740,7743,7758,7772,7777-7778,777a-777b,7793,7798,77af,77b9,77be,77c3,77c5,77cb,77dd,77e6,77f4,77fe,7808,7818,781c,781e,7839,783c-783d,7842,7844,7847,784b,7851,7853-7854,7866,787a,7881,7888,788d,78af,78b1,78b6,78b8-78b9,78c7,78d2-78d3,78d7-78d8,78e4,78ee,78f0-78f1,78f5,7906,792e,7932-7934,7936,793b-793c,7958-7959,7962,7971,797e,7980,7983,7986-7987,7991,7999,799d,799f,79a5,79a9,79c4,79c6,79cc,79d4,79e2,79f1,79f4,7a06,7a2a,7a2d,7a3a,7a3e,7a43,7a45,7a49,7a65,7a7d,7a83,7a91,7a93,7ab0,7abb-7abc,7ac2-7ac3,7ac8-7ac9,7acf,7ad3,7ada-7add,7ae2,7ae7,7ae9-7aea,7afe,7b0b-7b0c,7b14,7b1f,7b27,7b29,7b39,7b42-7b43,7b55,7b62,7b6c,7b6f,7b7b,7b92,7ba2-7ba3,7bb2,7bcf-7bd0,7bec,7bfa,7bfc,7c12,7c15,7c1b,7c35,7c42,7c44,7c51,7c56,7c5d,7c6d,7c70,7c74,7c7b-7c7c,7c7e,7c83,7c86,7c8e,7c9c,7ca6-7ca7,7cac,7cae,7cb8,7cc2-7cc3,7cc7,7cc9,7ccd,7cd3,7cda,7ce6,7ced,7cf3,7cf5,7cf9,7cfc,7d25,7d4d,7d5a,7d5d,7d89,7d8b,7d97,7da4,7da8,7dab,7db3,7dcd,7dcf-7dd0,7dd3-7dd4,7ddc,7de4-7de5,7df5,7dfd-7dfe,7e07,7e27,7e5b,7e65,7e67,7e6c,7e6e,7e7f,7e8e,7e92,7e9f,7ea4,7eac,7eba,7ec7,7ecf,7edf,7f06,7f37,7f40-7f41,7f47,7f49,7f4e,7f52-7f53,7f71,7f78,7f8f,7f93,7f97,7fa3,7fae,7fb4,7fdd,7fe7,7ffa,8002,8008,801d,8020,8025,802e-802f,8031,803b-803c,8054,805b,8061-8063,8066,8080,809f,80a7,80b6-80b7,80bc-80bd,80c6,80e9,80ec,80f6,8103,8107,8109,810c,810e,8112,8114,8117,811a,812a,8132,8134,8137,8142,8148,8156,8159-815a,816d,817c,8184,8193,81a5,81aa,81b6,81c1,81c8,81e4,81ef,81f6,8218,821a,8226,8229,822d,823e,8254,8262,8265,8276,8279-827b,8287,82a6,82aa,82bf,82c4,82ca,82cf-82d0,82d8,82e2,82ee,82f7-82f8,82fc-82fd,82ff,830b,8318,831a,831d,833d,8357,8362-8363,8366,836f,8385,8391,839c,83ac,83b9,83be,83cd,83d3,83ed,8405,8414,8416,8418,841c,8420-8421,8424,8426,842e,843e,8448,844a,8453,8455,8458,845c,8462,8464,8471-8472,847f-8480,8488,8492-8493,8496,84a3,84ad,84bd-84be,84da,84de,84e1-84e2,84e4-84e5,84f8,8503,8505,8510,8533-8534,8538,8542,854b-854c,8552,855a,855f,856f-8570,8573,8597,85c1,85d6,85e0,85ee,85fc,8602,860d,860f-8610,8614,8616,8628,862f,8642,8645,866c,8672,867e,8692,86a0,86ad,86b2,86ef,8770-8771,877d,8786,878b-878c,87a5,87a9,87b1,87c1,87ce,87d6,87da,87ee,87f5,8804,880f,8818,8827,882d,8842,8845-8846,884f,885e,8860,8864-8865,886e,8884,8887,888f-8890,889c,88a0,88ae,88b4-88b5,88bf,88c5,88c7,88cf,88e6,88f5,88ff-8900,8924,8943,8947,894d,8954,8965,8977,8980,8987,8989-898a,8991,8994,89a5,89a7,89a9,89bc,89c1,89c6,89e7,8a1c,8a29,8a2b,8a38,8a3d,8a49,8a67,8a7e,8a90,8a94,8a9c,8aa9,8aaf,8ab4,8ada,8aea,8b0c,8b1f,8b2d,8b3f,8b43,8b4c-8b4d,8b5e,8b62,8b69,8b81,8b83,8b90,8b9b,8ba0,8bbe,8be2,8c51,8c9b,8c9f,8cad,8ccd,8cd4,8cd6,8cdb,8ce9,8ceb,8cf2,8cf7,8d03,8d0b-8d0c,8d11-8d12,8d18,8d1c-8d1d,8d7a,8d82,8da6,8da9,8dc0,8dc3,8dd4,8e01,8e0e,8e28,8e2a,8e2d,8e3a,8e46,8e4f,8e68,8e71,8e75,8e77,8e7e,8e80,8ea7,8ead,8eb0,8eb6,8eb9,8ebc,8ec3,8ece,8eda,8ee2,8ee4,8eed,8ef2,8f19,8f2d,8f30,8f41,8f4a,8f5c,8f66-8f67,8f6e,8f93,8fa0,8fa5,8fa7,8fb3,8fb5-8fbc,8fbe,8fc1,8fca,8fcc,8fcf-8fd0,8fda,8ff9,9008,9012,9033,9037,904c,9056,9061,9064,906c,90a8,90ae,90bb,90c4,9151,9159,915c,915e,9167,9170,9176,917c,918c,918e,91a9,91b6,91bb,91c4,91d6,91df,91e5,91f6,91fa,91fe,9208,920e,9213,9221,9228,922a-922b,9235,923c,9241,9244,9255,9258,925d,925f,9262,926b,926e,9277,9281,9284,9289,928f,92ae,92b1,92b9-92ba,92be-92bf,92d4,92db,92e3,92e5,92eb-92ec,92f2-92f4,92f6,92fd,9303,9307,932c,9330-9331,9340-9345,9348,935f,9362,9366,9368-9369,936b,936e,9373-9374,9378,937d,9381,9384-9387,9390,939c,93a0,93ad,93b8,93bb,93bd,93bf,93c6,93cb,93d3,93db,93e0,93f0-93f1,93f3-93f4,9401,9404,9408,9417,941b,941d,9424-9427,942d,943e,9442-9443,944d,9454,9458,945b,9465,9467,946c,9479,947b,9485,949f,94a2,94c1,94c3,94dc,94f6,952d,9547,9578,957f,9585,9596-9597,9599,95a0,95a2,95a6-95a7,95aa,95e8,95f4,961d,9633,9638,9641,9645,9656,9669,967b,9681,968f,9696,96a3,96a5,96b6,96bd,96f4,9703,971b,9721,9731,9736,9740-9741,9751,9755,9757,975d,975f,976d,9771,9787,9789,979b,979f,97b1-97b2,97b4,97b8,97ba,97bd-97be,97c0,97c2,97c8,97d2,97e0,97e6,97ee,97f2,97f5,9814-9815,981f,9823,982e,9833-9834,9847,984b,9866,9868,986c,9875,98b4,98b7,98b9,98c3,98c7-98c8,98ca,98ce,98dc,98de,98e0-98e1,98e6,98ec,98f1,98f5,990e,9919,991c,9937-9939,993b,9940,9942,994a,994d,995d,9962-9963,999b,99a4,99aa,99b8,99bc,99c4-99c5,99da,99e0-99e1,99e6,99f5,9a0c,9a10,9a1f,9a21,9a26,9a2f,9a3b-9a3c,9a58,9a5c,9a63,9a6c,9a8f,9ab2,9ab6,9aba,9abd,9ad7,9ae0,9ae2,9af4,9aff,9b02,9b09,9b0f,9b14,9b2a,9b2d,9b34,9b39,9b40,9b50,9b69,9b7f,9b81,9b83,9b8b,9b8d-9b8f,9b97,9b9d,9b9f,9bb0,9bcf,9bdd,9be9,9bed,9bf1,9bf4,9bff,9c02,9c0a,9c0c,9c10,9c15,9c1b,9c1f-9c20,9c26,9c2f,9c35,9c3a,9c45,9c4f,9c53,9c5d,9c72,9c7b-9c7c,9d02,9d0c,9d16,9d21,9d34,9d39,9d44,9d49,9d4e,9d50,9d5e,9d6d-9d6e,9d7c,9d7e,9d83,9d93,9da5,9dab,9dbd,9dc0,9dc4,9dc9,9dd4,9dfc,9e0a,9e0c,9e0e,9e18,9e1c,9e1f,9e7b,9e81,9e84-9e85,9e90,9e95-9e96,9e98,9e9e,9ea2,9ea6,9ea8,9eaa-9eac,9eaf,9eb1,9ebd,9ebf,9ec1,9ec4,9ec6-9ec7,9ee2,9ef1,9ef8,9efe,9f02,9f08,9f17,9f26-9f27,9f39,9f44-9f45,9f50,9f53,9f5a,9f62,9f69,9f7f,9f8e,9f99,9f9f,9fa5,e000,e002-e003,e009-e00a,e00c,e00e,e012-e016,e018,e01a-e01e,e020,e022-e023,e025,e02d-e02e,e030,e032-e038,e03b-e03c,e045,e04c,e05a,e05c,e05f-e061,e064,e066,e06c,e071,e074-e075,e078,e07d,e087,e089-e08a,e08c,e093-e094,e099-e09a,e09c-e09e,e0a6-e0a7,e0a9,e0ab,e0ae,e0ba,e0bc,e0be,e0c3,e0c5,e0c7-e0c8,e0ca,e0d0,e0d4-e0d5,e0dc,e0df,e0e2-e0e5,e0e7-e0e9,e0eb-e0ec,e0ee,e0f2,e0f8-e0f9,e0fb,e0fd,e103,e106,e109-e10b,e110,e114-e115,e11c-e11d,e121,e126-e128,e130-e131,e136,e139,e141-e142,e145,e147-e148,e14a,e14d,e150,e154-e157,e159-e15a,e15d,e162,e168-e16a,e171-e172,e175,e178-e179,e17b-e17c,e17f-e180,e185,e187,e189,e18b,e18f-e190,e193,e195-e196,e19f-e1a0,e1a4,e1a6,e1aa,e1ae,e1b0-e1b1,e1b3-e1b4,e1b6,e1b8,e1bb-e1bf,e1c1,e1c4-e1c5,e1c8,e1cc-e1cd,e1d4-e1d5,e1d7,e1da,e1dd,e1e2,e1e6,e1eb,e1ef-e1f0,e1f2,e1f7,e1fa,e1fe,e200-e202,e205,e207,e20a-e20c,e210,e212-e216,e219,e21b-e21c,e21f-e221,e226-e228,e22a,e22f,e231,e233,e237,e23b,e23d-e23e,e245,e248,e24a-e24f,e251-e254,e261,e268,e26b,e26d-e26f,e271,e27a,e27d,e282,e288-e289,e28b,e290-e291,e294-e296,e299-e29b,e29f,e2a1,e2a4,e2a6,e2b2-e2b5,e2b7-e2b8,e2ba,e2be-e2bf,e2c1,e2c7,e2c9,e2d4,e2d8-e2d9,e2de,e2e0-e2e2,e2e7,e2e9,e2eb-e2ed,e2f0-e2f1,e2f8,e2fc,e2ff-e301,e306,e308,e30c,e30f,e311,e313,e315,e318,e31b-e31c,e31f,e325,e32c,e330-e331,e335-e336,e33b,e33d,e342,e345,e348,e352,e354,e35b-e35c,e360,e362,e364-e365,e36f,e372,e374-e375,e377,e379,e37b,e381-e382,e386,e388-e38a,e38d,e391,e393-e394,e396,e398,e39a-e39b,e39e-e3a0,e3a2,e3a5-e3a9,e3ac,e3b1-e3b2,e3b4-e3b5,e3b9-e3bd,e3c3,e3c8,e3cc-e3cd,e3cf,e3d5,e3d8-e3da,e3e1,e3e3,e3e7,e3ed-e3ee,e3f0,e3f2-e3f4,e3f8,e3fa,e3fd,e3ff,e409-e40b,e414,e41b,e41d-e41e,e423,e425-e426,e428,e42c-e42d,e432,e436,e43a-e43c,e43e,e440-e441,e444,e448,e44c-e44e,e450-e451,e459-e45a,e45d-e45e,e461-e463,e465,e467-e46a,e46c,e46e-e46f,e471-e472,e474,e476,e47e-e47f,e484,e486-e48a,e48d-e48e,e491-e492,e495-e497,e4a1-e4a4,e4ab,e4af,e4b3-e4ba,e4c1,e4c6,e4c9,e4cd-e4ce,e4d6,e4d9,e4dc-e4dd,e4e4,e4e6-e4e8,e4ee-e4ef,e4f6,e4f8-e4f9,e4ff,e501-e502,e505,e50a,e50d,e50f,e512,e514,e516,e51a,e51c-e521,e524,e528-e52c,e52e-e52f,e537,e53e,e543,e54b,e554-e555,e557-e559,e55b-e55c,e55e-e55f,e562,e566-e567,e56d-e56e,e570,e572-e573,e575-e577,e579-e57a,e57c-e57e,e580,e582-e586,e588,e58b-e590,e592-e594,e59a,e59d-e5a1,e5a4,e5a6-e5a8,e5aa,e5af,e5b1-e5b2,e5b5,e5b7-e5b8,e5ba-e5bb,e5be-e5c0,e5c2,e5c8-e5c9,e5d7-e5d9,e5db-e5dc,e5df,e5e1-e5e3,e5e5-e5e6,e5e9,e5ee-e5f1,e5f3,e5fb-e5fc,e600,e602,e604,e60f-e612,e619-e61c,e621,e623-e624,e627,e62b,e632-e634,e637-e638,e63a,e63c,e63f-e642,e645-e646,e648,e64b,e64e-e64f,e652-e655,e657-e659,e65d-e660,e662-e663,e665-e668,e66a,e66e-e66f,e671,e676-e679,e67b-e67d,e67f-e680,e683-e688,e68a-e68c,e68e-e690,e692,e696-e697,e699-e69a,e69c,e69e-e69f,e6a1-e6a2,e6a6,e6ac-e6ad,e6b2,e6b9-e6ba,e6bd-e6be,e6c0-e6c1,e6c5,e6c7,e6ca,e6d1-e6d2,e6d7-e6d8,e6da-e6db,e6dd-e6e1,e6e4-e6e6,e6ee,e6f2-e6f3,e6f7,e6fa-e6fc,e6ff,e701-e702,e706-e707,e709-e70a,e70c,e710-e711,e713,e717-e718,e71a-e71b,e71d,e724-e725,e72b,e72f,e733-e737,e73c-e73d,e740-e742,e744,e747,e74d-e74f,e751-e752,e75b-e75d,e75f,e761-e762,e764-e765,e767-e769,e76c-e76e,e770,e775,e777-e778,e77a,e77c-e77d,e784,e786,e789,e78b,e78d,e790,e792,e794,e796-e797,e799,e7a2,e7a4-e7a9,e7b1,e7b4,e7b8,e7bc,e7c4,e7ca,e7ce,e7d1,e7d8,e7da,e7dc-e7dd,e7e4,e7e7-e7e9,e7eb,e7ed-e7ef,e7f1-e7f3,e7f8,e7fb-e7fc,e7ff-e802,e808,e80c,e80e-e80f,e811,e813,e816-e818,e81a,e821,e827-e828,e82d,e82f,e835,e837-e838,e83a-e83b,e841-e842,e84b,e84d-e84e,e851,e855-e858,e85b-e85d,e860-e862,e865-e867,e869-e86a,e86c,e871,e878,e87d-e87f,e887,e88f,e891-e892,e894-e895,e89a,e89d,e8a0-e8a1,e8a3-e8a7,e8a9-e8aa,e8ac-e8b0,e8b5-e8b6,e8b8,e8bd-e8c3,e8c5,e8c7,e8cb,e8cd-e8ce,e8d0-e8d1,e8d3,e8d5-e8d6,e8d8-e8da,e8dd,e8df-e8e1,e8e5-e8e6,e8e8-e8ea,e8ed,e8f1-e8f2,e8f5,e8fb,e8fe,e900,e903,e907-e908,e90c,e917-e918,e91c,e91e-e922,e925-e92c,e92e-e92f,e933-e936,e938,e93a,e93c-e93e,e941,e944-e945,e948,e94d,e950,e952-e955,e957-e958,e95a,e95c-e95e,e960-e961,e964,e967-e968,e96e-e96f,e973-e975,e977-e978,e97a-e97b,e97d,e981-e982,e987,e98a,e98e,e991,e9b0,e9cb,e9ef,ea43,eaa9,eabf-eac1,eac5,eac9-eacc,eacf-ead1,ead3-ead4,ead6-eada,eadc,eade-eae3,eae7-eaec,eaee,eaf0-eaf2,eaf4-eaf6,eaf8-eafb,eafe-eb00,eb02-eb05,eb08-eb0f,eb11-eb12,eb15,eb18-eb1d,eb1f-eb21,eb23,eb25,eb27,eb2a,eb2c-eb39,eb3d-eb3f,eb41,eb43-eb44,eb46,eb4a-eb50,eb53-eb5b,eb5d,eb5f,eb61-eb63,eb65,eb67-eb69,eb6b,eb6d,eb6f-eb71,eb73-eb74,eb76-eb78,eb7a,eb7e-eb81,eb83-eb85,eb88-eb8a,eb8c-eb90,eb93,eb95,eb97-eb9b,eb9f-eba0,eba2-eba3,eba5-eba6,eba8,ebaa-ebab,ebad-ebb0,ebb2-ebb4,ebb6,ebb9,ebbc-ebbd,ebbf,ebc2,ebc5-ebc8,ebca,ebcc-ebce,ebd0,ebd3,ebd5,ebd7-ebd8,ebda-ebdb,ebdd,ebdf,ebe1,ebe4,ebe7-ebe9,ebeb-ebec,ebee-ebef,ebf1-ebf2,ebf5-ebf6,ebf9-ebfb,ebfd-ebfe,ec05-ec06,ec08-ec09,ec0c,ec0e-ec10,ec13-ec14,ec17-ec1d,ec20,ec22,ec24,ec26,ec2a-ec2f,ec31-ec32,ec35,ec37,ec3b-ec3c,ec3f-ec49,ec4b-ec4c,ec4f,ec52,ec54,ec56-ec58,ec5a,ec5c-ec5d,ec5f-ec60,ec62-ec63,ec67-ec73,ec75-ec76,ec79,ec7b,ec7e,ec80,ec84,ec86,ec8d-ec8e,ec91-ec96,ec98-ec9b,ec9d-ec9e,eca0,eca3-eca4,eca7-eca8,ecab,ecad,ecaf,ecb4,ecb6,ecb9-ecbb,eccf,ecd4,ecdb-ecdc,ecde-ece1,ece5,ecf0,ecf2,ecf5,ecfc,ed04,ed07,ed0a,ed0c-ed11,ed13,ed15-ed18,ed1a,ed1c-ed1e,ed22,ed24-ed27,ed29-ed2a,ed2c-ed2d,ed3b,ed3d,ed41-ed42,ed45,ed47,ed4a-ed4b,ed4d-ed4f,ed51-ed54,ed57-ed58,ed5f,ed62,ed6b,ed71-ed72,ed75,ed77-ed78,ed7a,ed81,ed84-ed86,ed88-ed8b,ed8e,ed91,eda6,edc6,edcf,edd1,edd7,edda-eddb,eddd,ede1,eded,ee08,ee11,ee15,ee1b,ee20,ee22,ee2a,ee30-ee31,ee34,ee48,ee56,ee5b,ee5d,ee60,ee64,ee6a,ee76,ee7c,ee7e,ee91,ee9c,eea2-eeaa,eeac-eeb1,eeb4,eeb7,f303-f318,f325,f327,f344,f346,f34a-f34b,f3a0-f3a1,f3ac,f3f0,f3f9-f3fa,f3fc,f408-f40b,f43d,f440-f442,f444,f446,f448-f449,f44b,f44d,f450-f452,f454-f457,f45a-f45f,f461-f463,f465-f466,f469,f46c-f46f,f474,f477-f479,f47b-f47e,f480-f481,f483-f485,f488,f48b,f48d-f491,f497-f498,f49b,f49e,f4a4-f4a7,f4a9-f4aa,f4ad,f4af-f4b0,f4b2-f4b4,f4b7,f4ba-f4c1,f4c3-f4c5,f4c7-f4ca,f4cc-f4cf,f4d1-f4d5,f4d7,f4d9-f4e0,f4e2-f4e9,f4ef,f4f2-f4f3,f4f8,f4fc,f4fe-f501,f503,f505,f507-f511,f513-f516,f518-f51d,f51f-f526,f52a,f533-f534,f53a-f53b,f53d,f54e,f553,f556,f559-f55a,f55e,f565,f56b,f572,f579-f57a,f57d,f581,f583,f585,f58b-f58c,f58e,f593,f596,f59b-f59c,f5a0,f5a3-f5a4,f5ab,f5b0,f5b4,f5b6,f5b9,f5bd,f5c0,f5c4-f5c5,f5cc,f5ce,f5d0,f5d5-f5d7,f5e4,f5e6,f5e8,f5ea-f5ed,f5ef,f694,f69e,f6ad,f6b0,f7e5-f7e6,f7e8,f7ea-f7eb,f7ed-f7ee,f907,ff02,ff07,ff3b,ff3d,ffe2,ffe4,ffed,00af-00b1,00b7,00d7,00f7,02c7,02c9-02cb,02cd,02d9,0391-03a1,03a3-03a9,03b1-03c1,03c3-03c9,2013-2014,2018-2019,201c-201d,2025-2027,2032,2035,203b,20ac,2103,2105,2109,2160-2169,2190-2193,2196-2199,2215,221a,221e-2220,2223,2225,2229-222b,222e,2234-2235,2252,2260-2261,2266-2267,2295,2299,22a5,22bf,2500,2502,250c,2510,2514,2518,251c,2524,252c,2534,253c,2550-2574,2581-258f,2593-2595,25a0-25a1,25b2-25b3,25bc-25bd,25c6-25c7,25cb,25ce-25cf,25e2-25e5,2605-2606,2640,2642,3000-3003,3008-3012,3014-3015,301d-301e,3021-3029,3105-3129,32a3,338e-338f,339c-339e,33a1,33c4,33ce,33d1-33d2,33d5,4e00-4e01,4e03,4e07-4e11,4e14-4e16,4e18-4e19,4e1e-4e1f,4e26,4e2b,4e2d-4e2e,4e30-4e33,4e38-4e39,4e3b-4e3c,4e42-4e43,4e45,4e47-4e48,4e4b,4e4d-4e4f,4e52-4e53,4e56,4e58-4e59,4e5c-4e5f,4e69,4e73,4e7e-4e7f,4e82-4e84,4e86,4e88,4e8b-4e8e,4e91-4e95,4e99,4e9b,4e9e-4e9f,4ea1-4ea2,4ea4-4ea6,4ea8,4eab-4eae,4eb3,4eb6,4eb9-4eba,4ec0-4ec4,4ec6-4ecb,4ecd,4ed4-4eda,4edc-4edf,4ee1,4ee3-4ee5,4ee8-4ee9,4ef0-4ef7,4efb,4efd,4eff-4f02,4f04-4f05,4f08-4f0b,4f0d-4f15,4f18-4f19,4f1d,4f22,4f2c-4f2d,4f2f-4f30,4f33-4f34,4f36,4f38,4f3a-4f3f,4f41,4f43,4f46-4f49,4f4c-4f64,4f67,4f69-4f6c,4f6e-4f70,4f73-4f89,4f8b,4f8d,4f8f-4f92,4f94-4f98,4f9a-4f9e,4fae-4faf,4fb2-4fb3,4fb5-4fb7,4fb9-4fbb,4fbf-4fc5,4fc7,4fc9-4fcb,4fcd-4fd1,4fd3-4fd4,4fd6-4fe1,4fec,4fee-4fef,4ff1,4ff3-4ff8,4ffa,4ffe,5000,5005-5007,5009,500b-500f,5011-501c,501e-5023,5025-502d,502f-5031,5033,5035,5037,503c,5040-5041,5043,5045-504f,5051,5053,5055,5057,505a-5065,5068-506b,506d-5070,5072-5077,507a,507d,5080,5082-5083,5085,5087,508b-508e,5091-5092,5094-5096,5098-509e,50a2-50a3,50ac-50b8,50ba-50bb,50bd-50bf,50c1-50c2,50c4-50cb,50ce-50cf,50d1,50d3-50d7,50da-50db,50dd,50e0,50e3-50ea,50ec-50f1,50f3,50f5-50f6,50f8-50f9,50fb,50fd-5100,5102-510c,5110-5115,5117-5118,511a,511c,511f-5122,5124-5126,5129-512a,512d-512e,5130-5135,5137-513d,513f-5141,5143-5149,514b-514d,5152,5154-5155,5157,5159-515f,5161-5163,5165,5167-5169,516b-516e,5171,5175-5178,517c,5180,5187,5189-518a,518d,518f,5191-5195,5197-5198,519e,51a0,51a2,51a4-51a5,51aa,51ac,51b0-51b1,51b6-51b7,51b9,51bc-51be,51c4-51c6,51c8,51ca-51ce,51d0,51d4,51d7-51d8,51dc-51de,51e0-51e1,51f0-51f1,51f3,51f5-51f6,51f8-51fa,51fd,5200-5201,5203,5206-520a,520c,520e,5210-5213,5216-5217,521c-521e,5221,5224-5225,5228-522a,522e,5230-5233,5235-5238,523a-523b,5241,5243-5244,5246-5247,5249-524e,5252,5254-5256,525a-525f,5261-5262,5269-526f,5272,5274-5275,5277-5278,527a-527d,527f-5284,5287-528d,5291,5293,5296-5299,529b,529f-52a0,52a3,52a6,52a9-52ae,52bb-52bc,52be,52c0-52c3,52c7,52c9,52cd,52d2-52d3,52d5-52d9,52db,52dd-52df,52e2-52e4,52e6,52e9,52eb,52ef-52f1,52f3-52f5,52f7-52f8,52fa-52fc,52fe-52ff,5305-5306,5308-530b,530d-5312,5315-5317,5319-531a,531c-531d,531f-5323,532a,532d,532f-5331,5334,5337,5339,533c-5341,5343-5345,5347-534a,534c-534d,5351-5354,5357,535a,535c,535e,5360-5361,5363,5366,536c,536e-5373,5375,5377-5379,537b-537c,537f,5382,5384,538a,538e-538f,5392,5394,5396-539a,539c-539f,53a4-53a5,53a7,53ac-53ad,53b2,53b4,53b9,53bb,53c3,53c8-53cb,53cd,53d4,53d6-53d7,53db,53df,53e1-53e6,53e8-53f3,53f5,53f8,53fb-53fc,5401,5403-5404,5406-5412,5418-5419,541b-5420,5424-542e,5430-5431,5433,5435-5439,543b-543e,5440-5443,5445-5448,544a,544e-544f,5454,5460-5468,546b-546c,546f-5478,547a-5482,5484,5486-5488,548b-548e,5490-5492,5495-5496,5498,549a,54a0-54a2,54a5-54b1,54b3,54b6-54b8,54ba-54c9,54ce-54cf,54d6,54de,54e0-54e2,54e4-54eb,54ed-54ee,54f1-54f3,54f7-54f8,54fa-54fd,54ff,5501,5503-550c,550e-5512,5514,5517,551a,5526-5527,552a,552c-5539,553b-553c,553e,5540-5541,5543-5546,5548,554a-554b,554d-5552,5555-5557,555c,555e-555f,5561-5566,556a,5575-5577,557b-5584,5587-558f,5591-5595,5598-559a,559c-559d,559f,55a1-55a8,55aa-55ae,55b1-55b3,55b5,55bb,55bf-55c0,55c2-55d6,55d9-55dd,55df,55e1-55e9,55ef,55f2,55f6-55f7,55f9-55fa,55fc-5602,5604,5606,5608-5609,560c-5610,5612-5617,561b-561d,561f,5627,5629-562a,562c,562e-5630,5632-5636,5638-563b,563d-5642,5645-5646,5648-564a,564c,564e,5653,5657-565a,565e,5660,5662-5666,5668-5674,5676-5679,567e-5687,568c-5690,5693,5695,5697-569a,569c-569d,56a5-56a8,56aa-56ae,56b2-56b7,56bc-56be,56c0-56c3,56c5-56c6,56c8-56cd,56d1,56d3-56d4,56d7,56da-56db,56dd-56e1,56e4-56e5,56e7,56ea-56eb,56ee,56f0,56f7,56f9-56fa,56ff,5701-5704,5707-570d,5712-5714,5716,5718,571a-571c,571e-5720,5722-5723,5728-572a,572c-5730,5733-5734,573b,573e,5740-5741,5745,5747,5749-5752,5761-5762,5764,5766,5768-576b,576d,576f-5777,577b-577d,5780,5782-5783,578b-578c,578f,5793-5795,5797-579b,579d-57a0,57a2-57a5,57ae,57b5-57b6,57b8-57ba,57bc-57bd,57bf,57c1-57c3,57c6-57c7,57cb-57cc,57ce-57d0,57d2,57d4-57d5,57dc,57df-57e5,57e7,57e9,57ec-57ee,57f0-57fd,5800-5802,5804-580e,5810,5814,5819,581b-581e,5820-5821,5823-5825,5827-582a,582c-5839,583b,583d,583f,5848-584f,5851-5855,5857-585b,585d-585e,5862-5865,5868,586b,586d,586f,5871,5874-5876,5879-5883,5885-588b,588e-5891,5893-5894,5898,589c-58a1,58a3,58a5-58a6,58a8-58a9,58ab-58ac,58ae-58af,58b1,58b3,58ba-58bf,58c1-58c2,58c5-58c9,58ce-58cf,58d1-58d6,58d8-58db,58dd-58df,58e2-58e4,58e7-58e9,58eb-58ec,58ef,58f4,58f9-58fa,58fc-58ff,5903,5906,590c-590f,5912,5914-5917,5919-591a,591c,5920,5922,5924-5925,5927,5929-592f,5931,5937-5938,593c,593e,5940,5944-5945,5947-594a,594e-5951,5953-5955,5957-5958,595a,595c,5960-5962,5967,5969-596b,596d-596e,5970-5974,5976-5979,597b-5985,598a,598d-5990,5992-5993,5996-5999,599d-599e,59a0-59a8,59ae-59af,59b1-59b6,59b9-59be,59c0-59c1,59c3,59c5-59c8,59ca-59d4,59d6,59d8,59da-59de,59e0-59e1,59e3-59e6,59e8-59ea,59ec-59ee,59f1-59f7,59fa-5a01,5a03,5a09-5a0a,5a0c,5a0f,5a11,5a13,5a15-5a19,5a1b-5a1c,5a1e-5a20,5a23,5a25,5a29,5a2d-5a2e,5a33,5a35-5a39,5a3c,5a3e,5a40-5a44,5a46-5a4a,5a4c-5a4d,5a50-5a53,5a55-5a58,5a5a-5a60,5a62,5a64-5a67,5a69-5a6a,5a6c-5a6d,5a70,5a77-5a78,5a7a-5a7d,5a7f,5a83-5a84,5a8a-5a8c,5a8e-5a90,5a92-5a95,5a97,5a9a-5a9f,5aa2,5aa5-5aa7,5aa9,5aac,5aae-5ac2,5ac4,5ac6-5acd,5ad5-5ae3,5ae5-5ae6,5ae8-5aee,5af3-5afb,5afd,5aff,5b01-5b03,5b05,5b07-5b09,5b0b-5b0c,5b0f-5b10,5b13-5b14,5b16-5b17,5b19-5b1b,5b1d-5b1e,5b20-5b21,5b23-5b28,5b2a,5b2c-5b30,5b32,5b34,5b38,5b3c-5b40,5b43,5b45,5b47-5b48,5b4b-5b4e,5b50-5b51,5b53-5b58,5b5a-5b5d,5b5f,5b62-5b65,5b69,5b6b-5b6c,5b6e,5b70-5b73,5b75,5b77-5b78,5b7a-5b7b,5b7d,5b7f,5b81,5b83-5b85,5b87-5b89,5b8b-5b8c,5b8e-5b8f,5b92-5b93,5b95,5b97-5b9c,5ba2-5ba8,5bac-5bae,5bb0,5bb3-5bb6,5bb8-5bb9,5bbf-5bc2,5bc4-5bc7,5bca-5bce,5bd0-5bd4,5bd6,5bd8-5bd9,5bde-5bec,5bee-5bf2,5bf5-5bf6,5bf8,5bfa,5c01,5c03-5c04,5c07-5c12,5c15-5c16,5c1a,5c1f,5c22,5c24-5c25,5c28,5c2a,5c2c,5c30-5c31,5c33,5c37-5c3c,5c3e-5c41,5c44-5c48,5c4b-5c51,5c54-5c56,5c58-5c59,5c5c-5c5d,5c60,5c62-5c65,5c67-5c6a,5c6c-5c6f,5c71,5c73-5c74,5c79-5c7c,5c7e,5c86,5c88-5c8d,5c8f-5c95,5c9d,5c9f-5cb1,5cb3,5cb5-5cb8,5cc6-5ccc,5cce-5cd0,5cd2-5cd4,5cd6-5cdb,5cde-5cdf,5ce8,5cea,5cec-5cee,5cf0-5cf1,5cf4,5cf6-5cf9,5cfb,5cfd,5cff-5d01,5d06-5d07,5d0b-5d0f,5d11-5d12,5d14,5d16-5d17,5d19-5d1b,5d1d-5d20,5d22-5d29,5d2e,5d30-5d3a,5d3c-5d3d,5d3f-5d43,5d45,5d47,5d49-5d4c,5d4e,5d50-5d52,5d55,5d59,5d5e,5d62-5d63,5d65,5d67-5d69,5d6b-5d6c,5d6f,5d71-5d72,5d77,5d79-5d7a,5d7c-5d82,5d84,5d86-5d8a,5d8d,5d92-5d95,5d97,5d99-5d9a,5d9c-5da2,5da7-5daa,5dac-5db2,5db4-5db5,5db7-5db8,5dba,5dbc-5dbd,5dc0,5dc2-5dc3,5dc6-5dc7,5dc9,5dcb,5dcd,5dcf,5dd1-5dd2,5dd4-5dd6,5dd8,5ddd-5de2,5de5-5de8,5deb,5dee,5df0-5df4,5df7,5df9,5dfd-5dff,5e02-5e04,5e06,5e0a,5e0c,5e0e,5e11,5e14-5e1b,5e1d,5e1f-5e25,5e28-5e29,5e2b,5e2d,5e33-5e34,5e36-5e38,5e3d-5e3e,5e40-5e41,5e43-5e45,5e4a-5e4f,5e53-5e55,5e57-5e59,5e5b-5e5d,5e5f-5e63,5e66-5e70,5e72-5e76,5e78-5e79,5e7b-5e7e,5e80,5e82,5e84,5e87-5e8d,5e8f,5e95-5e97,5e9a-5e9c,5ea0,5ea2-5ea8,5eaa-5eae,5eb0-5eb9,5ebe,5ec1-5ec2,5ec4-5ecc,5ece,5ed1-5ee3,5ee5-5ee9,5eec,5eee-5eef,5ef1-5ef3,5ef6-5ef7,5efa,5efe-5eff,5f01-5f02,5f04-5f05,5f07-5f08,5f0a-5f0b,5f0f,5f12-5f15,5f17-5f18,5f1a-5f1b,5f1d,5f1f,5f22-5f24,5f26-5f29,5f2d-5f2e,5f30-5f31,5f33,5f35-5f38,5f3c,5f40,5f43-5f44,5f46,5f48-5f4c,5f4e-5f4f,5f54,5f56-5f59,5f5d,5f62,5f64-5f65,5f67,5f69-5f6d,5f6f-5f71,5f73-5f74,5f76-5f79,5f7c-5f82,5f85-5f8c,5f90-5f92,5f96-5f99,5f9b-5f9c,5f9e-5fa1,5fa5-5fa6,5fa8-5faf,5fb2,5fb5-5fb7,5fb9,5fbb-5fc1,5fc3,5fc5,5fc9,5fcc-5fcd,5fcf-5fd2,5fd4-5fd9,5fdd-5fde,5fe0-5fe1,5fe3-5fe5,5fe8,5fea-5feb,5fed-5fef,5ff1,5ff3-5ff5,5ff7-5ff8,5ffa-5ffb,5ffd,5fff-6000,6009-6017,6019-601e,6020-6022,6024-602f,6032-6035,6037,6039,6040-6047,6049,604c-604d,6050,6052-6055,6058-605b,605d-605f,6062-6070,6072,607f-6081,6083-608a,608c-608e,6090,6092,6094-6097,609a-609d,609f-60a0,60a2-60a3,60a8,60b0-60b2,60b4-60c1,60c3-60cf,60d1,60d3-60d5,60d8-60dd,60df-60e2,60e4,60e6,60f0-60fc,60fe-6101,6103-6106,6108-610b,610d-6110,6112-6116,6118,611a-611d,611f,6123,6127-6129,612b-612c,612e-612f,6132,6134,6136-6137,613b,613e-6141,6144-614f,6152-6156,6158,615a-615b,615d-615f,6161-6163,6165-6168,616a-616c,616e,6170-6177,6179-617a,617c,617e,6180,6182-6183,6189-618e,6190-6194,6196,619a-619b,619d,619f,61a1-61a2,61a4,61a7-61b6,61b8,61ba,61bc,61be-61bf,61c1-61c3,61c5-61cd,61d6,61d8,61de-61e0,61e3-61eb,61ed-61ee,61f0-61f2,61f5-6201,6203-6204,6207-620a,620c-620e,6210-6212,6214-6216,6219-621b,621f-6225,6227,6229-622b,622d-622e,6230,6232-6234,6236,623a,623d-6243,6246-624b,624d-624e,6250-6254,6258-625c,625e,6260-6266,626d-6274,6276-6277,6279-6281,6283-6284,6286-628a,628c,628e-628f,6291-6298,62a8-62b1,62b3-62b6,62b8-62b9,62bb-62bf,62c2,62c4,62c6-62d4,62d6-62dc,62eb-6303,6307-6309,630b-6311,6313-6316,6328-632d,632f,6332-6334,6336,6338-633e,6340-6351,6354-635a,6365,6367-6369,636b,636d-6372,6375-6378,637a-637d,6380-6385,6387-638a,638c-6392,6394,6396-6399,639b-63a5,63a7-63b1,63bd-63be,63c0,63c2-63d0,63d2-63d3,63d5-63dd,63df-63e1,63e3-63e5,63e7-63eb,63ed-63f6,63f9,6406,6409-6410,6412-6418,641a-641c,641e-6428,642a-6430,6433-6437,6439,643d-6441,6443,644b,644d-644e,6450-6454,6458-6459,645b-6461,6465-6469,646b-6470,6472-647b,647d,647f,6482,6485,6487-648c,648f-6490,6492-6493,6495-649a,649c-64a0,64a2-64a6,64a9,64ab-64ae,64b0-64b3,64bb-64bf,64c1-64c5,64c7,64c9-64cb,64cd-64d0,64d2,64d4,64d6-64db,64e0,64e2-64e4,64e6,64e8-64e9,64eb-64ed,64ef-64f4,64f7-64f8,64fa-6501,6503-6504,6506-6507,6509,650c-6510,6513-6519,651b-651d,6520-6526,6529-652f,6532-6533,6536-6539,653b,653d-653f,6541,6543,6545-6546,6548-654a,654f,6551,6553-6559,655c-655e,6562-6568,656a,656c,656f,6572-657c,657f-6584,6587,658c,6590-6592,6594-6597,6599,659b-65a2,65a4-65a5,65a7-65a8,65aa-65ac,65ae-65b0,65b2-65b3,65b6-65b9,65bb-65bd,65bf,65c1-65c6,65cb-65d0,65d2-65d3,65d6-65d7,65da-65db,65dd-65df,65e1-65e2,65e5-65e6,65e8-65e9,65ec-65f5,65fa-65fd,6600,6602-6615,661c-661d,661f-6622,6624-6628,662b,662d-662f,6631-6636,6639-663a,6641-6643,6645,6647,6649-664a,664c,664f,6651-6652,6659-665f,6661-6662,6664-6666,6668,666a,666c,666e-6672,6674,6676-667c,667e,6680,6684,6686-668d,6690-6691,6694-6699,669d,669f-66a2,66a8-66ab,66ae-66b2,66b4-66b5,66b7-66bb,66bd-66be,66c0,66c4,66c6-66cc,66cf,66d2,66d6,66d8-66de,66e0,66e3-66e4,66e6,66e8-66e9,66eb-66ee,66f0,66f2-66f4,66f6-66f9,66fc,66fe-6701,6703-6705,6708-670b,670d,670f-6710,6712-6715,6717-6718,671b,671d,671f-6723,6726-6728,672a-672e,6731,6733-6735,6738-673f,6745-6749,674b-6751,6753,6755-6757,6759-675a,675c-6760,676a,676c-676d,676f-677f,6781,6783-6787,6789,678b-678e,6790-6795,6797-679a,679c-679d,679f,67ae-67b0,67b2-67bb,67c0-67c6,67c8-67d4,67d8-67df,67e2-67e7,67e9-67f8,67fa,67fc,67ff,6812-6814,6816-6818,681a,681c-681d,681f-6821,6825-6826,6828-682b,682d-682f,6831-6835,6838-683d,6840-6846,6848-6849,684b-6851,6853-6854,686b,686d-686f,6871-6872,6874-6879,687b-6883,6885-6887,6889-688c,688f-6894,6896-6897,689b-689d,689f-68a4,68a7-68b5,68c4,68c6-68c9,68cb-68ce,68d0-68d8,68da,68dc-68e1,68e3-68e4,68e6-68ec,68ee-68fd,6904-6908,690a-6915,6917,6925,692a,692f-6930,6932-6935,6937-6939,693b-693d,693f-6942,6944-6945,6948-694c,694e-694f,6951-6954,6956-6960,6962-6963,6965-6966,6968-6971,6974-697b,6982-6983,6986,698d-698e,6990-6991,6993-6997,6999-699c,699e,69a0-69a1,69a3-69b1,69b3-69b7,69b9,69bb-69bf,69c1-69c4,69c6,69c9-69d0,69d3-69d4,69d9,69e2,69e4-69e8,69eb-69ee,69f1-69f4,69f6-69f8,69fb-6a02,6a04-6a0a,6a0d,6a0f,6a11,6a13-6a19,6a1b,6a1d-6a21,6a23,6a25-6a28,6a32,6a34-6a35,6a38-6a41,6a44,6a46-6a49,6a4b,6a4d-6a51,6a54-6a56,6a58-6a5b,6a5d-6a62,6a64,6a66-6a6b,6a6d,6a6f,6a76,6a7e-6a81,6a83-6a85,6a87,6a89,6a8c-6a8e,6a90-6a97,6a9a-6a9c,6a9e-6aa6,6aa8,6aac-6aaf,6ab3-6ab4,6ab6-6abb,6abd,6ac2-6ac3,6ac5-6ac7,6acb-6acd,6acf-6ad1,6ad3,6ad9-6ae1,6ae5,6ae7-6ae8,6aea-6aec,6aee-6af1,6af3,6af8-6afc,6b00,6b02-6b04,6b08-6b0b,6b0f-6b13,6b16-6b1a,6b1e,6b20-6b21,6b23,6b25,6b28,6b2c-6b2d,6b2f,6b31-6b34,6b36-6b3f,6b41-6b43,6b45-6b4e,6b50-6b51,6b54-6b56,6b59,6b5b-6b5c,6b5e-6b67,6b6a,6b6d,6b72,6b76-6b79,6b7b,6b7e-6b80,6b82-6b84,6b86,6b88-6b8a,6b8c-6b8f,6b91,6b94-6b99,6b9b,6b9e-6ba0,6ba2-6ba7,6baa-6bab,6bad-6bb0,6bb2-6bb3,6bb5-6bb7,6bba,6bbc-6bbd,6bbf-6bc0,6bc3-6bcd,6bcf-6bd0,6bd2-6bd4,6bd6-6bd8,6bda-6bdb,6bde,6be0,6be2-6be4,6be6-6be8,6beb-6bec,6bef-6bf0,6bf2-6bf3,6bf7-6bf9,6bfb-6c06,6c08-6c09,6c0b-6c0d,6c0f-6c11,6c13-6c16,6c18-6c1b,6c1d,6c1f-6c21,6c23-6c28,6c2a-6c2c,6c2e-6c30,6c33-6c34,6c36,6c38,6c3b,6c3e-6c43,6c46,6c4a-6c50,6c52,6c54-6c55,6c57,6c59,6c5b-6c61,6c65-6c6b,6c6d,6c6f-6c74,6c76,6c78,6c7a-6c7b,6c7d-6c7e,6c80-6c90,6c92-6c96,6c98-6c9d,6cab-6cae,6cb0-6cb1,6cb3-6cb4,6cb6-6cc7,6cc9-6cca,6ccc-6ccd,6ccf-6cd7,6cd9-6cde,6ce0-6ce3,6ce5,6ce7-6ce9,6ceb-6cf3,6cf5,6cf9,6d00-6d01,6d03-6d04,6d07-6d12,6d16-6d1b,6d1d-6d20,6d22,6d25,6d27-6d42,6d58-6d5a,6d5e-6d6a,6d6c-6d70,6d74-6d80,6d82-6d8e,6d90-6d95,6d97-6d98,6daa-6dac,6dae-6daf,6db2-6db5,6db7-6db8,6dba-6dc0,6dc2,6dc4-6dcd,6dcf-6de6,6de8-6df7,6df9-6dfd,6e00,6e03,6e05,6e19-6e1d,6e1f-6e28,6e2b-6e36,6e38-6e41,6e43-6e47,6e49-6e4b,6e4d-6e4e,6e51-6e56,6e58,6e5a-6e69,6e6b,6e6e-6e6f,6e71-6e74,6e77-6e79,6e88-6e89,6e8d-6e90,6e92-6e94,6e96-6e99,6e9b-6ea7,6eaa-6eab,6eae-6eb4,6eb6-6eb7,6eb9-6eba,6ebc-6ed6,6ed8,6edc,6eeb-6eef,6ef1-6ef2,6ef4-6ef9,6efb-6f03,6f05-6f0a,6f0d-6f0f,6f12-6f15,6f18-6f1a,6f1c,6f1e-6f23,6f25-6f27,6f29-6f33,6f35-6f3c,6f3e-6f41,6f43,6f4e-6f55,6f57-6f58,6f5a-6f5b,6f5d-6f64,6f66-6f67,6f69-6f70,6f72-6f73,6f76-6f78,6f7a-6f80,6f82,6f84-6f89,6f8b-6f8e,6f90,6f92-6f97,6f9e,6fa0-6fb4,6fb6,6fb8-6fba,6fbc-6fbd,6fbf-6fc4,6fc6-6fcf,6fd4-6fd5,6fd8,6fdb-6fe4,6fe6-6fe9,6feb-6ff2,6ff4,6ff7,6ffa-6ffc,6ffe-7001,7004-7007,7009-700f,7011,7014-701d,701f-7024,7026-702b,702f-7035,7037-703c,703e-7046,7048-704a,704c,7051-7052,7055-7058,705a-705b,705d-7066,7068-706b,7070-7071,7074,7076,7078,707a,707c-707d,7082-7086,708a,708e,7091-7096,7098-709a,709f,70a1,70a4,70a9,70ab-70b1,70b3-70b5,70b7-70b8,70ba,70be,70c5-70c8,70ca-70cb,70cd-70cf,70d1-70d4,70d7-70da,70dc-70de,70e0-70e2,70e4,70ef-70f0,70f3-70f4,70f6-70fd,70ff-7100,7102,7104,7106,7109-710e,7110,7113,7117,7119-711c,711e-7123,7125-7126,7128,712e-7132,7136,713a,7141-7144,7146-7147,7149,714b-714e,7150,7152-7154,7156,7158-715a,715c-716a,716c,716e,7170,7172,7178,717b,717d,7180-7182,7184-7187,7189-718a,718f-7190,7192,7194,7197,7199-71a1,71a4-71a5,71a7-71aa,71ac,71af-71b3,71b5,71b8-71b9,71bc-71cb,71ce-71d0,71d2,71d4-71d6,71d8-71dc,71df-71e2,71e4-71e8,71ec-71ee,71f0-71f2,71f4,71f8-71f9,71fb-71ff,7201-7203,7205-7207,720a,720c-720d,7210,7213-7214,7219-721b,721d-721f,7222-7223,7226-722a,722c-722d,7230,7235-7236,7238-723b,723d-723f,7241-7242,7244,7246-724c,724f,7252-7253,7256,7258-725b,725d-7263,7267,7269-726a,726c,726e-7270,7272-7274,7276-7279,727b-7281,7284-7286,7288-7289,728b-728e,7290-7293,7295-7298,729a-729b,729d-729e,72a1-72aa,72ac,72ae-72b0,72b4-72b5,72ba,72bd,72bf-72c6,72c9-72cc,72ce,72d0-72d2,72d4,72d6-72da,72dc,72df-72e1,72e3-72e4,72e6,72e8-72eb,72f3-72f4,72f6-7301,7307-7308,730a-730c,730f,7311-7313,7316-7319,731b-731e,7322-7323,7325-7327,7329,732d,7330-7337,733a-733c,733e-7340,7342-7345,7349-734a,734c-734e,7350-7352,7357-735b,735d-7362,7365-736c,736e-7370,7372-7373,7375-7378,737a-738b,738e,7392-7397,739d,739f-73a2,73a4-73a6,73a8-73a9,73ab-73ad,73b2-73b9,73bb-73bc,73be-73c0,73c2-73c3,73c5-73c8,73ca-73cd,73d2-73d4,73d6-73de,73e0,73e3,73e5,73e7-73eb,73ed-73ee,73f4-73f6,73f8,73fa,73fc-7401,7403-740d,7416,741a-741b,741d,7420-7426,7428-7436,743a,743f-7442,7444,7446,744a-744b,744d-7452,7454-7455,7457,7459-745c,745e-745f,7462-7464,7467,7469-746a,746d-7473,7475,7479,747c-7481,7483,7485-748b,7490,7492,7494-7495,7497-7498,749a,749c,749e-74a1,74a3,74a5-74ab,74ad,74af-74b2,74b5-74b8,74ba-74bb,74bd-74c3,74c5,74ca-74cb,74cf,74d4-74e6,74e8-74e9,74ec,74ee,74f4-74f7,74fb,74fd-7500,7502-7504,7507-7508,750b-750d,750f-7518,751a,751c-751d,751f,7521-7522,7525-7526,7528-7533,7537-753a,753d-7540,7547-7548,754b-754c,754e-754f,7554,7559-755d,755f,7562-7566,756a-756c,756f-7570,7576-7579,757d-7580,7584,7586-7587,758a-758c,758f-7591,7594-7595,7598-759a,759d,75a2-75a5,75a7,75aa-75ab,75b0,75b2-75b3,75b5-75b6,75b8-75c2,75c4-75c5,75c7,75ca-75d2,75d4-75d5,75d7-75db,75dd-75e4,75e6-75e7,75ed,75ef-7601,7603,7608-760d,760f-7611,7613-7616,7619-7629,762d,762f-7635,7638,763a,763c-763d,7642-7643,7646-7649,764c,7650,7652-7653,7656-765a,765c,765f-7662,7664-7665,7669-766a,766c-766e,7670-7672,7675,7678-7679,767b-767f,7681-7682,7684,7686-768b,768e-768f,7692-7693,7695-7696,7699-769e,76a4,76a6,76aa-76ab,76ad-76b0,76b4-76b5,76b8,76ba-76bb,76bd-76bf,76c2-76c6,76c8-76ca,76cd-76ce,76d2-76d4,76da-76df,76e1,76e3-76e7,76e9-76ea,76ec-76f5,76f7-76fc,76fe,7701,7703-7705,7707-770b,7710-7713,7715,7719-771b,771d,771f-7720,7722-7723,7725,7727-7729,772d,772f,7731-773e,7744-7747,774a-774f,7752,7754-7756,7759-775c,775e-7763,7765-776f,7779,777c-7785,7787-7789,778b-778f,7791,7795,7797,7799-77a3,77a5,77a7-77a8,77aa-77ad,77b0-77b7,77ba-77bd,77bf,77c2,77c4,77c7,77c9-77ca,77cc-77d0,77d3-77d5,77d7-77dc,77de,77e0,77e2-77e3,77e5,77e7-77e9,77ec-77f3,77f7-77fd,7802-7803,7805-7806,7809,780c-7814,781d,781f-7823,7825-7835,7837-7838,7843,7845,7848-784a,784c-784e,7850,7852,785c-785e,7860,7862,7864-7865,7868-7871,7879,787b-787c,787e-7881,7883-7887,7889,788c,788e-788f,7891,7893-789a,789e-78a5,78a7-78ad,78b0,78b2-78b4,78ba-78bc,78be,78c1,78c3-78c5,78c8-78d1,78d4-78d5,78da-78db,78dd-78e3,78e5,78e7-78ea,78ec-78ed,78ef,78f2-78f4,78f7,78f9-78ff,7901-7902,7904-7905,7909,790c,790e,7910-7914,7917,7919,791b-791e,7921,7923-792d,792f,7931,7935,7938-793a,793d-7942,7944-794c,794f-7957,795a-7961,7963-7965,7967-796b,796d,7970,7972-7974,7979-797a,797c-797d,797f,7981-7982,7988,798a-798b,798d-7990,7992-7998,799a-799c,79a0-79a2,79a4,79a6-79a8,79aa-79ae,79b0-79b4,79b6-79bb,79bd-79c1,79c5,79c8-79c9,79cb,79cd-79cf,79d1-79d2,79d5-79d6,79d8,79dc-79e0,79e3-79e4,79e6-79e7,79e9-79ee,79f6-79f8,79fa-79fb,7a00,7a02-7a05,7a08,7a0a-7a0d,7a10-7a15,7a17-7a1c,7a1e-7a20,7a22,7a26,7a28,7a2b,7a2e-7a31,7a37,7a39,7a3b-7a3d,7a3f-7a40,7a44,7a46-7a48,7a4a-7a4e,7a54,7a56-7a58,7a5a-7a5c,7a5f-7a62,7a67-7a69,7a6b-7a6e,7a70-7a71,7a74-7a76,7a78-7a7b,7a7e-7a81,7a84-7a8c,7a8f-7a90,7a92,7a94-7a99,7a9e-7aa0,7aa2-7aa3,7aa8-7aac,7aae-7aaf,7ab1-7ab8,7aba,7abe-7ac1,7ac4-7ac5,7ac7,7aca-7acb,7ad1,7ad8-7ad9,7adf-7ae0,7ae3-7ae6,7aeb,7aed-7aef,7af6-7af7,7af9-7afb,7afd,7aff-7b01,7b04-7b06,7b08-7b0a,7b0e-7b13,7b18-7b1b,7b1d-7b1e,7b20,7b22-7b26,7b28,7b2a-7b35,7b38,7b3b,7b40,7b44-7b52,7b54,7b56,7b58,7b60-7b61,7b63-7b67,7b69,7b6d-7b6e,7b70-7b78,7b82,7b84-7b85,7b87-7b88,7b8a-7b91,7b94-7b99,7b9b-7b9d,7ba0-7ba1,7ba4,7bac-7bad,7baf,7bb1,7bb4-7bb5,7bb7-7bb9,7bbe,7bc0-7bc1,7bc4,7bc6-7bc7,7bc9-7bcc,7bce,7bd4-7bd5,7bd8-7beb,7bf0-7bf4,7bf7-7bf9,7bfb,7bfd-7c03,7c05-7c07,7c09-7c11,7c19,7c1c-7c23,7c25-7c2d,7c30,7c33,7c37-7c39,7c3b-7c40,7c43,7c45,7c47-7c4a,7c4c-7c4d,7c50,7c53-7c54,7c57,7c59-7c5c,7c5f-7c60,7c63-7c67,7c69-7c6c,7c6e-7c6f,7c72-7c73,7c75,7c78-7c7a,7c7d,7c7f-7c81,7c84-7c85,7c88-7c8a,7c8c-7c8d,7c91-7c92,7c94-7c98,7c9e-7c9f,7ca1-7ca3,7ca5,7ca7-7ca8,7caf,7cb1-7cb5,7cb9-7cbf,7cc5,7cc8,7cca-7ccc,7cce,7cd0-7cd2,7cd4-7cd7,7cd9,7cdc-7ce0,7ce2,7ce7-7ce8,7cea,7cec,7cee-7cf2,7cf4,7cf6-7cf8,7cfb,7cfd-7cfe,7d00-7d22,7d28-7d29,7d2b-7d2c,7d2e-7d33,7d35-7d36,7d38-7d47,7d4a,7d4e-7d56,7d58,7d5b-7d5c,7d5e-7d5f,7d61-7d63,7d66-7d6b,7d6d-7d73,7d79-7d7d,7d7f-7d81,7d83-7d86,7d88,7d8c-7d8f,7d91-7d94,7d96,7d9c-7da3,7da6-7da7,7da9-7daa,7dac-7db2,7db4-7db5,7db7-7dc2,7dc4-7dc7,7dc9-7dcc,7dce,7dd2,7dd7-7ddb,7ddd-7de1,7de3,7de6-7dea,7dec,7dee-7df4,7df6-7df7,7df9-7dfb,7e03,7e08-7e17,7e1a-7e25,7e29-7e2b,7e2d-7e49,7e4c,7e50-7e5a,7e5c,7e5e-7e63,7e68-7e6b,7e6d,7e6f-7e70,7e72-7e7e,7e80-7e82,7e86-7e88,7e8a-7e8d,7e8f,7e91,7e93-7e9c,7f36,7f38-7f3a,7f3d-7f3f,7f43-7f45,7f48,7f4a-7f4d,7f4f-7f51,7f54-7f55,7f58,7f5b-7f61,7f63,7f65-7f6e,7f70,7f72-7f73,7f75-7f77,7f79-7f7f,7f83,7f85-7f8e,7f91-7f92,7f94-7f96,7f9a-7f9e,7fa0-7fa2,7fa4-7fa9,7fac-7fad,7faf-7fb3,7fb5-7fc3,7fc5,7fc7,7fc9-7fd2,7fd4-7fd5,7fd7,7fdb-7fdc,7fde-7fe3,7fe5-7fe6,7fe8-7ff5,7ff7-7ff9,7ffb-8001,8003-8007,800b-8012,8014-8019,801b-801c,801e-801f,8021,8024,8026,8028-802a,802c,8030,8033-8037,8039,803d-803f,8043,8046-8048,804a,804f-8052,8056,8058,805a,805c-805e,8064,8067,806c,806f-8073,8075-8079,807d-807f,8082,8084-8087,8089-808c,808f-8090,8092-8093,8095-8096,8098-809d,80a1-80a3,80a5,80a9-80ab,80ad-80af,80b1-80b2,80b4-80b5,80b8,80ba,80c2-80c5,80c7-80ca,80cc-80d1,80d4-80de,80e0-80e1,80e3-80e6,80ed,80ef-80f5,80f8-80fe,8100-8102,8105-8106,8108,810a,8115-8116,8118-8119,811b,811d-811f,8121-8125,8127,8129,812b-812d,812f-8130,8139-813a,813d-813e,8143-8144,8146-8147,814a-8155,815b-815c,815e,8160-8162,8164-8167,8169,816b,816e-8174,8176-817a,817f-8180,8182-8183,8186-818d,818f,8195,8197-81a0,81a2-81a3,81a6-81a9,81ab-81ac,81ae,81b0-81b5,81b7,81b9-81c0,81c2-81c7,81c9-81ca,81cc-81cd,81cf-81d2,81d5,81d7-81db,81dd-81e3,81e5-81ea,81ec-81ee,81f2-81f4,81f7-81fc,81fe-8202,8204-8205,8207-820d,8210-8212,8214-8216,821b-8222,8225,8228,822a-822c,822f,8232-823a,823c-823d,823f-8240,8242,8244-8245,8247,8249,824b,824e-8253,8255-825c,825e-825f,8261,8263-8264,8266,8268-8269,826b-826f,8271-8272,8274-8275,8277-8278,827c-8280,8283-8285,828a-828b,828d-8294,8298-829b,829d-82a5,82a7-82a9,82ab-82b1,82b3-82be,82c0,82c2-82c3,82d1-82d7,82d9,82db-82dc,82de-82e1,82e3-82e8,82ea-82ed,82ef-82f6,82f9-82fb,82fe,8300-8309,830c-830d,8316-8317,8319,831b-831c,831e,8320,8322,8324-832d,832f,8331-833c,833f-8345,8347-8354,8356,8373-8378,837a-837f,8381,8383,8386-8390,8392-839b,839d-839e,83a0,83a2-83ab,83ae-83b0,83bd,83bf-83cc,83ce-83cf,83d1,83d4-83d9,83db-83e5,83e7-83ec,83ee-83f6,83f8-83ff,8401,8403-8404,8406-8407,8409-8413,841b,8423,8429,842b-842d,842f-843d,843f-8440,8442-8447,8449,844b-844e,8450-8452,8454,8456-8457,8459-845b,845d-8461,8463,8465-8469,846b-8470,8473-847a,847d-847e,8482,8486,848d-8491,8494,8497-84a2,84a4,84a7-84ac,84ae-84b2,84b4,84b6,84b8-84bc,84bf-84c2,84c4-84c7,84c9-84d4,84d6-84d7,84db,84e7-84ec,84ee-84f4,84f6-84f7,84f9-8500,8502,8506-850f,8511-851a,851c-8521,8523-8531,853b,853d-853e,8540-8541,8543-854a,854d-854e,8551,8553-8559,855b,855d-855e,8560-856e,8571,8575-857c,857e,8580-8591,8594-8596,8598-85a4,85a6-85aa,85af-85b1,85b3-85ba,85bd-85c0,85c2-85c9,85cb,85cd-85d2,85d5,85d7-85da,85dc-85df,85e1-85e6,85e8-85ed,85ef-85f2,85f6-85fb,85fd-8601,8604-8607,8609-860c,8611,8617-861c,861e-8627,8629-862a,862c-862e,8631-8636,8638-863c,863e-8640,8643,8646-8648,864b-864e,8650,8652-8656,8659,865b-865c,865e-865f,8661-8665,8667-866b,866d-8671,8673-8674,8677,8679-867c,8685-8687,868a-868e,8690-8691,8693-869a,869c-869e,86a1-86a5,86a7-86aa,86af-86b1,86b3-86c9,86cb-86cc,86d0-86d1,86d3-86d4,86d6-86df,86e2-86e4,86e6,86e8-86ed,86f5-86fb,86fe,8700-870e,8711-8713,8718-871c,871e,8720-872a,872c-872e,8730-8735,8737-8738,873a-873c,873e-8743,8746,874c-876f,8773-877b,8781-8785,8787-8789,878d,878f-8794,8796-8798,879a-879f,87a2-87a4,87aa-87b0,87b2-87c0,87c2-87c6,87c8-87cc,87d1-87d4,87d7-87d9,87db-87e8,87ea-87ed,87ef,87f2-87f4,87f6-87f7,87f9-87fc,87fe-8803,8805-8806,8808-880d,8810-8811,8813-8817,8819,881b-881d,881f-8826,8828-882c,882e-8833,8835-8839,883b-8841,8843-8844,8848,884a-884e,8852-8853,8855-8857,8859-885b,885d,8861-8863,8867-886b,886d,886f-8872,8874-8877,8879,887c-8883,8888-8889,888b-888e,8891-8893,8895-889b,889e-889f,88a1-88a2,88a4,88a7-88a8,88aa-88ac,88b1-88b2,88b6-88ba,88bc-88be,88c0-88c2,88c9-88d0,88d2,88d4-88df,88e1,88e7-88e8,88eb-88ec,88ee-88f4,88f6-88fe,8901-8902,8905-8907,8909-890c,890e,8910-891a,891e-891f,8921-8923,8925-8927,8929-8933,8935-8938,893b-893e,8941-8942,8944,8946,8949,894b-894c,894f-8953,8956-8964,8966,8969-896f,8971-8974,8976,8979-897c,897e-897f,8981-8983,8985-8986,8988,898b,898f,8993,8995-8998,899b-899f,89a1-89a4,89a6,89aa,89ac-89af,89b2,89b6-89b7,89b9-89ba,89bd-89c0,89d2-89d6,89d9-89dd,89df-89e6,89e8-89e9,89eb-89ed,89f0-89f4,89f6-89f8,89fa-89fc,89fe-8a00,8a02-8a04,8a07-8a08,8a0a,8a0c,8a0e-8a13,8a15-8a18,8a1b,8a1d-8a1f,8a22-8a23,8a25,8a27,8a2a,8a2c-8a2d,8a30-8a31,8a34,8a36,8a39-8a3c,8a3e-8a41,8a44-8a46,8a48,8a4a,8a4c-8a52,8a54-8a59,8a5b,8a5e,8a60-8a63,8a66,8a68-8a69,8a6b-8a6e,8a70-8a77,8a79-8a7c,8a7f,8a81-8a87,8a8b-8a8d,8a8f,8a91-8a93,8a95-8a96,8a98-8a9a,8a9e,8aa0-8aa1,8aa3-8aa8,8aaa-8aab,8ab0,8ab2,8ab6,8ab8-8ac0,8ac2-8ac9,8acb,8acd,8acf,8ad1-8ad9,8adb-8ae2,8ae4,8ae6-8ae8,8aeb,8aed-8af8,8afa-8afc,8afe-8b02,8b04-8b08,8b0a-8b0b,8b0d-8b1e,8b20,8b22-8b28,8b2a-8b2c,8b2e-8b31,8b33,8b35-8b37,8b39-8b3e,8b40-8b42,8b45-8b4b,8b4e-8b5a,8b5c-8b5d,8b5f-8b60,8b63,8b65-8b68,8b6a-8b6d,8b6f-8b70,8b74,8b77-8b7b,8b7d-8b80,8b82,8b84-8b86,8b88,8b8a-8b8c,8b8e,8b92-8b96,8b98-8b9a,8b9c,8b9e-8b9f,8c37,8c39,8c3b-8c3f,8c41-8c43,8c45-8c50,8c54-8c57,8c5a,8c5c-8c5d,8c5f,8c61-8c62,8c64-8c66,8c68-8c6d,8c6f-8c73,8c75-8c7b,8c7d,8c80-8c82,8c84-8c86,8c89-8c8a,8c8c-8c8d,8c8f-8c95,8c97-8c9a,8c9c-8c9e,8ca0-8ca5,8ca7-8cac,8caf-8cb0,8cb2-8cc5,8cc7-8cc8,8cca,8ccc,8ccf,8cd1-8cd3,8cd5,8cd7,8cd9-8cda,8cdc-8ce8,8cea,8cec-8cee,8cf0-8cf1,8cf3-8cf5,8cf8-8cfe,8d00,8d02,8d04-8d0a,8d0d,8d0f-8d10,8d13-8d17,8d19,8d1b,8d64,8d66-8d69,8d6b-8d70,8d72-8d74,8d76-8d79,8d7b,8d7d,8d80-8d81,8d84-8d85,8d89-8d8a,8d8c-8d96,8d99,8d9b-8d9c,8d9f-8da1,8da3,8da5,8da7-8da8,8daa-8daf,8db2-8db7,8db9-8dba,8dbc,8dbe-8dbf,8dc1-8dc2,8dc5-8dc8,8dcb-8dd1,8dd3,8dd5-8ddd,8ddf-8de4,8de6-8dec,8dee-8df4,8dfa,8dfc-8e00,8e02-8e07,8e09-8e0a,8e0d,8e0f-8e27,8e29,8e2b,8e2e,8e30-8e31,8e33-8e36,8e38-8e39,8e3c-8e42,8e44-8e45,8e47-8e4e,8e50,8e53-8e57,8e59-8e67,8e69-8e6a,8e6c-8e6d,8e6f,8e72-8e74,8e76,8e78,8e7a-8e7c,8e81-8e82,8e84-8e8e,8e90-8e98,8e9a,8e9d-8ea1,8ea3-8ea6,8ea8-8eac,8eb2,8eba,8ebd,8ec0,8ec2,8ec9-8ecd,8ecf,8ed1-8ed4,8ed7-8ed8,8edb-8ee1,8ee5-8ee9,8eeb-8eec,8eee-8eef,8ef1,8ef4-8efc,8efe-8f03,8f05-8f0b,8f0d-8f0e,8f10-8f18,8f1a-8f20,8f23-8f26,8f29-8f2a,8f2c,8f2e-8f2f,8f32-8f39,8f3b,8f3e-8f40,8f42-8f49,8f4b,8f4d-8f5b,8f5d-8f64,8f9b-8f9c,8f9f,8fa3,8fa6,8fa8,8fad-8fb2,8fb4,8fbf,8fc2,8fc4-8fc6,8fc9,8fcb,8fcd-8fce,8fd1-8fd7,8fe0-8fe6,8fe8,8fea-8feb,8fed-8fee,8ff0,8ff4-8ff8,8ffa-9006,900b-900d,900f-9011,9014-9017,9019-9024,902d-902f,9031-9032,9034-9036,9038,903c-903f,9041-9042,9044,9047,9049-904b,904d-9055,9058-9059,905b-905e,9060,9062-9063,9067-9069,906b,906d-9070,9072-9088,908a-908b,908d,908f-9091,9094-9095,9097-9099,909b,909e-90a3,90a5-90a7,90aa,90af-90b6,90b8,90bd-90bf,90c1,90c3,90c5,90c7-90c8,90ca-90cb,90ce,90d4-90dd,90df-90e5,90e8-90ed,90ef-90f5,90f9-9109,910b,910d-9112,9114,9116-9124,9126-9136,9138-913b,913e-9141,9143-9150,9152-9153,9155-9158,915a,915f-9165,9168-916a,916c,916e-916f,9172-9175,9177-917a,9180-9187,9189-918b,918d,918f-9193,9199-91a3,91a5,91a7-91a8,91aa-91b5,91b7,91b9-91ba,91bc-91be,91c0-91c3,91c5-91c7,91c9,91cb-91d1,91d3-91d5,91d7-91da,91dc-91dd,91e2-91e4,91e6-91ee,91f1,91f3-91f5,91f7-91f9,91fd,91ff-9207,9209-920a,920c-920d,920f-9212,9214-9217,9219-921a,921c,921e,9223-9227,922d-922e,9230-9234,9236-923a,923d-9240,9245-9246,9248-9254,9256-9257,925a-925b,925e,9260-9261,9263-9267,926c-926d,926f-9270,9272,9276,9278-9280,9282-9283,9285-9288,928a-928e,9291,9293-929d,92a0-92ac,92b2-92b7,92b9,92bb-92bc,92c0-92d3,92d5,92d7-92d9,92dd-92e1,92e4,92e6-92ea,92ee-92f1,92f7-92fc,92fe-9302,9304,9306,9308-9309,930b-9310,9312-9316,9318-931b,931d-932b,932d-932f,9333-9336,9338-9339,933c,9346-9347,9349-9352,9354-935c,935e,9360-9361,9363-9365,9367,936a,936c-936d,9370-9371,9375-9377,9379-937c,937e,9380,9382-9383,9388-938a,938c-938f,9391-9392,9394-939b,939d-939f,93a1-93aa,93ac,93ae-93b5,93b7,93c0,93c2-93c4,93c7-93c8,93ca,93cc-93d2,93d4-93da,93dc-93df,93e1-93e4,93e6-93e8,93ec,93ee,93f5-9400,9403,9406-9407,9409-9416,9418-9419,9420,9428-942c,942e,9430-9433,9435-943d,943f-9440,9444-944c,944f-9452,9455,9457,945d-945e,9460,9462-9464,9468-946b,946d-9478,947c-9483,9577,957a-957d,9580,9582-9583,9586,9588-9589,958b-9594,9598,959b-959c,959e-959f,95a1,95a3-95a5,95a8-95a9,95ab-95ae,95b0-95b1,95b5-95b7,95b9-95c0,95c3,95c5-95cd,95d0-95d6,95da-95dc,95de-95e5,961c,961e,9620-9624,9628,962a,962c-9632,9639-963d,963f-9640,9642-9644,964a-9651,9653-9654,9658,965b-965f,9661-9664,966a-966d,966f-9678,967c-967e,9680,9683-968b,968d-968e,9691-9695,9697-9699,969b-969c,969e,96a1-96a2,96a4,96a7-96aa,96ac,96ae,96b0-96b1,96b3-96b4,96b8-96b9,96bb-96bc,96bf-96ce,96d2-96df,96e1-96e3,96e5,96e8-96ea,96ef-96f2,96f5-96fb,96fd,96ff-9700,9702,9704-9709,970b,970d-9713,9716,9718-9719,971c-9720,9722-972c,972e-9730,9732,9735,9738-973a,973d-973f,9742-9744,9746-9749,974b,9752,9756,9758,975a-975c,975e,9760-9762,9766,9768-976a,976c,976e,9770,9772-9774,9776-9778,977a-9785,9788,978a-978b,978d-978f,9794,9797-979a,979c-979e,97a0-97a6,97a8,97aa-97ae,97b3,97b6-97b7,97b9,97bb,97bf,97c1,97c3-97c7,97c9,97cb-97d0,97d3-97d9,97dc-97df,97e1,97e3,97e5,97ed,97f0-97f1,97f3,97f6,97f8-97fb,97fd-9808,980a,980c-9813,9816-9818,981b-981e,9820-9821,9824,9826-9829,982b,982d,982f-9830,9832,9835,9837-9839,983b,9841,9843-9846,9848-984a,984c-9853,9857-9859,985b-9860,9862-9865,9867,9869-986b,986f-9874,98a8-98a9,98ac-98af,98b1-98b3,98b6,98b8,98ba-98c2,98c4,98c6,98c9,98cb-98cc,98db,98df,98e2-98e3,98e5,98e7,98e9-98eb,98ed,98ef,98f2,98f4,98f6,98f9-98fa,98fc-98fe,9900,9902-9903,9905,9907-990a,990c,9910-9918,991a-991b,991e-991f,9921,9924-9925,9927-9933,9935,993a,993c-993f,9941,9943,9945,9947-9949,994b-994c,994e,9950-9959,995b-995c,995e-995f,9961,9996-9999,999c-999e,99a1,99a3,99a5-99a8,99ab-99b5,99b9-99bb,99bd,99c1-99c3,99c7,99c9,99cb-99d9,99db-99dd,99df,99e2-99e5,99e7,99e9-99ea,99ec-99ee,99f0-99f1,99f4,99f6-99ff,9a01-9a07,9a09-9a0b,9a0d-9a0f,9a11,9a14-9a16,9a19-9a1e,9a20,9a22-9a25,9a27,9a29-9a2e,9a30-9a32,9a34-9a3a,9a3d-9a46,9a48-9a4a,9a4c-9a50,9a52-9a57,9a59-9a5b,9a5e-9a60,9a62,9a64-9a6b,9aa8,9aab,9aad,9aaf-9ab1,9ab3-9ab4,9ab7-9ab9,9abb-9abc,9abe-9ac2,9ac6-9ac7,9aca,9acd,9acf-9ad6,9ad8,9adc,9adf,9ae1,9ae3,9ae6-9ae7,9aeb-9aef,9af1-9af3,9af6-9af7,9af9-9afe,9b01,9b03-9b06,9b08,9b0a-9b0e,9b10-9b12,9b15-9b1a,9b1e-9b20,9b22-9b25,9b27-9b29,9b2b,9b2e-9b2f,9b31-9b33,9b35,9b37,9b3a-9b3c,9b3e-9b3f,9b41-9b46,9b48,9b4a-9b4f,9b51-9b52,9b54-9b56,9b58-9b5b,9b5f-9b61,9b64,9b66-9b68,9b6c,9b6f-9b71,9b74-9b77,9b7a-9b7e,9b80,9b82,9b85-9b88,9b90-9b93,9b95,9b9a-9b9b,9b9e,9ba0-9ba2,9ba4-9ba6,9ba8,9baa-9bab,9bad-9baf,9bb5-9bb6,9bb8-9bb9,9bbd,9bbf-9bc1,9bc3-9bc4,9bc6-9bca,9bd3-9bd7,9bd9-9bdc,9bde,9be0-9be2,9be4-9be8,9bea-9bec,9bf0,9bf7-9bf8,9bfd,9c05-9c09,9c0b,9c0d-9c0e,9c12-9c14,9c17,9c1c-9c1d,9c21,9c23-9c25,9c28-9c29,9c2b-9c2d,9c31-9c34,9c36-9c37,9c39,9c3b-9c41,9c44,9c46,9c48-9c4e,9c50,9c52,9c54-9c59,9c5e-9c60,9c62-9c63,9c66-9c68,9c6d-9c6e,9c71,9c73-9c75,9c77-9c7a,9ce5-9ce7,9ce9-9cea,9ced,9cf1-9cf7,9cf9-9cfd,9cff-9d00,9d03-9d09,9d10,9d12,9d14-9d15,9d17-9d19,9d1b,9d1d-9d20,9d22-9d23,9d25-9d26,9d28-9d29,9d2d-9d31,9d33,9d36-9d38,9d3b,9d3d-9d43,9d45,9d4a-9d4c,9d4f,9d51-9d54,9d56-9d5d,9d5f-9d61,9d67-9d6c,9d6f-9d75,9d77-9d79,9d7b,9d7d,9d7f-9d82,9d84-9d8c,9d90,9d92,9d94,9d96-9da4,9da6-9daa,9dac-9dad,9daf,9db1-9dbc,9dbe-9dbf,9dc1-9dc3,9dc5,9dc7-9dc8,9dca-9dd3,9dd5-9ddf,9de1-9de6,9de8-9de9,9deb-9df0,9df2-9dfb,9dfd-9e07,9e09,9e0b,9e0d,9e0f-9e15,9e17,9e19-9e1b,9e1d-9e1e,9e75,9e79-9e7a,9e7c-9e7d,9e7f-9e80,9e82-9e83,9e86-9e8e,9e91-9e94,9e97,9e99-9e9d,9e9f-9ea1,9ea4-9ea5,9ea7,9ea9,9ead-9eae,9eb0,9eb4-9eb7,9ebb-9ebc,9ebe,9ec0,9ec2-9ec3,9ec8,9ecc-9ed1,9ed3-9ed6,9ed8,9eda-9ee0,9ee4-9ee8,9eeb,9eed-9ef0,9ef2-9ef7,9ef9-9efd,9eff-9f01,9f06-9f07,9f09-9f0a,9f0e-9f10,9f12-9f13,9f15-9f16,9f18-9f1c,9f1e,9f20,9f22-9f25,9f28-9f38,9f3b,9f3d-9f3e,9f40-9f43,9f46-9f4f,9f52,9f54-9f59,9f5b-9f61,9f63-9f67,9f6a-9f6c,9f6e-9f72,9f74-9f7b,9f7e,9f8d,9f90-9f92,9f94-9f95,9f98,9f9c,9fa0,9fa2,9fa4,fa0c-fa0d,fe30-fe31,fe33-fe44,fe49-fe52,fe54-fe57,fe59-fe66,fe68-fe6b,ff01,ff03-ff06,ff08-ff3a,ff3c,ff3f,ff41-ff5e,ffe0-ffe1,ffe3 +Simplified Chinese - Level 1:4e00-4e01,4e03,4e07-4e0e,4e10-4e11,4e13-4e16,4e18-4e1e,4e22,4e24-4e25,4e27-4e28,4e2a-4e2d,4e30,4e32,4e34,4e36,4e38-4e3b,4e3d-4e3f,4e43,4e45,4e47-4e49,4e4b-4e50,4e52-4e54,4e56,4e58-4e59,4e5c-4e61,4e66,4e69,4e70-4e71,4e73,4e7e,4e86,4e88-4e89,4e8b-4e8f,4e91-4e95,4e98,4e9a-4e9b,4e9f-4ea2,4ea4-4ea9,4eab-4eae,4eb2-4eb3,4eb5,4eba-4ebb,4ebf-4ec7,4ec9-4ecb,4ecd-4ece,4ed1,4ed3-4ed9,4edd-4edf,4ee1,4ee3-4ee5,4ee8,4eea-4eec,4ef0,4ef2-4ef3,4ef5-4ef7,4efb,4efd,4eff,4f01,4f09-4f0a,4f0d-4f11,4f17-4f1b,4f1e-4f20,4f22,4f24-4f27,4f2a-4f2b,4f2f-4f30,4f32,4f34,4f36,4f38,4f3a,4f3c-4f3d,4f43,4f46,4f4d-4f51,4f53,4f55,4f57-4f60,4f63-4f65,4f67,4f69,4f6c,4f6f-4f70,4f73-4f74,4f76,4f7b-4f7c,4f7e-4f7f,4f83-4f84,4f88-4f89,4f8b,4f8d,4f8f,4f91,4f94,4f97,4f9b,4f9d,4fa0,4fa3,4fa5-4faa,4fac,4fae-4faf,4fb5,4fbf,4fc3-4fc5,4fca,4fce-4fd1,4fd7-4fd8,4fda,4fdc-4fdf,4fe1,4fe3,4fe6,4fe8-4fea,4fed-4fef,4ff1,4ff3,4ff8,4ffa,4ffe,500c-500d,500f,5012,5014,5018-501a,501c,501f,5021,5025-5026,5028-502a,502c-502e,503a,503c,503e,5043,5047-5048,504c,504e-504f,5055,505a,505c,5065,506c,5076-5077,507b,507e-5080,5085,5088,508d,50a3,50a5,50a7-50a9,50ac,50b2,50ba-50bb,50cf,50d6,50da,50e6-50e7,50ec-50ee,50f3,50f5,50fb,5106-5107,510b,5112,5121,513f-5141,5143-5146,5148-5149,514b,514d,5151,5154-5156,515a,515c,5162,5165,5168,516b-516e,5170-5171,5173-5179,517b-517d,5180-5182,5185,5188-5189,518c-518d,5192,5195-5197,5199,519b-519c,51a0,51a2,51a4-51a5,51ab-51ac,51af-51b3,51b5-51b7,51bb-51bd,51c0,51c4,51c6-51c7,51c9,51cb-51cc,51cf,51d1,51db,51dd,51e0-51e1,51e4,51eb,51ed,51ef-51f0,51f3,51f5-51f6,51f8-51fd,51ff-5203,5206-5208,520a,520d-520e,5211-5212,5216-521b,521d,5220,5224,5228-5229,522b,522d-522e,5230,5233,5236-523b,523d,523f-5243,524a,524c-524d,5250-5251,5254,5256,525c,525e,5261,5265,5267,5269-526a,526f,5272,527d,527f,5281-5282,5288,5290,5293,529b,529d-52a3,52a8-52ad,52b1-52b3,52be-52bf,52c3,52c7,52c9,52cb,52d0,52d2,52d6,52d8,52df,52e4,52f0,52f9-52fa,52fe-5300,5305-5306,5308,530d,530f-5310,5315-5317,5319-531a,531d,5320-5321,5323,5326,532a,532e,5339-533b,533e-533f,5341,5343,5345,5347-534a,534e-534f,5351-5353,5355-5357,535a,535c,535e-5364,5366-5367,5369,536b,536e-5371,5373-5375,5377-5378,537a,537f,5382,5384-5386,5389,538b-538d,5395,5398,539a,539d,539f,53a2-53a3,53a5-53a6,53a8-53a9,53ae,53b6,53bb,53bf,53c1-53c2,53c8-53cd,53d1,53d4,53d6-53d9,53db,53df-53e0,53e3-53e6,53e8-53f3,53f5-53f9,53fb-53fd,5401,5403-5404,5406,5408-540a,540c-5413,5415-5417,541b,541d-5421,5423,5426-5429,542b-542f,5431-5432,5434-5435,5438-5439,543b-543c,543e,5440,5443,5446,5448,544a-544b,5450,5452-5459,545b-545c,5462,5464,5466,5468,5471-5473,5475-5478,547b-547d,5480,5482,5484,5486,548b-548c,548e-5490,5492,5494-5496,5499-549b,549d,54a3-54a4,54a6-54ad,54af,54b1,54b3-54b4,54b8,54bb,54bd,54bf-54c2,54c4,54c6-54c9,54cc-54d5,54d7,54d9-54da,54dc-54df,54e5-54ea,54ed-54ee,54f2-54f3,54fa,54fc-54fd,54ff,5501,5506-5507,5509,550f-5511,5514,551b,5520,5522-5524,5527,552a,552c,552e-5531,5533,5537,553c,553e-553f,5541,5543-5544,5546,5549-554a,5550,5555-5556,555c,5561,5564-5567,556a,556c-556e,5575-5578,557b-557c,557e,5580-5584,5587-558b,558f,5591,5594,5598-5599,559c-559d,559f,55a7,55b1,55b3,55b5,55b7,55b9,55bb,55bd-55be,55c4-55c5,55c9,55cc-55cd,55d1-55d4,55d6,55dc-55dd,55df,55e1,55e3-55e6,55e8,55ea-55ec,55ef,55f2-55f3,55f5,55f7,55fd-55fe,5600-5601,5608-5609,560c,560e-560f,5618,561b,561e-561f,5623-5624,5627,562c-562d,5631-5632,5634,5636,5639,563b,563f,564c-564e,5654,5657-5659,565c,5662,5664,5668-566c,5671,5676,567b-567c,5685-5686,568e-568f,5693,56a3,56af,56b7,56bc,56ca,56d4,56d7,56da-56db,56dd-56e2,56e4,56eb,56ed,56f0-56f1,56f4-56f5,56f9-56fa,56fd-56ff,5703-5704,5706,5708-570a,571c,571f,5723,5728-572a,572c-5730,5733,5739-573b,573e,5740,5742,5747,574a,574c-5751,5757,575a-5761,5764,5766,5768-576b,576d,576f,5773,5776-5777,577b-577c,5782-5786,578b-578c,5792-5793,579b,57a0-57a4,57a6-57a7,57a9,57ab,57ad-57ae,57b2,57b4,57b8,57c2-57c3,57cb,57ce-57cf,57d2,57d4-57d5,57d8-57da,57dd,57df-57e0,57e4,57ed,57ef,57f4,57f8-57fa,57fd,5800,5802,5806-5807,580b,580d,5811,5815,5819,581e,5820-5821,5824,582a,5830,5835,5844,584c-584d,5851,5854,5858,585e,5865,586b-586c,587e,5880-5881,5883,5885,5889,5892-5893,5899-589a,589e-589f,58a8-58a9,58bc,58c1,58c5,58d1,58d5,58e4,58eb-58ec,58ee,58f0,58f3,58f6,58f9,5902,5904,5907,590d,590f,5914-5916,5919-591a,591c,591f,5924-5925,5927,5929-592b,592d-592f,5931,5934,5937-593a,593c,5941-5942,5944,5947-5949,594b,594e-594f,5951,5954-5958,595a,5960,5962,5965,5973-5974,5976,5978-5979,597d,5981-5984,5986-5988,598a,598d,5992-5993,5996-5997,5999,599e,59a3-59a5,59a8-59ab,59ae-59af,59b2,59b9,59bb,59be,59c6,59ca-59cb,59d0-59d4,59d7-59d8,59da,59dc-59dd,59e3,59e5,59e8,59ec,59f9,59fb,59ff,5a01,5a03-5a09,5a0c,5a11,5a13,5a18,5a1c,5a1f-5a20,5a23,5a25,5a29,5a31-5a32,5a34,5a36,5a3c,5a40,5a46,5a49-5a4a,5a55,5a5a,5a62,5a67,5a6a,5a74-5a77,5a7a,5a7f,5a92,5a9a-5a9b,5aaa,5ab2-5ab3,5ab5,5ab8,5abe,5ac1-5ac2,5ac9,5acc,5ad2,5ad4,5ad6,5ad8,5adc,5ae0-5ae1,5ae3,5ae6,5ae9,5aeb,5af1,5b09,5b16-5b17,5b32,5b34,5b37,5b40,5b50-5b51,5b53-5b55,5b57-5b5d,5b5f,5b62-5b66,5b69-5b6a,5b6c,5b70-5b71,5b73,5b75,5b7a,5b7d,5b80-5b81,5b83-5b85,5b87-5b89,5b8b-5b8c,5b8f,5b93,5b95,5b97-5b9e,5ba0-5ba6,5baa-5bab,5bb0,5bb3-5bb6,5bb8-5bb9,5bbd-5bbf,5bc2,5bc4-5bc7,5bcc,5bd0,5bd2-5bd3,5bdd-5bdf,5be1,5be4-5be5,5be8,5bee,5bf0,5bf8-5bfc,5bff,5c01,5c04,5c06,5c09-5c0a,5c0f,5c11,5c14-5c16,5c18,5c1a,5c1c-5c1d,5c22,5c24-5c25,5c27,5c2c,5c31,5c34,5c38-5c42,5c45,5c48-5c4b,5c4e-5c51,5c55,5c59,5c5e,5c60-5c61,5c63,5c65-5c66,5c6e-5c6f,5c71,5c79-5c7a,5c7f,5c81-5c82,5c88,5c8c-5c8d,5c90-5c91,5c94,5c96-5c9c,5ca2-5ca3,5ca9,5cab-5cad,5cb1,5cb3,5cb5,5cb7-5cb8,5cbd,5cbf,5cc1,5cc4,5ccb,5cd2,5cd9,5ce1,5ce4-5ce6,5ce8,5cea,5ced,5cf0,5cfb,5d02-5d03,5d06-5d07,5d0e,5d14,5d16,5d1b,5d1e,5d24,5d26-5d27,5d29,5d2d-5d2e,5d34,5d3d-5d3e,5d47,5d4a-5d4c,5d58,5d5b,5d5d,5d69,5d6b-5d6c,5d6f,5d74,5d82,5d99,5d9d,5db7,5dc5,5dcd,5ddb,5ddd-5dde,5de1-5de2,5de5-5de9,5deb,5dee-5def,5df1-5df4,5df7,5dfd-5dfe,5e01-5e03,5e05-5e06,5e08,5e0c,5e0f-5e11,5e14-5e16,5e18-5e1d,5e26-5e27,5e2d-5e2e,5e31,5e37-5e38,5e3b-5e3d,5e42,5e44-5e45,5e4c,5e54-5e55,5e5b,5e5e,5e61-5e62,5e72-5e74,5e76,5e78,5e7a-5e7d,5e7f-5e80,5e84,5e86-5e87,5e8a-5e8b,5e8f-5e91,5e93-5e97,5e99-5e9a,5e9c,5e9e-5ea0,5ea5-5ea7,5ead,5eb3,5eb5-5eb9,5ebe,5ec9-5eca,5ed1-5ed3,5ed6,5edb,5ee8,5eea,5ef4,5ef6-5ef7,5efa,5efe-5f04,5f08,5f0a-5f0b,5f0f,5f11,5f13,5f15,5f17-5f18,5f1b,5f1f-5f20,5f25-5f27,5f29-5f2a,5f2d,5f2f,5f31,5f39-5f3a,5f3c,5f40,5f50,5f52-5f53,5f55-5f58,5f5d,5f61-5f62,5f64,5f66,5f69-5f6a,5f6c-5f6d,5f70-5f71,5f73,5f77,5f79,5f7b-5f7c,5f80-5f82,5f84-5f85,5f87-5f8c,5f90,5f92,5f95,5f97-5f99,5f9c,5fa1,5fa8,5faa,5fad-5fae,5fb5,5fb7,5fbc-5fbd,5fc3-5fc6,5fc9,5fcc-5fcd,5fcf-5fd2,5fd6-5fd9,5fdd,5fe0-5fe1,5fe4,5fe7,5fea-5feb,5fed-5fee,5ff1,5ff5,5ff8,5ffb,5ffd-6006,600a,600d-600f,6012,6014-6016,6019,601b-601d,6020-6021,6025-602b,602f,6035,603b-603c,603f,6041-6043,604b,604d,6050,6052,6055,6059-605a,605d,6062-6064,6067-606d,606f-6070,6073,6076,6078-607d,607f,6083-6084,6089,608c-608d,6092,6094,6096,609a-609b,609d,609f-60a0,60a3,60a6,60a8,60ab-60ad,60af,60b1-60b2,60b4,60b8,60bb-60bc,60c5-60c6,60ca-60cb,60d1,60d5,60d8,60da,60dc-60dd,60df-60e0,60e6-60e9,60eb-60f0,60f3-60f4,60f6,60f9-60fa,6100-6101,6106,6108-6109,610d-610f,6115,611a,611f-6120,6123-6124,6126-6127,612b,613f,6148,614a,614c,614e,6151,6155,615d,6162,6167-6168,6170,6175,6177,618b,618e,6194,619d,61a7-61a9,61ac,61b7,61be,61c2,61c8,61ca-61cb,61d1-61d2,61d4,61e6,61f5,61ff,6206,6208,620a-6212,6215-6218,621a-621b,621f,6221-6222,6224-6225,622a,622c,622e,6233-6234,6237,623d-6241,6243,6247-6249,624b-624e,6251-6254,6258,625b,6263,6266-6267,6269-6270,6273,6276,6279,627c,627e-6280,6284,6289-628a,6291-6293,6295-6298,629a-629b,629f-62a2,62a4-62a5,62a8,62ab-62ac,62b1,62b5,62b9,62bb-62bd,62bf,62c2,62c4-62ca,62cc-62ce,62d0,62d2-62d4,62d6-62dc,62df,62e2-62e3,62e5-62e9,62ec-62ef,62f1,62f3-62f4,62f6-62f7,62fc-62ff,6301-6302,6307-6309,630e,6311,6316,631a-631b,631d-6325,6328,632a-632b,632f,6332,6339-633a,633d,6342-6343,6345-6346,6349,634b-6350,6355,635e-635f,6361-6363,6367,6369,636d-636e,6371,6376-6377,637a-637b,6380,6382,6387-638a,638c,638e-6390,6392,6396,6398,63a0,63a2-63a3,63a5,63a7-63aa,63ac-63ae,63b0,63b3-63b4,63b7-63b8,63ba,63bc,63be,63c4,63c6,63c9,63cd-63d0,63d2,63d6,63de,63e0-63e1,63e3,63e9-63ea,63ed,63f2,63f4,63f6,63f8,63fd,63ff-6402,6405,640b-640c,640f-6410,6413-6414,641b-641c,641e,6420-6421,6426,642a,642c-642d,6434,643a,643d,643f,6441,6444-6448,644a,6452,6454,6458,645e,6467,6469,646d,6478-647a,6482,6484-6485,6487,6491-6492,6495-6496,6499,649e,64a4,64a9,64ac-64ae,64b0,64b5,64b7-64b8,64ba,64bc,64c0,64c2,64c5,64cd-64ce,64d0,64d2,64d7-64d8,64de,64e2,64e4,64e6,6500,6509,6512,6518,6525,652b,652e-652f,6534-6536,6538-6539,653b,653e-653f,6545,6548-6549,654c,654f,6551,6555-6556,6559,655b,655d-655e,6562-6563,6566,656b-656c,6570,6572,6574,6577,6587,658b-658c,6590-6591,6593,6597,6599,659b-659c,659f,65a1,65a4-65a5,65a7,65a9,65ab,65ad,65af-65b0,65b9,65bc-65bd,65c1,65c3-65c6,65cb-65cc,65ce-65cf,65d2,65d6-65d7,65e0,65e2,65e5-65e9,65ec-65f1,65f6-65f7,65fa,6600,6602-6603,6606,660a,660c,660e-660f,6613-6615,6619,661d,661f-6620,6625,6627-6628,662d,662f,6631,6634-6636,663c,663e,6641,6643,664b-664c,664f,6652-6657,665a,665f,6661,6664,6666,6668,666e-6670,6674,6676-6677,667a,667e,6682,6684,6687,668c,6691,6696-6697,669d,66a7-66a8,66ae,66b4,66b9,66be,66d9,66db-66dd,66e6,66e9,66f0,66f2-66f4,66f7,66f9,66fc,66fe-6700,6708-670b,670d,6710,6714-6715,6717,671b,671d,671f,6726,6728,672a-672d,672f,6731,6734-6735,673a,673d,6740,6742-6743,6746,6748-6749,674c,674e-6751,6753,6756,675c,675e-6761,6765,6768-676a,676d,676f-6770,6772-6773,6775,6777,677c,677e-677f,6781,6784,6787,6789,678b,6790,6795,6797-6798,679a,679c-679e,67a2-67a3,67a5,67a7-67a8,67aa-67ab,67ad,67af-67b0,67b3,67b5-67b8,67c1,67c3-67c4,67cf-67d4,67d8-67da,67dc-67de,67e0,67e2,67e5,67e9,67ec,67ef-67f1,67f3-67f4,67fd,67ff-6800,6805,6807-680c,680e-680f,6811,6813,6816-6817,681d,6821,6829-682a,6832-6833,6837-6839,683c-683e,6840-6846,6848-684a,684c,684e,6850-6851,6853-6855,6860-6869,686b,6874,6876-6877,6881,6883,6885-6886,688f,6893,6897,68a2,68a6-68a8,68ad,68af-68b0,68b3,68b5,68c0,68c2,68c9,68cb,68cd,68d2,68d5,68d8,68da,68e0,68e3,68ee,68f0-68f1,68f5,68f9-68fa,68fc,6901,6905,690b,690d-690e,6910,6912,691f-6920,6924,692d,6930,6934,6939,693d,693f,6942,6954,6957,695a,695d-695e,6960,6963,6966,696b,696e,6971,6977-6979,697c,6980,6982,6984,6986-6989,698d,6994-6995,6998,699b-699c,69a7-69a8,69ab,69ad,69b1,69b4,69b7,69bb,69c1,69ca,69cc,69ce,69d0,69d4,69db,69df-69e0,69ed,69f2,69fd,69ff,6a0a,6a17-6a18,6a1f,6a21,6a28,6a2a,6a2f,6a31,6a35,6a3d-6a3e,6a44,6a47,6a50,6a58-6a59,6a5b,6a61,6a65,6a71,6a79,6a7c,6a80,6a84,6a8e,6a90-6a91,6a97,6aa0,6aa9,6aab-6aac,6b20-6b24,6b27,6b32,6b37,6b39-6b3a,6b3e,6b43,6b46-6b47,6b49,6b4c,6b59,6b62-6b67,6b6a,6b79,6b7b-6b7c,6b81-6b84,6b86-6b87,6b89-6b8b,6b8d,6b92-6b93,6b96,6b9a-6b9b,6ba1,6baa,6bb3-6bb5,6bb7,6bbf,6bc1-6bc2,6bc5,6bcb,6bcd,6bcf,6bd2-6bd7,6bd9,6bdb,6be1,6bea-6beb,6bef,6bf3,6bf5,6bf9,6bfd,6c05-6c07,6c0d,6c0f-6c11,6c13-6c16,6c18-6c1b,6c1f,6c21-6c22,6c24,6c26-6c2a,6c2e-6c30,6c32,6c34-6c35,6c38,6c3d,6c40-6c42,6c46-6c47,6c49-6c4a,6c50,6c54-6c55,6c57,6c5b-6c61,6c64,6c68-6c6a,6c70,6c72,6c74,6c76,6c79,6c7d-6c7e,6c81-6c83,6c85-6c86,6c88-6c89,6c8c,6c8f-6c90,6c93-6c94,6c99,6c9b,6c9f,6ca1,6ca3-6ca7,6ca9-6cab,6cad-6cae,6cb1-6cb3,6cb8-6cb9,6cbb-6cbf,6cc4-6cc5,6cc9-6cca,6ccc,6cd0,6cd3-6cd7,6cdb,6cde,6ce0-6ce3,6ce5,6ce8,6cea-6ceb,6cee-6cf1,6cf3,6cf5-6cf8,6cfa-6cfe,6d01,6d04,6d07,6d0b-6d0c,6d0e,6d12,6d17,6d19-6d1b,6d1e,6d25,6d27,6d2a-6d2b,6d2e,6d31-6d33,6d35,6d39,6d3b-6d3e,6d41,6d43,6d45-6d48,6d4a-6d4b,6d4d-6d4f,6d51-6d54,6d59-6d5a,6d5c,6d5e,6d60,6d63,6d66,6d69-6d6a,6d6e-6d6f,6d74,6d77-6d78,6d7c,6d82,6d85,6d88-6d89,6d8c,6d8e,6d91,6d93-6d95,6d9b,6d9d-6da1,6da3-6da4,6da6-6dab,6dae-6daf,6db2,6db5,6db8,6dbf-6dc0,6dc4-6dc7,6dcb-6dcc,6dd1,6dd6,6dd8-6dd9,6ddd-6dde,6de0-6de1,6de4,6de6,6deb-6dec,6dee,6df1,6df3,6df7,6df9,6dfb-6dfc,6e05,6e0a,6e0c-6e0e,6e10-6e11,6e14,6e16-6e17,6e1a,6e1d,6e20-6e21,6e23-6e25,6e29,6e2b,6e2d,6e2f,6e32,6e34,6e38,6e3a,6e43-6e44,6e4d-6e4e,6e53-6e54,6e56,6e58,6e5b,6e5f,6e6b,6e6e,6e7e-6e7f,6e83,6e85-6e86,6e89,6e8f-6e90,6e98,6e9c,6e9f,6ea2,6ea5,6ea7,6eaa,6eaf,6eb1-6eb2,6eb4,6eb6-6eb7,6eba-6ebb,6ebd,6ec1-6ec2,6ec7,6ecb,6ecf,6ed1,6ed3-6ed5,6ed7,6eda,6ede-6ee2,6ee4-6ee6,6ee8-6ee9,6ef4,6ef9,6f02,6f06,6f09,6f0f,6f13-6f15,6f20,6f24,6f29-6f2b,6f2d,6f2f,6f31,6f33,6f36,6f3e,6f46-6f47,6f4b,6f4d,6f58,6f5c,6f5e,6f62,6f66,6f6d-6f6e,6f72,6f74,6f78,6f7a,6f7c,6f84,6f88-6f89,6f8c-6f8e,6f9c,6fa1,6fa7,6fb3,6fb6,6fb9,6fc0,6fc2,6fc9,6fd1-6fd2,6fde,6fe0-6fe1,6fee-6fef,7011,701a-701b,7023,7035,7039,704c,704f,705e,706b-706d,706f-7070,7075-7076,7078,707c,707e-7080,7085,7089-708a,708e,7092,7094-7096,7099,709c-709d,70ab-70af,70b1,70b3,70b7-70b9,70bb-70bd,70c0-70c3,70c8,70ca,70d8-70d9,70db,70df,70e4,70e6-70e9,70eb-70ed,70ef,70f7,70f9,70fd,7109-710a,7110,7113,7115-7116,7118-711a,7126,712f-7131,7136,7145,714a,714c,714e,715c,715e,7164,7166-7168,716e,7172-7173,7178,717a,717d,7184,718a,718f,7194,7198-7199,719f-71a0,71a8,71ac,71b3,71b5,71b9,71c3,71ce,71d4-71d5,71e0,71e5,71e7,71ee,71f9,7206,721d,7228,722a,722c,7230-7231,7235-7239,723b,723d,723f,7247-7248,724c-724d,7252,7256,7259,725b,725d,725f,7261-7262,7266-7267,7269,726e-726f,7272,7275,7279-727a,727e-7281,7284,728a-728b,728d,728f,7292,729f,72ac-72ad,72af-72b0,72b4,72b6-72b9,72c1-72c4,72c8,72cd-72ce,72d0,72d2,72d7,72d9,72de,72e0-72e1,72e8-72e9,72ec-72f4,72f7-72f8,72fa-72fc,7301,7303,730a,730e,7313,7315-7317,731b-731e,7321-7322,7325,7329-732c,732e,7331,7334,7337-7339,733e-733f,734d,7350,7352,7357,7360,736c-736d,736f,737e,7384,7387,7389,738b,738e,7391,7396,739b,739f,73a2,73a9,73ab,73ae-73b0,73b2-73b3,73b7,73ba-73bb,73c0,73c2,73c8-73ca,73cd,73cf-73d1,73d9,73de,73e0,73e5,73e7,73e9,73ed,73f2,7403,7405-7406,7409-740a,740f-7410,741a-741b,7422,7425-7426,7428,742a,742c,742e,7430,7433-7436,743c,7441,7455,7457,7459-745c,745e-745f,746d,7470,7476-7477,747e,7480-7481,7483,7487,748b,748e,7490,749c,749e,74a7-74a9,74ba,74d2,74dc,74de,74e0,74e2-74e4,74e6,74ee-74ef,74f4,74f6-74f7,74ff,7504,750d,750f,7511,7513,7518-751a,751c,751f,7525,7528-7529,752b-752d,752f-7533,7535,7537-7538,753a-753b,753e,7540,7545,7548,754b-754c,754e-754f,7554,7559-755c,7565-7566,756a,7572,7574,7578-7579,757f,7583,7586,758b,758f,7591-7592,7594,7596-7597,7599-759a,759d,759f-75a1,75a3-75a5,75ab-75ac,75ae-75b5,75b8-75b9,75bc-75be,75c2-75c5,75c7-75ca,75cd,75d2,75d4-75d6,75d8,75db,75de,75e2-75e4,75e6-75e8,75ea-75eb,75f0-75f1,75f4,75f9,75fc,75ff-7601,7603,7605,760a,760c,7610,7615,7617-7619,761b,761f-7620,7622,7624-7626,7629-762b,762d,7630,7633-7635,7638,763c,763e-7640,7643,764c-764d,7654,7656,765c,765e,7663,766b,766f,7678,767b,767d-767e,7682,7684,7686-7688,768b,768e,7691,7693,7696,7699,76a4,76ae,76b1-76b2,76b4,76bf,76c2,76c4-9ce2,9e1f-9e23,9e25-9e26,9e28-9e2d,9e2f,9e31-9e33,9e35-9e3a,9e3d-9e3f,9e41-9e4c,9e4e-9e4f,9e51,9e55,9e57-9e58,9e5a-9e5c,9e5e,9e63-9e64,9e66-9e6d,9e70-9e71,9e73,9e7e-9e7f,9e82,9e87-9e88,9e8b,9e92-9e93,9e9d,9e9f,9ea6,9eb4,9eb8,9ebb,9ebd-9ebe,9ec4,9ec9,9ecd-9ecf,9ed1,9ed4,9ed8,9edb-9edd,9edf-9ee0,9ee2,9ee5,9ee7,9ee9-9eea,9eef,9ef9,9efb-9efc,9efe,9f0b,9f0d-9f0e,9f10,9f13,9f17,9f19,9f20,9f22,9f2c,9f2f,9f37,9f39,9f3b,9f3d-9f3e,9f50-9f51,9f7f-9f80,9f83-9f8c,9f99-9f9b,9f9f-9fa0,3000-303f,ff01-ff60,201c-201d,2018-2019,2014,2026,ffe5 +Chinese (All):3000-303f,3105-312c,31a0-31bf,4e00-9faf,ff01-ff60,f900-faff,201c-201d,2018-2019,2014,2026,ffe5 +Thai:0e01-0e5b +Devanagari:0900-097f +Latin I:0020,00a1-00ff,2000-206f,20a0-20cf,2100-2183 +Latin Extended A:0100-01ff,2000-206f,20a0-20cf,2100-2183 +Latin Extended B:0180-024f,2000-206f,20a0-20cf,2100-2183 +Latin Extended Add'l:1e00-1eff,2000-206f,20a0-20cf,2100-2183 +Greek:0374-03f2,1f00-1ffe,2000-206f,20a0-20cf,2100-2183 +Cyrillic:0400-04ce,2000-206f,20a0-20cf,2100-2183 +Armenian:0530-058f,fb13-fb17 +Arabic:0600-06ff,fb50-fdff,fe70-feff Hebrew:05b0-05ff,fb1d-fb4f,2000-206f,20a0-20cf,2100-2183 \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt similarity index 98% rename from src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt index 2bf0abd93..29cd8775a 100644 --- a/src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/font/font_preview_samples.txt @@ -1,10 +1,10 @@ -The quick brown fox jumps over the lazy dog. -Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich -Nechť již hříšné saxofony ďáblů rozzvučí síň úděsnými tóny waltzu, tanga a quickstepu. -Egy hűtlen vejét fülöncsípő, dühös mexikói úr ázik Quitóban. -Mężny bądź, chroń pułk twój i sześć flag -Pijamalı hasta yağız şoföre çabucak güvendi -Любя, съешь щипцы, — вздохнёт мэр, — кайф жгуч -Ξεσκεπάζω την ψυχοφθόρα βδελυγμία. -עטלף אבק נס דרך מזגן שהתפוצץ כי חם. -いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせすん +The quick brown fox jumps over the lazy dog. +Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich +Nechť již hříšné saxofony ďáblů rozzvučí síň úděsnými tóny waltzu, tanga a quickstepu. +Egy hűtlen vejét fülöncsípő, dühös mexikói úr ázik Quitóban. +Mężny bądź, chroń pułk twój i sześć flag +Pijamalı hasta yağız şoföre çabucak güvendi +Любя, съешь щипцы, — вздохнёт мэр, — кайф жгуч +Ξεσκεπάζω την ψυχοφθόρα βδελυγμία. +עטלף אבק נס דרך מזגן שהתפוצץ כי חם. +いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせすん diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java similarity index 94% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java index 3dd6f1339..36d65b0ca 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java similarity index 74% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java index c1f8c3139..8580f0fb5 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java similarity index 75% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java index a02f764ef..8ccef28ea 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java index 355a3934a..2fbfe5e37 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java similarity index 79% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java index aa41c1bed..39ee9a6cc 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java similarity index 78% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java index bbd939b3b..7bc808a15 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java similarity index 69% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java index 266c5556c..df54b6db7 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java similarity index 71% rename from src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java index 319b2fd57..4ac3d6a25 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java similarity index 81% rename from src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java index bca67cd16..f8b6aa169 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java similarity index 84% rename from src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java index ca0bcbe38..84764d108 100644 --- a/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.gfx; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParseException.java new file mode 100644 index 000000000..5d93b0b6e --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParseException.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.text; + +public class ParseException extends Exception { + + public long line; + public String text; + + public ParseException(String text, long line) { + super("ParseException:" + text + " on line " + line); + this.line = line; + this.text = text; + } +} diff --git a/src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java similarity index 55% rename from src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java index aad0586d8..cf186eb6a 100644 --- a/src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/ParsedSymbol.java @@ -1,60 +1,59 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.text; - -/** - * - * @author JPEXS - */ -public class ParsedSymbol { - - public Object[] values; - public SymbolType type; - - public ParsedSymbol(SymbolType type) { - this.type = type; - this.values = new Object[0]; - } - - public ParsedSymbol(SymbolType type, Object... values) { - this.type = type; - this.values = values; - } - - @Override - public String toString() { - String v = ""; - boolean first = true; - for (Object o : values) { - if (!first) { - v += ", "; - } - first = false; - v += o.toString(); - } - return type.toString() + " " + v; - } - - public boolean isType(SymbolType... types) { - for (SymbolType t : types) { - if (type == t) { - return true; - } - } - return false; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.text; + +/** + * + * @author JPEXS + */ +public class ParsedSymbol { + + public Object[] values; + public SymbolType type; + + public ParsedSymbol(SymbolType type) { + this.type = type; + this.values = new Object[0]; + } + + public ParsedSymbol(SymbolType type, Object... values) { + this.type = type; + this.values = values; + } + + @Override + public String toString() { + String v = ""; + boolean first = true; + for (Object o : values) { + if (!first) { + v += ", "; + } + first = false; + v += o.toString(); + } + return type.toString() + " " + v; + } + + public boolean isType(SymbolType... types) { + for (SymbolType t : types) { + if (type == t) { + return true; + } + } + return false; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java new file mode 100644 index 000000000..ff976bc69 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.tags.text; + +/** + * + * @author JPEXS + */ +public enum SymbolType { + + TEXT, + PARAMETER +} diff --git a/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java similarity index 97% rename from src/com/jpexs/decompiler/flash/tags/text/TextLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java index 6eff63a23..5dfab559a 100644 --- a/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java @@ -1,21 +1,18 @@ -/* The following code was generated by JFlex 1.4.3 on 2014.08.16. 13:36 */ - /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.tags.text; /** diff --git a/src/com/jpexs/decompiler/flash/tags/text/text.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/text.flex similarity index 100% rename from src/com/jpexs/decompiler/flash/tags/text/text.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/text.flex diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Clip.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Clip.java new file mode 100644 index 000000000..e9f02bfb8 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Clip.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.timeline; + +import java.awt.Shape; + +/** + * + * @author JPEXS + */ +public class Clip { + + public Shape shape; + public int depth; + + public Clip(Shape shape, int depth) { + this.shape = shape; + this.depth = depth; + } +} diff --git a/src/com/jpexs/decompiler/flash/timeline/DepthState.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/DepthState.java similarity index 78% rename from src/com/jpexs/decompiler/flash/timeline/DepthState.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/DepthState.java index 1e251ed0c..116e55ac1 100644 --- a/src/com/jpexs/decompiler/flash/timeline/DepthState.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/DepthState.java @@ -1,89 +1,88 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.timeline; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.types.CLIPACTIONS; -import com.jpexs.decompiler.flash.types.ColorTransform; -import com.jpexs.decompiler.flash.types.MATRIX; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.filters.FILTER; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.atomic.AtomicLong; - -/** - * - * @author JPEXS - */ -public class DepthState { - - public int characterId = -1; - public MATRIX matrix = null; - public String instanceName = null; - public ColorTransform colorTransForm = null; - public boolean cacheAsBitmap = false; - public int blendMode = 0; - public List filters = new ArrayList<>(); - public boolean isVisible = true; - public RGBA backGroundColor = null; - public CLIPACTIONS clipActions = null; - public int ratio = -1; - public boolean key = false; - public int clipDepth = -1; - public int time = 0; - private final SWF swf; - public Frame frame; - public long instanceId; - - private static AtomicLong lastInstanceId = new AtomicLong(0); - - public static long getNewInstanceId() { - return lastInstanceId.addAndGet(1); - } - - public DepthState(SWF swf, Frame frame) { - this.swf = swf; - this.frame = frame; - this.instanceId = getNewInstanceId(); - } - - public DepthState(DepthState obj, Frame frame, boolean sameInstance) { - this.frame = frame; - swf = obj.swf; - characterId = obj.characterId; - matrix = obj.matrix; - instanceName = obj.instanceName; - colorTransForm = obj.colorTransForm; - cacheAsBitmap = obj.cacheAsBitmap; - blendMode = obj.blendMode; - filters = obj.filters; - isVisible = obj.isVisible; - backGroundColor = obj.backGroundColor; - clipActions = obj.clipActions; - ratio = obj.ratio; - clipDepth = obj.clipDepth; - time = obj.time; - if (sameInstance) { - time++; - instanceId = obj.instanceId; - } else { - instanceId = getNewInstanceId(); - } - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.timeline; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.types.CLIPACTIONS; +import com.jpexs.decompiler.flash.types.ColorTransform; +import com.jpexs.decompiler.flash.types.MATRIX; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.filters.FILTER; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; + +/** + * + * @author JPEXS + */ +public class DepthState { + + public int characterId = -1; + public MATRIX matrix = null; + public String instanceName = null; + public ColorTransform colorTransForm = null; + public boolean cacheAsBitmap = false; + public int blendMode = 0; + public List filters = new ArrayList<>(); + public boolean isVisible = true; + public RGBA backGroundColor = null; + public CLIPACTIONS clipActions = null; + public int ratio = -1; + public boolean key = false; + public int clipDepth = -1; + public int time = 0; + private final SWF swf; + public Frame frame; + public long instanceId; + + private static AtomicLong lastInstanceId = new AtomicLong(0); + + public static long getNewInstanceId() { + return lastInstanceId.addAndGet(1); + } + + public DepthState(SWF swf, Frame frame) { + this.swf = swf; + this.frame = frame; + this.instanceId = getNewInstanceId(); + } + + public DepthState(DepthState obj, Frame frame, boolean sameInstance) { + this.frame = frame; + swf = obj.swf; + characterId = obj.characterId; + matrix = obj.matrix; + instanceName = obj.instanceName; + colorTransForm = obj.colorTransForm; + cacheAsBitmap = obj.cacheAsBitmap; + blendMode = obj.blendMode; + filters = obj.filters; + isVisible = obj.isVisible; + backGroundColor = obj.backGroundColor; + clipActions = obj.clipActions; + ratio = obj.ratio; + clipDepth = obj.clipDepth; + time = obj.time; + if (sameInstance) { + time++; + instanceId = obj.instanceId; + } else { + instanceId = getNewInstanceId(); + } + } + +} diff --git a/src/com/jpexs/decompiler/flash/timeline/Frame.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Frame.java similarity index 71% rename from src/com/jpexs/decompiler/flash/timeline/Frame.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Frame.java index 702680792..6d067ddbb 100644 --- a/src/com/jpexs/decompiler/flash/timeline/Frame.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Frame.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.timeline; import com.jpexs.decompiler.flash.tags.DoActionTag; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/SvgClip.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/SvgClip.java new file mode 100644 index 000000000..27b36d81d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/SvgClip.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.timeline; + +/** + * + * @author JPEXS + */ +public class SvgClip { + + public String shape; + public int depth; + + public SvgClip(String shape, int depth) { + this.shape = shape; + this.depth = depth; + } +} diff --git a/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java similarity index 96% rename from src/com/jpexs/decompiler/flash/timeline/Timeline.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index 46b953e84..7f1d66fe9 100644 --- a/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.timeline; import com.jpexs.decompiler.flash.SWF; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timelined.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timelined.java new file mode 100644 index 000000000..404be0836 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timelined.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.timeline; + +import com.jpexs.decompiler.flash.tags.base.BoundedTag; + +/** + * + * @author JPEXS + */ +public interface Timelined extends BoundedTag { + + public Timeline getTimeline(); + + public void resetTimeline(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java new file mode 100644 index 000000000..da281cd40 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +import com.jpexs.decompiler.flash.SWF; + +/** + * + * @author JPEXS + */ +public class AS2PackageNodeItem implements TreeItem { + + private final SWF swf; + public String packageName; + + public AS2PackageNodeItem(String packageName, SWF swf) { + this.swf = swf; + this.packageName = packageName; + } + + @Override + public SWF getSwf() { + return swf; + } + + @Override + public String toString() { + return packageName; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java new file mode 100644 index 000000000..c61e8f5e0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +import com.jpexs.decompiler.flash.SWF; + +/** + * + * @author JPEXS + */ +public class AS3PackageNodeItem implements TreeElementItem { + + private final SWF swf; + public String packageName; + + public AS3PackageNodeItem(String packageName, SWF swf) { + this.swf = swf; + this.packageName = packageName; + } + + @Override + public SWF getSwf() { + return swf; + } + + @Override + public String toString() { + return packageName; + } +} diff --git a/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java similarity index 56% rename from src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java index 3a0817e0f..a8435841e 100644 --- a/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.treeitems; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java similarity index 52% rename from src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java index e2788f4e1..20fd01a85 100644 --- a/src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/HeaderItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.treeitems; import com.jpexs.decompiler.flash.AppStrings; diff --git a/src/com/jpexs/decompiler/flash/treeitems/SWFList.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java similarity index 76% rename from src/com/jpexs/decompiler/flash/treeitems/SWFList.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java index 314b7673d..3ff896ba0 100644 --- a/src/com/jpexs/decompiler/flash/treeitems/SWFList.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java @@ -1,157 +1,156 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.SWFSourceInfo; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -/** - * - * @author JPEXS - */ -public class SWFList implements List, TreeItem { - - public String name; - public boolean isBundle; - public SWFSourceInfo sourceInfo; - public List swfs = new ArrayList<>(); - - @Override - public SWF getSwf() { - throw new UnsupportedOperationException("Not supported."); - } - - @Override - public Iterator iterator() { - return swfs.iterator(); - } - - @Override - public int size() { - return swfs.size(); - } - - @Override - public boolean isEmpty() { - return swfs.isEmpty(); - } - - @Override - public boolean contains(Object o) { - return swfs.contains(o); - } - - @Override - public Object[] toArray() { - return swfs.toArray(); - } - - @Override - public T[] toArray(T[] ts) { - return swfs.toArray(ts); - } - - @Override - public boolean add(SWF e) { - return swfs.add(e); - } - - @Override - public boolean remove(Object o) { - return swfs.remove(o); - } - - @Override - public boolean containsAll(Collection clctn) { - return swfs.containsAll(clctn); - } - - @Override - public boolean addAll(Collection clctn) { - return swfs.addAll(clctn); - } - - @Override - public boolean removeAll(Collection clctn) { - return swfs.removeAll(clctn); - } - - @Override - public boolean retainAll(Collection clctn) { - return swfs.retainAll(clctn); - } - - @Override - public void clear() { - swfs.clear(); - } - - @Override - public boolean addAll(int i, Collection clctn) { - return swfs.addAll(i, clctn); - } - - @Override - public SWF get(int i) { - return swfs.get(i); - } - - @Override - public SWF set(int i, SWF e) { - return swfs.set(i, e); - } - - @Override - public void add(int i, SWF e) { - swfs.add(i, e); - } - - @Override - public SWF remove(int i) { - return swfs.remove(i); - } - - @Override - public int indexOf(Object o) { - return swfs.indexOf(0); - } - - @Override - public int lastIndexOf(Object o) { - return swfs.lastIndexOf(o); - } - - @Override - public ListIterator listIterator() { - return swfs.listIterator(); - } - - @Override - public ListIterator listIterator(int i) { - return swfs.listIterator(i); - } - - @Override - public List subList(int i, int i1) { - return swfs.subList(i, i1); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.SWFSourceInfo; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; + +/** + * + * @author JPEXS + */ +public class SWFList implements List, TreeItem { + + public String name; + public boolean isBundle; + public SWFSourceInfo sourceInfo; + public List swfs = new ArrayList<>(); + + @Override + public SWF getSwf() { + throw new UnsupportedOperationException("Not supported."); + } + + @Override + public Iterator iterator() { + return swfs.iterator(); + } + + @Override + public int size() { + return swfs.size(); + } + + @Override + public boolean isEmpty() { + return swfs.isEmpty(); + } + + @Override + public boolean contains(Object o) { + return swfs.contains(o); + } + + @Override + public Object[] toArray() { + return swfs.toArray(); + } + + @Override + public T[] toArray(T[] ts) { + return swfs.toArray(ts); + } + + @Override + public boolean add(SWF e) { + return swfs.add(e); + } + + @Override + public boolean remove(Object o) { + return swfs.remove(o); + } + + @Override + public boolean containsAll(Collection clctn) { + return swfs.containsAll(clctn); + } + + @Override + public boolean addAll(Collection clctn) { + return swfs.addAll(clctn); + } + + @Override + public boolean removeAll(Collection clctn) { + return swfs.removeAll(clctn); + } + + @Override + public boolean retainAll(Collection clctn) { + return swfs.retainAll(clctn); + } + + @Override + public void clear() { + swfs.clear(); + } + + @Override + public boolean addAll(int i, Collection clctn) { + return swfs.addAll(i, clctn); + } + + @Override + public SWF get(int i) { + return swfs.get(i); + } + + @Override + public SWF set(int i, SWF e) { + return swfs.set(i, e); + } + + @Override + public void add(int i, SWF e) { + swfs.add(i, e); + } + + @Override + public SWF remove(int i) { + return swfs.remove(i); + } + + @Override + public int indexOf(Object o) { + return swfs.indexOf(0); + } + + @Override + public int lastIndexOf(Object o) { + return swfs.lastIndexOf(o); + } + + @Override + public ListIterator listIterator() { + return swfs.listIterator(); + } + + @Override + public ListIterator listIterator(int i) { + return swfs.listIterator(i); + } + + @Override + public List subList(int i, int i1) { + return swfs.subList(i, i1); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/StringItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/StringItem.java new file mode 100644 index 000000000..6172f6aa0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/StringItem.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +import com.jpexs.decompiler.flash.SWF; + +/** + * + * @author JPEXS + */ +public class StringItem implements TreeItem { + + public SWF swf; + private final String str; + private final String name; + + public StringItem(String str, String name, SWF swf) { + this.swf = swf; + this.str = str; + this.name = name; + } + + public String getName() { + return name; + } + + @Override + public SWF getSwf() { + return swf; + } + + @Override + public String toString() { + return str; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java new file mode 100644 index 000000000..a00118239 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +/** + * + * @author JPEXS + */ +public interface TreeElementItem extends TreeItem { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java new file mode 100644 index 000000000..ccd1126cf --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treeitems; + +import com.jpexs.decompiler.flash.SWF; + +/** + * + * @author JPEXS + */ +public interface TreeItem { + + public SWF getSwf(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java new file mode 100644 index 000000000..c5cc641d4 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treenodes; + +import com.jpexs.decompiler.flash.treeitems.AS2PackageNodeItem; + +/** + * + * @author JPEXS + */ +public class AS2PackageNode extends TreeNode { + + public AS2PackageNode(AS2PackageNodeItem item) { + super(item); + } + + @Override + public AS2PackageNodeItem getItem() { + return (AS2PackageNodeItem) item; + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java new file mode 100644 index 000000000..15e2cc37c --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treenodes; + +import com.jpexs.decompiler.flash.tags.base.ContainerItem; + +/** + * + * @author JPEXS + */ +public class ContainerNode extends TreeNode { + + public ContainerNode(ContainerItem item) { + super(item); + } + + @Override + public ContainerItem getItem() { + return (ContainerItem) item; + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java new file mode 100644 index 000000000..db27fa2c0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treenodes; + +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.treeitems.FrameNodeItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class FrameNode extends TreeNode { + + public boolean scriptsNode = false; + + public FrameNode(FrameNodeItem item, List innerTags, boolean scriptsNode) { + super(item); + this.scriptsNode = scriptsNode; + if (innerTags != null) { + for (Tag tag : innerTags) { + subNodes.add(new TagNode(tag)); + } + } + } + + @Override + public FrameNodeItem getItem() { + return (FrameNodeItem) item; + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java new file mode 100644 index 000000000..cf33b23ad --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treenodes; + +import com.jpexs.decompiler.flash.treeitems.HeaderItem; + +/** + * + * @author JPEXS + */ +public class HeaderNode extends TreeNode { + + public HeaderNode(HeaderItem item) { + super(item); + } + + @Override + public HeaderItem getItem() { + return (HeaderItem) item; + } + +} diff --git a/src/com/jpexs/decompiler/flash/treenodes/TagNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TagNode.java similarity index 91% rename from src/com/jpexs/decompiler/flash/treenodes/TagNode.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TagNode.java index b993580cd..6766af776 100644 --- a/src/com/jpexs/decompiler/flash/treenodes/TagNode.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TagNode.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.treenodes; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/src/com/jpexs/decompiler/flash/treenodes/TreeNode.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TreeNode.java similarity index 60% rename from src/com/jpexs/decompiler/flash/treenodes/TreeNode.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TreeNode.java index 3ef0c4c7f..01aec426d 100644 --- a/src/com/jpexs/decompiler/flash/treenodes/TreeNode.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treenodes/TreeNode.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treenodes; - -import com.jpexs.decompiler.flash.treeitems.TreeItem; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - */ -public abstract class TreeNode { - - protected TreeItem item; - public boolean export = false; - public List subNodes; - - public TreeNode(TreeItem item) { - if (item == null) { - throw new Error("TreeItem should not be null."); - } - this.item = item; - this.subNodes = new ArrayList<>(); - } - - public TreeItem getItem() { - return item; - } - - @Override - public String toString() { - if (item == null) { - Logger.getLogger(TreeNode.class.getName()).log(Level.FINE, "Tree item is null"); - return null; - } - return item.toString(); - } - - public List getAllSubs() { - List ret = new ArrayList<>(); - ret.addAll(subNodes); - for (TreeNode n : subNodes) { - ret.addAll(n.getAllSubs()); - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.treenodes; + +import com.jpexs.decompiler.flash.treeitems.TreeItem; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + */ +public abstract class TreeNode { + + protected TreeItem item; + public boolean export = false; + public List subNodes; + + public TreeNode(TreeItem item) { + if (item == null) { + throw new Error("TreeItem should not be null."); + } + this.item = item; + this.subNodes = new ArrayList<>(); + } + + public TreeItem getItem() { + return item; + } + + @Override + public String toString() { + if (item == null) { + Logger.getLogger(TreeNode.class.getName()).log(Level.FINE, "Tree item is null"); + return null; + } + return item.toString(); + } + + public List getAllSubs() { + List ret = new ArrayList<>(); + ret.addAll(subNodes); + for (TreeNode n : subNodes) { + ret.addAll(n.getAllSubs()); + } + return ret; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java new file mode 100644 index 000000000..cce03fb75 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class ALPHABITMAPDATA implements Serializable { + + public ARGB[] bitmapPixelData = new ARGB[0]; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java new file mode 100644 index 000000000..41a09855d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class ALPHACOLORMAPDATA implements Serializable { + + public RGBA[] colorTableRGB; + public byte[] colorMapPixelData; +} diff --git a/src/com/jpexs/decompiler/flash/types/ARGB.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ARGB.java similarity index 59% rename from src/com/jpexs/decompiler/flash/types/ARGB.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ARGB.java index d30871728..4b8316f94 100644 --- a/src/com/jpexs/decompiler/flash/types/ARGB.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ARGB.java @@ -1,70 +1,69 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.awt.Color; -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class ARGB implements Serializable { - - /** - * Alpha value defining opacity - */ - @SWFType(BasicType.UI8) - public int alpha; - /** - * Red color value - */ - @SWFType(BasicType.UI8) - public int red; - /** - * Green color value - */ - @SWFType(BasicType.UI8) - public int green; - /** - * Blue color value - */ - @SWFType(BasicType.UI8) - public int blue; - - @Override - public String toString() { - return "[ARGB a=" + alpha + ",r=" + red + ",g=" + green + ",b=" + blue + "]"; - } - - public Color toColor() { - return new Color(red, green, blue, alpha); - } - - public ARGB() { - - } - - public ARGB(Color color) { - this.alpha = color.getAlpha(); - this.red = color.getRed(); - this.green = color.getGreen(); - this.blue = color.getBlue(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.awt.Color; +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class ARGB implements Serializable { + + /** + * Alpha value defining opacity + */ + @SWFType(BasicType.UI8) + public int alpha; + /** + * Red color value + */ + @SWFType(BasicType.UI8) + public int red; + /** + * Green color value + */ + @SWFType(BasicType.UI8) + public int green; + /** + * Blue color value + */ + @SWFType(BasicType.UI8) + public int blue; + + @Override + public String toString() { + return "[ARGB a=" + alpha + ",r=" + red + ",g=" + green + ",b=" + blue + "]"; + } + + public Color toColor() { + return new Color(red, green, blue, alpha); + } + + public ARGB() { + + } + + public ARGB(Color color) { + this.alpha = color.getAlpha(); + this.red = color.getRed(); + this.green = color.getGreen(); + this.blue = color.getBlue(); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java new file mode 100644 index 000000000..e9b954c95 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class BITMAPDATA implements Serializable { + + public PIX15[] bitmapPixelDataPix15 = new PIX15[0]; + public PIX24[] bitmapPixelDataPix24 = new PIX24[0]; +} diff --git a/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java similarity index 93% rename from src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index d294bfb4d..60ecfae52 100644 --- a/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java similarity index 74% rename from src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java index 61b8761fc..1c6d1d74b 100644 --- a/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BUTTONRECORD.java @@ -1,95 +1,94 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.tags.DefineButton2Tag; -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.decompiler.flash.types.filters.FILTER; -import java.io.Serializable; -import java.util.List; - -/** - * Defines a character to be displayed in one or more button states. - * - * @author JPEXS - */ -public class BUTTONRECORD implements Serializable { - - @Reserved - @SWFType(value = BasicType.UB, count = 2) - public int reserved; - /** - * @since SWF 8 Has blend mode? - */ - public boolean buttonHasBlendMode; - /** - * @since SWF 8 Has filter list? - */ - public boolean buttonHasFilterList; - /** - * Present in hit test state - */ - public boolean buttonStateHitTest; - /** - * Present in down state - */ - public boolean buttonStateDown; - /** - * Present in over state - */ - public boolean buttonStateOver; - /** - * Present in up state - */ - public boolean buttonStateUp; - /** - * ID of character to place - */ - @SWFType(BasicType.UI16) - public int characterId; - /** - * Depth at which to place character - */ - @SWFType(BasicType.UI16) - public int placeDepth; - /** - * Transformation matrix for character placement - */ - public MATRIX placeMatrix; - /** - * If within DefineButton2Tag: Character color transform - */ - public CXFORMWITHALPHA colorTransform; - /** - * If within DefineButton2Tag and buttonHasFilterList: List of filters on - * this button - */ - public List filterList; - /** - * If within DefineButton2Tag and buttonHasBlendMode: Blend mode - */ - @SWFType(BasicType.UI8) - @Conditional(value = {"buttonHasBlendMode"}, tags = {DefineButton2Tag.ID}) - public int blendMode; - - @Override - public String toString() { - return "[BUTTONRECORD character:" + characterId + ", depth:" + placeDepth + ", state:" + ((buttonStateDown ? "down " : "") + (buttonStateHitTest ? "hit " : "") + (buttonStateOver ? "over " : "") + (buttonStateUp ? "up " : "")) + "]"; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.tags.DefineButton2Tag; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.decompiler.flash.types.filters.FILTER; +import java.io.Serializable; +import java.util.List; + +/** + * Defines a character to be displayed in one or more button states. + * + * @author JPEXS + */ +public class BUTTONRECORD implements Serializable { + + @Reserved + @SWFType(value = BasicType.UB, count = 2) + public int reserved; + /** + * @since SWF 8 Has blend mode? + */ + public boolean buttonHasBlendMode; + /** + * @since SWF 8 Has filter list? + */ + public boolean buttonHasFilterList; + /** + * Present in hit test state + */ + public boolean buttonStateHitTest; + /** + * Present in down state + */ + public boolean buttonStateDown; + /** + * Present in over state + */ + public boolean buttonStateOver; + /** + * Present in up state + */ + public boolean buttonStateUp; + /** + * ID of character to place + */ + @SWFType(BasicType.UI16) + public int characterId; + /** + * Depth at which to place character + */ + @SWFType(BasicType.UI16) + public int placeDepth; + /** + * Transformation matrix for character placement + */ + public MATRIX placeMatrix; + /** + * If within DefineButton2Tag: Character color transform + */ + public CXFORMWITHALPHA colorTransform; + /** + * If within DefineButton2Tag and buttonHasFilterList: List of filters on + * this button + */ + public List filterList; + /** + * If within DefineButton2Tag and buttonHasBlendMode: Blend mode + */ + @SWFType(BasicType.UI8) + @Conditional(value = {"buttonHasBlendMode"}, tags = {DefineButton2Tag.ID}) + public int blendMode; + + @Override + public String toString() { + return "[BUTTONRECORD character:" + characterId + ", depth:" + placeDepth + ", state:" + ((buttonStateDown ? "down " : "") + (buttonStateHitTest ? "hit " : "") + (buttonStateOver ? "over " : "") + (buttonStateUp ? "up " : "")) + "]"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BasicType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BasicType.java new file mode 100644 index 000000000..1b2c17fe2 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/BasicType.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +/** + * + * @author JPEXS + */ +public enum BasicType { + + UI8, + UI16, + UI32, + EncodedU32, + SI8, + SI16, + SI32, + UB, + SB, + FB, + FLOAT, + FLOAT16, + FIXED, + FIXED8, + NONE, + OTHER +} diff --git a/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java similarity index 91% rename from src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index 3d29352c9..4dd65b39f 100644 --- a/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.DisassemblyListener; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java new file mode 100644 index 000000000..942905604 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * Define event handlers for a sprite character + * + * @author JPEXS + */ +public class CLIPACTIONS implements Serializable { + + @Reserved + @SWFType(BasicType.UI16) + public int reserved; + /** + * All events used in these clip actions + */ + public CLIPEVENTFLAGS allEventFlags; + /** + * Individual event handlers + */ + public List clipActionRecords = new ArrayList<>(); +} diff --git a/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java similarity index 86% rename from src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java index bab53f24b..dddfac8a5 100644 --- a/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CLIPEVENTFLAGS.java @@ -1,267 +1,266 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.helpers.Helper; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * Specifies one or more sprite events to which an event handler applies. - * - * @author JPEXS - */ -public class CLIPEVENTFLAGS implements Serializable { - - /** - * Key up event - */ - public boolean clipEventKeyUp; - /** - * Key down event - */ - public boolean clipEventKeyDown; - /** - * Mouse up event - */ - public boolean clipEventMouseUp; - /** - * Mouse down event - */ - public boolean clipEventMouseDown; - /** - * Mouse move event - */ - public boolean clipEventMouseMove; - /** - * Clip unload event - */ - public boolean clipEventUnload; - /** - * Frame event - */ - public boolean clipEventEnterFrame; - /** - * Clip load event - */ - public boolean clipEventLoad; - /** - * @since SWF 6 Mouse drag over event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventDragOver; - /** - * @since SWF 6 Mouse rollout event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventRollOut; - /** - * @since SWF 6 Mouse rollover event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventRollOver; - /** - * @since SWF 6 Mouse release outside event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventReleaseOutside; - /** - * @since SWF 6 Mouse release inside event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventRelease; - /** - * @since SWF 6 Mouse press event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventPress; - /** - * @since SWF 6 Initialize event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventInitialize; - /** - * Data received event - */ - public boolean clipEventData; - @Reserved - @SWFType(value = BasicType.UB, count = 5) - @Conditional(minSwfVersion = 6) - public int reserved; - /** - * @since SWF 7 Construct event - */ - @Conditional(minSwfVersion = 7) //in v 6 always 0 - public boolean clipEventConstruct = false; - /** - * @since SWF 6 Key press event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventKeyPress = false; - /** - * @since SWF 6 Mouse drag out event - */ - @Conditional(minSwfVersion = 6) - public boolean clipEventDragOut = false; - - @Reserved - @SWFType(value = BasicType.UB, count = 8) - @Conditional(minSwfVersion = 6) - public int reserved2; - - public String getHeader(int key, boolean asFileName) { - String ret = ""; - List onList = new ArrayList<>(); - if (clipEventKeyUp) { - ret = "onClipEvent(keyUp)"; - } - if (clipEventKeyDown) { - ret = "onClipEvent(keyDown)"; - } - if (clipEventMouseUp) { - ret = "onClipEvent(mouseUp)"; - } - if (clipEventMouseDown) { - ret = "onClipEvent(mouseDown)"; - } - if (clipEventMouseMove) { - ret = "onClipEvent(mouseMove)"; - } - if (clipEventUnload) { - ret = "onClipEvent(unload)"; - } - if (clipEventEnterFrame) { - ret = "onClipEvent(enterFrame)"; - } - if (clipEventLoad) { - ret = "onClipEvent(load)"; - } - if (clipEventData) { - ret = "onClipEvent(data)"; - } - if (clipEventDragOver) { - onList.add("dragOver"); - } - if (clipEventRollOut) { - onList.add("rollOut"); - } - if (clipEventRollOver) { - onList.add("rollOver"); - } - if (clipEventReleaseOutside) { - onList.add("releaseOutside"); - } - if (clipEventRelease) { - onList.add("release"); - } - if (clipEventPress) { - onList.add("press"); - } - if (clipEventInitialize) { - onList.add("initialize"); - } - - if (clipEventConstruct) { - onList.add("construct"); - } - if (clipEventKeyPress) { - if (asFileName) { - onList.add("keyPress " + Helper.makeFileName(CLIPACTIONRECORD.keyToString(key).replace("<", "").replace(">", "")) + ""); - } else { - onList.add("keyPress \"" + CLIPACTIONRECORD.keyToString(key) + "\""); - } - } - if (clipEventDragOut) { - onList.add("dragOut"); - } - - if (!onList.isEmpty()) { - ret = "on(" + Helper.joinStrings(onList, ",") + ")"; - } - return ret.trim(); - } - - /** - * Returns true if all events are false - * - * @return True when all events are false - */ - public boolean isClear() { - if (clipEventKeyUp) { - return false; - } - if (clipEventKeyDown) { - return false; - } - if (clipEventMouseUp) { - return false; - } - if (clipEventMouseDown) { - return false; - } - if (clipEventMouseMove) { - return false; - } - if (clipEventUnload) { - return false; - } - if (clipEventEnterFrame) { - return false; - } - if (clipEventLoad) { - return false; - } - if (clipEventDragOver) { - return false; - } - if (clipEventRollOut) { - return false; - } - if (clipEventRollOver) { - return false; - } - if (clipEventReleaseOutside) { - return false; - } - if (clipEventRelease) { - return false; - } - if (clipEventPress) { - return false; - } - if (clipEventInitialize) { - return false; - } - if (clipEventData) { - return false; - } - if (clipEventConstruct) { - return false; - } - if (clipEventKeyPress) { - return false; - } - if (clipEventDragOut) { - return false; - } - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.helpers.Helper; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * Specifies one or more sprite events to which an event handler applies. + * + * @author JPEXS + */ +public class CLIPEVENTFLAGS implements Serializable { + + /** + * Key up event + */ + public boolean clipEventKeyUp; + /** + * Key down event + */ + public boolean clipEventKeyDown; + /** + * Mouse up event + */ + public boolean clipEventMouseUp; + /** + * Mouse down event + */ + public boolean clipEventMouseDown; + /** + * Mouse move event + */ + public boolean clipEventMouseMove; + /** + * Clip unload event + */ + public boolean clipEventUnload; + /** + * Frame event + */ + public boolean clipEventEnterFrame; + /** + * Clip load event + */ + public boolean clipEventLoad; + /** + * @since SWF 6 Mouse drag over event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventDragOver; + /** + * @since SWF 6 Mouse rollout event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventRollOut; + /** + * @since SWF 6 Mouse rollover event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventRollOver; + /** + * @since SWF 6 Mouse release outside event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventReleaseOutside; + /** + * @since SWF 6 Mouse release inside event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventRelease; + /** + * @since SWF 6 Mouse press event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventPress; + /** + * @since SWF 6 Initialize event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventInitialize; + /** + * Data received event + */ + public boolean clipEventData; + @Reserved + @SWFType(value = BasicType.UB, count = 5) + @Conditional(minSwfVersion = 6) + public int reserved; + /** + * @since SWF 7 Construct event + */ + @Conditional(minSwfVersion = 7) //in v 6 always 0 + public boolean clipEventConstruct = false; + /** + * @since SWF 6 Key press event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventKeyPress = false; + /** + * @since SWF 6 Mouse drag out event + */ + @Conditional(minSwfVersion = 6) + public boolean clipEventDragOut = false; + + @Reserved + @SWFType(value = BasicType.UB, count = 8) + @Conditional(minSwfVersion = 6) + public int reserved2; + + public String getHeader(int key, boolean asFileName) { + String ret = ""; + List onList = new ArrayList<>(); + if (clipEventKeyUp) { + ret = "onClipEvent(keyUp)"; + } + if (clipEventKeyDown) { + ret = "onClipEvent(keyDown)"; + } + if (clipEventMouseUp) { + ret = "onClipEvent(mouseUp)"; + } + if (clipEventMouseDown) { + ret = "onClipEvent(mouseDown)"; + } + if (clipEventMouseMove) { + ret = "onClipEvent(mouseMove)"; + } + if (clipEventUnload) { + ret = "onClipEvent(unload)"; + } + if (clipEventEnterFrame) { + ret = "onClipEvent(enterFrame)"; + } + if (clipEventLoad) { + ret = "onClipEvent(load)"; + } + if (clipEventData) { + ret = "onClipEvent(data)"; + } + if (clipEventDragOver) { + onList.add("dragOver"); + } + if (clipEventRollOut) { + onList.add("rollOut"); + } + if (clipEventRollOver) { + onList.add("rollOver"); + } + if (clipEventReleaseOutside) { + onList.add("releaseOutside"); + } + if (clipEventRelease) { + onList.add("release"); + } + if (clipEventPress) { + onList.add("press"); + } + if (clipEventInitialize) { + onList.add("initialize"); + } + + if (clipEventConstruct) { + onList.add("construct"); + } + if (clipEventKeyPress) { + if (asFileName) { + onList.add("keyPress " + Helper.makeFileName(CLIPACTIONRECORD.keyToString(key).replace("<", "").replace(">", "")) + ""); + } else { + onList.add("keyPress \"" + CLIPACTIONRECORD.keyToString(key) + "\""); + } + } + if (clipEventDragOut) { + onList.add("dragOut"); + } + + if (!onList.isEmpty()) { + ret = "on(" + Helper.joinStrings(onList, ",") + ")"; + } + return ret.trim(); + } + + /** + * Returns true if all events are false + * + * @return True when all events are false + */ + public boolean isClear() { + if (clipEventKeyUp) { + return false; + } + if (clipEventKeyDown) { + return false; + } + if (clipEventMouseUp) { + return false; + } + if (clipEventMouseDown) { + return false; + } + if (clipEventMouseMove) { + return false; + } + if (clipEventUnload) { + return false; + } + if (clipEventEnterFrame) { + return false; + } + if (clipEventLoad) { + return false; + } + if (clipEventDragOver) { + return false; + } + if (clipEventRollOut) { + return false; + } + if (clipEventRollOver) { + return false; + } + if (clipEventReleaseOutside) { + return false; + } + if (clipEventRelease) { + return false; + } + if (clipEventPress) { + return false; + } + if (clipEventInitialize) { + return false; + } + if (clipEventData) { + return false; + } + if (clipEventConstruct) { + return false; + } + if (clipEventKeyPress) { + return false; + } + if (clipEventDragOut) { + return false; + } + return true; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java new file mode 100644 index 000000000..d9565446a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import java.io.Serializable; + +/** + * @author JPEXS + */ +public class COLORMAPDATA implements Serializable { + + public RGB[] colorTableRGB; + public byte[] colorMapPixelData; +} diff --git a/src/com/jpexs/decompiler/flash/types/CXFORM.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORM.java similarity index 72% rename from src/com/jpexs/decompiler/flash/types/CXFORM.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORM.java index bca0c66b4..f9baf67e2 100644 --- a/src/com/jpexs/decompiler/flash/types/CXFORM.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORM.java @@ -1,103 +1,102 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Defines a transform that can be applied to the color space of a graphic - * object. - * - * @author JPEXS - */ -public class CXFORM extends ColorTransform implements Serializable { - - /** - * Has color addition values - */ - public boolean hasAddTerms; - /** - * Has color multiply values - */ - public boolean hasMultTerms; - @Calculated - @SWFType(value = BasicType.UB, count = 4) - public int nbits; - /** - * Red multiply value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int redMultTerm; - /** - * Green multiply value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int greenMultTerm; - /** - * Blue multiply value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int blueMultTerm; - /** - * Red addition value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int redAddTerm; - /** - * Green addition value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int greenAddTerm; - /** - * Blue addition value - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int blueAddTerm; - - @Override - public int getRedAdd() { - return hasAddTerms ? redAddTerm : super.getRedAdd(); - } - - @Override - public int getGreenAdd() { - return hasAddTerms ? greenAddTerm : super.getGreenAdd(); - } - - @Override - public int getBlueAdd() { - return hasAddTerms ? blueAddTerm : super.getBlueAdd(); - } - - @Override - public int getRedMulti() { - return hasMultTerms ? redMultTerm : super.getRedMulti(); - } - - @Override - public int getGreenMulti() { - return hasMultTerms ? greenMultTerm : super.getGreenMulti(); - } - - @Override - public int getBlueMulti() { - return hasMultTerms ? blueMultTerm : super.getBlueMulti(); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Defines a transform that can be applied to the color space of a graphic + * object. + * + * @author JPEXS + */ +public class CXFORM extends ColorTransform implements Serializable { + + /** + * Has color addition values + */ + public boolean hasAddTerms; + /** + * Has color multiply values + */ + public boolean hasMultTerms; + @Calculated + @SWFType(value = BasicType.UB, count = 4) + public int nbits; + /** + * Red multiply value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int redMultTerm; + /** + * Green multiply value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int greenMultTerm; + /** + * Blue multiply value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int blueMultTerm; + /** + * Red addition value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int redAddTerm; + /** + * Green addition value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int greenAddTerm; + /** + * Blue addition value + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int blueAddTerm; + + @Override + public int getRedAdd() { + return hasAddTerms ? redAddTerm : super.getRedAdd(); + } + + @Override + public int getGreenAdd() { + return hasAddTerms ? greenAddTerm : super.getGreenAdd(); + } + + @Override + public int getBlueAdd() { + return hasAddTerms ? blueAddTerm : super.getBlueAdd(); + } + + @Override + public int getRedMulti() { + return hasMultTerms ? redMultTerm : super.getRedMulti(); + } + + @Override + public int getGreenMulti() { + return hasMultTerms ? greenMultTerm : super.getGreenMulti(); + } + + @Override + public int getBlueMulti() { + return hasMultTerms ? blueMultTerm : super.getBlueMulti(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java similarity index 78% rename from src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java index 2f4054a51..4303acc6c 100644 --- a/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/CXFORMWITHALPHA.java @@ -1,133 +1,132 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Defines a transform that can be applied to the color space of a graphic - * object. - * - * @author JPEXS - */ -public class CXFORMWITHALPHA extends ColorTransform implements Serializable { - - /** - * Has color addition values - */ - public boolean hasAddTerms; - /** - * Has color multiply values - */ - public boolean hasMultTerms; - /** - * Red multiply value - */ - @Conditional("hasMultTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int redMultTerm; - /** - * Green multiply value - */ - @Conditional("hasMultTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int greenMultTerm; - /** - * Blue multiply value - */ - @Conditional("hasMultTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int blueMultTerm; - /** - * Alpha multiply value - */ - @Conditional("hasMultTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int alphaMultTerm; - /** - * Red addition value - */ - @Conditional("hasAddTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int redAddTerm; - /** - * Green addition value - */ - @Conditional("hasAddTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int greenAddTerm; - /** - * Blue addition value - */ - @Conditional("hasAddTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int blueAddTerm; - /** - * Alpha addition value - */ - @Conditional("hasAddTerms") - @SWFType(value = BasicType.SB, countField = "nbits") - public int alphaAddTerm; - - @Calculated - @SWFType(value = BasicType.UB, count = 4) - public int nbits; - - @Override - public int getRedAdd() { - return hasAddTerms ? redAddTerm : super.getRedAdd(); - } - - @Override - public int getGreenAdd() { - return hasAddTerms ? greenAddTerm : super.getGreenAdd(); - } - - @Override - public int getBlueAdd() { - return hasAddTerms ? blueAddTerm : super.getBlueAdd(); - } - - @Override - public int getAlphaAdd() { - return hasAddTerms ? alphaAddTerm : super.getAlphaAdd(); - } - - @Override - public int getRedMulti() { - return hasMultTerms ? redMultTerm : super.getRedMulti(); - } - - @Override - public int getGreenMulti() { - return hasMultTerms ? greenMultTerm : super.getGreenMulti(); - } - - @Override - public int getBlueMulti() { - return hasMultTerms ? blueMultTerm : super.getBlueMulti(); - } - - @Override - public int getAlphaMulti() { - return hasMultTerms ? alphaMultTerm : super.getAlphaMulti(); - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Defines a transform that can be applied to the color space of a graphic + * object. + * + * @author JPEXS + */ +public class CXFORMWITHALPHA extends ColorTransform implements Serializable { + + /** + * Has color addition values + */ + public boolean hasAddTerms; + /** + * Has color multiply values + */ + public boolean hasMultTerms; + /** + * Red multiply value + */ + @Conditional("hasMultTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int redMultTerm; + /** + * Green multiply value + */ + @Conditional("hasMultTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int greenMultTerm; + /** + * Blue multiply value + */ + @Conditional("hasMultTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int blueMultTerm; + /** + * Alpha multiply value + */ + @Conditional("hasMultTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int alphaMultTerm; + /** + * Red addition value + */ + @Conditional("hasAddTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int redAddTerm; + /** + * Green addition value + */ + @Conditional("hasAddTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int greenAddTerm; + /** + * Blue addition value + */ + @Conditional("hasAddTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int blueAddTerm; + /** + * Alpha addition value + */ + @Conditional("hasAddTerms") + @SWFType(value = BasicType.SB, countField = "nbits") + public int alphaAddTerm; + + @Calculated + @SWFType(value = BasicType.UB, count = 4) + public int nbits; + + @Override + public int getRedAdd() { + return hasAddTerms ? redAddTerm : super.getRedAdd(); + } + + @Override + public int getGreenAdd() { + return hasAddTerms ? greenAddTerm : super.getGreenAdd(); + } + + @Override + public int getBlueAdd() { + return hasAddTerms ? blueAddTerm : super.getBlueAdd(); + } + + @Override + public int getAlphaAdd() { + return hasAddTerms ? alphaAddTerm : super.getAlphaAdd(); + } + + @Override + public int getRedMulti() { + return hasMultTerms ? redMultTerm : super.getRedMulti(); + } + + @Override + public int getGreenMulti() { + return hasMultTerms ? greenMultTerm : super.getGreenMulti(); + } + + @Override + public int getBlueMulti() { + return hasMultTerms ? blueMultTerm : super.getBlueMulti(); + } + + @Override + public int getAlphaMulti() { + return hasMultTerms ? alphaMultTerm : super.getAlphaMulti(); + } + +} diff --git a/src/com/jpexs/decompiler/flash/types/ColorTransform.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ColorTransform.java similarity index 85% rename from src/com/jpexs/decompiler/flash/types/ColorTransform.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ColorTransform.java index 93f29b908..84e5135e5 100644 --- a/src/com/jpexs/decompiler/flash/types/ColorTransform.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ColorTransform.java @@ -1,151 +1,150 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.filters.Filtering; -import com.jpexs.helpers.Helper; -import com.jpexs.helpers.SerializableImage; -import java.awt.Color; -import java.awt.image.RescaleOp; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class ColorTransform implements Serializable { - - public RescaleOp toRescaleOp() { - return new RescaleOp(new float[]{getRedMulti() / 255f, getGreenMulti() / 255f, getBlueMulti() / 255f, getAlphaMulti() / 255f}, - new float[]{getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd()}, null); - } - - public SerializableImage apply(SerializableImage src) { - return Filtering.colorEffect(src, getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti()); - } - - public Color apply(Color color) { - return Filtering.colorEffect(color, getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti()); - } - - public RGB apply(RGB color) { - if (color == null) { - return null; - } - return new RGBA(Filtering.colorEffect(color.toColor(), getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti())); - } - - public RGBA apply(RGBA color) { - if (color == null) { - return null; - } - return new RGBA(Filtering.colorEffect(color.toColor(), getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti())); - } - - public GRADRECORD[] apply(GRADRECORD[] gradRecords) { - GRADRECORD[] ret = Helper.deepCopy(gradRecords); - for (GRADRECORD r : ret) { - r.color = apply(r.color); - } - return ret; - } - - public int getRedAdd() { - return 0; - } - - public int getGreenAdd() { - return 0; - } - - public int getBlueAdd() { - return 0; - } - - public int getAlphaAdd() { - return 0; - } - - public int getRedMulti() { - return 255; - } - - public int getGreenMulti() { - return 255; - } - - public int getBlueMulti() { - return 255; - } - - public int getAlphaMulti() { - return 255; - } - - public ColorTransform merge(final ColorTransform c) { - final ColorTransform t = this; - return new ColorTransform() { - - @Override - public int getRedAdd() { - return (t.getRedAdd() + c.getRedAdd()); - } - - @Override - public int getGreenAdd() { - return (t.getGreenAdd() + c.getGreenAdd()); - } - - @Override - public int getBlueAdd() { - return (t.getBlueAdd() + c.getBlueAdd()); - } - - @Override - public int getAlphaAdd() { - return (t.getAlphaAdd() + c.getAlphaAdd()); - } - - @Override - public int getRedMulti() { - return (int) ((float) t.getRedMulti() / 255f * c.getRedMulti()); - } - - @Override - public int getGreenMulti() { - return (int) ((float) t.getGreenMulti() / 255f * c.getGreenMulti()); - } - - @Override - public int getBlueMulti() { - return (int) ((float) t.getBlueMulti() / 255f * c.getBlueMulti()); - } - - @Override - public int getAlphaMulti() { - return (int) ((float) t.getAlphaMulti() / 255f * c.getAlphaMulti()); - } - }; - } - - @Override - public String toString() { - return "[colorTransform redAdd=" + getRedAdd() + ", greenAdd=" + getGreenAdd() + ", blueAdd=" + getBlueAdd() + ", alphaAdd=" + getAlphaAdd() - + ", redMulti=" + getRedMulti() + ", greenMulti=" + getGreenMulti() + ", blueMulti=" + getBlueMulti() + ", alphaMulti=" + getAlphaMulti() + "]"; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.filters.Filtering; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.SerializableImage; +import java.awt.Color; +import java.awt.image.RescaleOp; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class ColorTransform implements Serializable { + + public RescaleOp toRescaleOp() { + return new RescaleOp(new float[]{getRedMulti() / 255f, getGreenMulti() / 255f, getBlueMulti() / 255f, getAlphaMulti() / 255f}, + new float[]{getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd()}, null); + } + + public SerializableImage apply(SerializableImage src) { + return Filtering.colorEffect(src, getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti()); + } + + public Color apply(Color color) { + return Filtering.colorEffect(color, getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti()); + } + + public RGB apply(RGB color) { + if (color == null) { + return null; + } + return new RGBA(Filtering.colorEffect(color.toColor(), getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti())); + } + + public RGBA apply(RGBA color) { + if (color == null) { + return null; + } + return new RGBA(Filtering.colorEffect(color.toColor(), getRedAdd(), getGreenAdd(), getBlueAdd(), getAlphaAdd(), getRedMulti(), getGreenMulti(), getBlueMulti(), getAlphaMulti())); + } + + public GRADRECORD[] apply(GRADRECORD[] gradRecords) { + GRADRECORD[] ret = Helper.deepCopy(gradRecords); + for (GRADRECORD r : ret) { + r.color = apply(r.color); + } + return ret; + } + + public int getRedAdd() { + return 0; + } + + public int getGreenAdd() { + return 0; + } + + public int getBlueAdd() { + return 0; + } + + public int getAlphaAdd() { + return 0; + } + + public int getRedMulti() { + return 255; + } + + public int getGreenMulti() { + return 255; + } + + public int getBlueMulti() { + return 255; + } + + public int getAlphaMulti() { + return 255; + } + + public ColorTransform merge(final ColorTransform c) { + final ColorTransform t = this; + return new ColorTransform() { + + @Override + public int getRedAdd() { + return (t.getRedAdd() + c.getRedAdd()); + } + + @Override + public int getGreenAdd() { + return (t.getGreenAdd() + c.getGreenAdd()); + } + + @Override + public int getBlueAdd() { + return (t.getBlueAdd() + c.getBlueAdd()); + } + + @Override + public int getAlphaAdd() { + return (t.getAlphaAdd() + c.getAlphaAdd()); + } + + @Override + public int getRedMulti() { + return (int) ((float) t.getRedMulti() / 255f * c.getRedMulti()); + } + + @Override + public int getGreenMulti() { + return (int) ((float) t.getGreenMulti() / 255f * c.getGreenMulti()); + } + + @Override + public int getBlueMulti() { + return (int) ((float) t.getBlueMulti() / 255f * c.getBlueMulti()); + } + + @Override + public int getAlphaMulti() { + return (int) ((float) t.getAlphaMulti() / 255f * c.getAlphaMulti()); + } + }; + } + + @Override + public String toString() { + return "[colorTransform redAdd=" + getRedAdd() + ", greenAdd=" + getGreenAdd() + ", blueAdd=" + getBlueAdd() + ", alphaAdd=" + getAlphaAdd() + + ", redMulti=" + getRedMulti() + ", greenMulti=" + getGreenMulti() + ", blueMulti=" + getBlueMulti() + ", alphaMulti=" + getAlphaMulti() + "]"; + } + +} diff --git a/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java similarity index 81% rename from src/com/jpexs/decompiler/flash/types/FILLSTYLE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java index fb00a4967..6690de1e2 100644 --- a/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLE.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.DefineShape3Tag; diff --git a/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java similarity index 51% rename from src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java index 1c68d5a98..60ec764ea 100644 --- a/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java new file mode 100644 index 000000000..c0a4d1e65 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class FOCALGRADIENT extends GRADIENT implements Serializable { + + @SWFType(BasicType.FIXED8) + public float focalPoint; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java new file mode 100644 index 000000000..7d759ecb9 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class GLYPHENTRY implements Serializable { + + @SWFType(value = BasicType.UB, countField = "+glyphBits") + public int glyphIndex; + @SWFType(value = BasicType.SB, countField = "advanceBits") + public int glyphAdvance; + + @Override + public String toString() { + return "[GLYPHENTRY index=" + glyphIndex + ", advance=" + glyphAdvance + "]"; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/GRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java similarity index 56% rename from src/com/jpexs/decompiler/flash/types/GRADIENT.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java index 6f8e5183c..8e96b165f 100644 --- a/src/com/jpexs/decompiler/flash/types/GRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class GRADIENT implements Serializable { - - /** - * Spread mode - */ - @SWFType(value = BasicType.UB, count = 2) - public int spreadMode; - public static final int SPREAD_PAD_MODE = 0; - public static final int SPREAD_REFLECT_MODE = 1; - public static final int SPREAD_REPEAT_MODE = 2; - public static final int SPREAD_RESERVED = 3; - /** - * Interpolation mode - */ - @SWFType(value = BasicType.UB, count = 2) - public int interpolationMode; - public static final int INTERPOLATION_RGB_MODE = 0; - public static final int INTERPOLATION_LINEAR_RGB_MODE = 1; - public static final int INTERPOLATION_RESERVED1 = 2; - public static final int INTERPOLATION_RESERVED2 = 3; - public GRADRECORD[] gradientRecords = new GRADRECORD[0]; -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class GRADIENT implements Serializable { + + /** + * Spread mode + */ + @SWFType(value = BasicType.UB, count = 2) + public int spreadMode; + public static final int SPREAD_PAD_MODE = 0; + public static final int SPREAD_REFLECT_MODE = 1; + public static final int SPREAD_REPEAT_MODE = 2; + public static final int SPREAD_RESERVED = 3; + /** + * Interpolation mode + */ + @SWFType(value = BasicType.UB, count = 2) + public int interpolationMode; + public static final int INTERPOLATION_RGB_MODE = 0; + public static final int INTERPOLATION_LINEAR_RGB_MODE = 1; + public static final int INTERPOLATION_RESERVED1 = 2; + public static final int INTERPOLATION_RESERVED2 = 3; + public GRADRECORD[] gradientRecords = new GRADRECORD[0]; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADRECORD.java new file mode 100644 index 000000000..ec5bb485a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADRECORD.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Internal; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class GRADRECORD implements Serializable { + + @SWFType(BasicType.UI8) + public int ratio; + + @Internal + public boolean inShape3; + public RGB color; + + public float getRatioFloat() { + return ((float) ratio) / 255.0f; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java similarity index 83% rename from src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java index c6cdc31dc..4dcc817e2 100644 --- a/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java @@ -1,106 +1,105 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.awt.Font; -import java.awt.font.GlyphVector; -import java.awt.font.TextAttribute; -import java.io.Serializable; -import java.text.AttributedCharacterIterator; -import java.util.HashMap; -import java.util.Map; -import javax.swing.JPanel; - -/** - * Represents 24-bit red, green, blue value - * - * @author JPEXS - */ -public class KERNINGRECORD implements Serializable { - - @SWFType(value = BasicType.UI8, alternateValue = BasicType.UI16, alternateCondition = "fontFlagsWideCodes") - public int fontKerningCode1; - - @SWFType(value = BasicType.UI8, alternateValue = BasicType.UI16, alternateCondition = "fontFlagsWideCodes") - public int fontKerningCode2; - - @SWFType(BasicType.SI16) - public int fontKerningAdjustment; - - @Override - public String toString() { - return "[KERNINGRECORD fontKerningCode1=" + fontKerningCode1 + ", fontKerningCode2=" + fontKerningCode2 + ", fontKerningAdjustment=" + fontKerningAdjustment + "]"; - } - - public KERNINGRECORD(int fontKerningCode1, int fontKerningCode2, int fontKerningAdjustment) { - this.fontKerningCode1 = fontKerningCode1; - this.fontKerningCode2 = fontKerningCode2; - this.fontKerningAdjustment = fontKerningAdjustment; - } - - public KERNINGRECORD() { - } - - public KERNINGRECORD(Font font, char char1, char char2) { - fontKerningCode1 = char1; - fontKerningCode2 = char2; - fontKerningAdjustment = KERNINGRECORD.getSystemFontKerning(font, char1, char2); - } - - public KERNINGRECORD(String fontName, int fontStyle, int fontSize, char char1, char char2) { - fontKerningCode1 = char1; - fontKerningCode2 = char2; - fontKerningAdjustment = KERNINGRECORD.getSystemFontKerning(fontName, fontSize, fontStyle, char1, char2); - } - - public static int getSystemFontKerning(Font font, char char1, char char2) { - return getSystemFontKerning(font.getFamily(), font.getSize(), font.getStyle(), char1, char2); - } - - public static int getSystemFontKerning(String fontName, int fontSize, int fontStyle, char char1, char char2) { - char[] chars = new char[]{char1, char2}; - Map withKerningAttrs = new HashMap<>(); - - withKerningAttrs.put(TextAttribute.FAMILY, fontName); - if ((fontStyle & Font.BOLD) == Font.BOLD) { - withKerningAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); - } - if ((fontStyle & Font.ITALIC) == Font.ITALIC) { - withKerningAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - } - withKerningAttrs.put(TextAttribute.SIZE, (float) fontSize); - withKerningAttrs.put(TextAttribute.KERNING, TextAttribute.KERNING_ON); - Font withKerningFont = Font.getFont(withKerningAttrs); - GlyphVector withKerningVector = withKerningFont.layoutGlyphVector((new JPanel()).getFontMetrics(withKerningFont).getFontRenderContext(), chars, 0, chars.length, Font.LAYOUT_LEFT_TO_RIGHT); - int withKerningX = withKerningVector.getGlyphLogicalBounds(1).getBounds().x; - - Map noKerningAttrs = new HashMap<>(); - noKerningAttrs.put(TextAttribute.FAMILY, fontName); - if ((fontStyle & Font.BOLD) == Font.BOLD) { - noKerningAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); - } - if ((fontStyle & Font.ITALIC) == Font.ITALIC) { - noKerningAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - } - noKerningAttrs.put(TextAttribute.SIZE, (float) fontSize); - Font noKerningFont = Font.getFont(noKerningAttrs); - GlyphVector noKerningVector = noKerningFont.layoutGlyphVector((new JPanel()).getFontMetrics(noKerningFont).getFontRenderContext(), chars, 0, chars.length, Font.LAYOUT_LEFT_TO_RIGHT); - int noKerningX = noKerningVector.getGlyphLogicalBounds(1).getBounds().x; - return withKerningX - noKerningX; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.awt.Font; +import java.awt.font.GlyphVector; +import java.awt.font.TextAttribute; +import java.io.Serializable; +import java.text.AttributedCharacterIterator; +import java.util.HashMap; +import java.util.Map; +import javax.swing.JPanel; + +/** + * Represents 24-bit red, green, blue value + * + * @author JPEXS + */ +public class KERNINGRECORD implements Serializable { + + @SWFType(value = BasicType.UI8, alternateValue = BasicType.UI16, alternateCondition = "fontFlagsWideCodes") + public int fontKerningCode1; + + @SWFType(value = BasicType.UI8, alternateValue = BasicType.UI16, alternateCondition = "fontFlagsWideCodes") + public int fontKerningCode2; + + @SWFType(BasicType.SI16) + public int fontKerningAdjustment; + + @Override + public String toString() { + return "[KERNINGRECORD fontKerningCode1=" + fontKerningCode1 + ", fontKerningCode2=" + fontKerningCode2 + ", fontKerningAdjustment=" + fontKerningAdjustment + "]"; + } + + public KERNINGRECORD(int fontKerningCode1, int fontKerningCode2, int fontKerningAdjustment) { + this.fontKerningCode1 = fontKerningCode1; + this.fontKerningCode2 = fontKerningCode2; + this.fontKerningAdjustment = fontKerningAdjustment; + } + + public KERNINGRECORD() { + } + + public KERNINGRECORD(Font font, char char1, char char2) { + fontKerningCode1 = char1; + fontKerningCode2 = char2; + fontKerningAdjustment = KERNINGRECORD.getSystemFontKerning(font, char1, char2); + } + + public KERNINGRECORD(String fontName, int fontStyle, int fontSize, char char1, char char2) { + fontKerningCode1 = char1; + fontKerningCode2 = char2; + fontKerningAdjustment = KERNINGRECORD.getSystemFontKerning(fontName, fontSize, fontStyle, char1, char2); + } + + public static int getSystemFontKerning(Font font, char char1, char char2) { + return getSystemFontKerning(font.getFamily(), font.getSize(), font.getStyle(), char1, char2); + } + + public static int getSystemFontKerning(String fontName, int fontSize, int fontStyle, char char1, char char2) { + char[] chars = new char[]{char1, char2}; + Map withKerningAttrs = new HashMap<>(); + + withKerningAttrs.put(TextAttribute.FAMILY, fontName); + if ((fontStyle & Font.BOLD) == Font.BOLD) { + withKerningAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); + } + if ((fontStyle & Font.ITALIC) == Font.ITALIC) { + withKerningAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); + } + withKerningAttrs.put(TextAttribute.SIZE, (float) fontSize); + withKerningAttrs.put(TextAttribute.KERNING, TextAttribute.KERNING_ON); + Font withKerningFont = Font.getFont(withKerningAttrs); + GlyphVector withKerningVector = withKerningFont.layoutGlyphVector((new JPanel()).getFontMetrics(withKerningFont).getFontRenderContext(), chars, 0, chars.length, Font.LAYOUT_LEFT_TO_RIGHT); + int withKerningX = withKerningVector.getGlyphLogicalBounds(1).getBounds().x; + + Map noKerningAttrs = new HashMap<>(); + noKerningAttrs.put(TextAttribute.FAMILY, fontName); + if ((fontStyle & Font.BOLD) == Font.BOLD) { + noKerningAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); + } + if ((fontStyle & Font.ITALIC) == Font.ITALIC) { + noKerningAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); + } + noKerningAttrs.put(TextAttribute.SIZE, (float) fontSize); + Font noKerningFont = Font.getFont(noKerningAttrs); + GlyphVector noKerningVector = noKerningFont.layoutGlyphVector((new JPanel()).getFontMetrics(noKerningFont).getFontRenderContext(), chars, 0, chars.length, Font.LAYOUT_LEFT_TO_RIGHT); + int noKerningX = noKerningVector.getGlyphLogicalBounds(1).getBounds().x; + return withKerningX - noKerningX; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LANGCODE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LANGCODE.java new file mode 100644 index 000000000..066859f06 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LANGCODE.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class LANGCODE implements Serializable { + + @SWFType(BasicType.UI8) + public int languageCode; + + public LANGCODE() { + } + + public LANGCODE(int languageCode) { + this.languageCode = languageCode; + } + + @Override + public String toString() { + return "[LANGCODE:" + languageCode + "]"; + } + +} diff --git a/src/com/jpexs/decompiler/flash/types/LINESTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE.java similarity index 55% rename from src/com/jpexs/decompiler/flash/types/LINESTYLE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE.java index 0228c6c6b..10d80ca65 100644 --- a/src/com/jpexs/decompiler/flash/types/LINESTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.DefineShape3Tag; diff --git a/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java similarity index 70% rename from src/com/jpexs/decompiler/flash/types/LINESTYLE2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java index 52646a55e..d48eb5ff8 100644 --- a/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLE2.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.types.annotations.Conditional; diff --git a/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java similarity index 52% rename from src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java index 94c491207..0bb5768ce 100644 --- a/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; diff --git a/src/com/jpexs/decompiler/flash/types/MATRIX.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MATRIX.java similarity index 84% rename from src/com/jpexs/decompiler/flash/types/MATRIX.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MATRIX.java index 36c6b6b81..1ff93b980 100644 --- a/src/com/jpexs/decompiler/flash/types/MATRIX.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MATRIX.java @@ -1,181 +1,180 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.awt.Point; -import java.io.Serializable; - -/** - * Represents a standard 2x3 transformation matrix of the sort commonly used in - * 2D graphics - * - * @author JPEXS - */ -public class MATRIX implements Serializable { - - /** - * Has scale values - */ - public boolean hasScale; - /** - * X scale value - */ - @Conditional("hasScale") - @SWFType(value = BasicType.FB, countField = "nScaleBits") - public int scaleX; - /** - * Y scale value - */ - @Conditional("hasScale") - @SWFType(value = BasicType.FB, countField = "nScaleBits") - public int scaleY; - /** - * Has rotate and skew values - */ - public boolean hasRotate; - /** - * First rotate and skew value - */ - @Conditional("hasRotate") - @SWFType(value = BasicType.FB, countField = "nRotateBits") - public int rotateSkew0; - /** - * Second rotate and skew value - */ - @Conditional("hasRotate") - @SWFType(value = BasicType.FB, countField = "nRotateBits") - public int rotateSkew1; - /** - * X translate value in twips - */ - @SWFType(value = BasicType.SB, countField = "nTranslateBits") - public int translateX; - /** - * Y translate value in twips - */ - @SWFType(value = BasicType.SB, countField = "nTranslateBits") - public int translateY; - - @Calculated - @SWFType(value = BasicType.UB, count = 5) - public int nTranslateBits; - - @Calculated - @SWFType(value = BasicType.UB, count = 5) - public int nRotateBits; - - @Calculated - @SWFType(value = BasicType.UB, count = 5) - public int nScaleBits; - - public MATRIX() { - } - - public MATRIX(MATRIX m) { - if (m == null) { - return; - } - hasScale = m.hasScale; - hasRotate = m.hasRotate; - scaleX = m.scaleX; - scaleY = m.scaleY; - rotateSkew0 = m.rotateSkew0; - rotateSkew1 = m.rotateSkew1; - translateX = m.translateX; - translateY = m.translateY; - } - - @Override - public String toString() { - return "[MATRIX scale:" + getScaleXFloat() + "," + getScaleYFloat() + ", rotate:" + getRotateSkew0Float() + "," + getRotateSkew1Float() + ", translate:" + translateX + "," + translateY + "]"; - } - - private float toFloat(int i) { - return ((float) i) / (1 << 16); - } - - public Point apply(Point p) { - Point ret = new Point(); - ret.x = (int) (p.x * (hasScale ? toFloat(scaleX) : 1) + p.y * (hasRotate ? toFloat(rotateSkew1) : 0) + translateX); - ret.y = (int) (p.x * (hasRotate ? toFloat(rotateSkew0) : 0) + p.y * (hasScale ? toFloat(scaleY) : 1) + translateY); - return ret; - } - - public RECT apply(RECT r) { - Point topLeft = apply(r.getTopLeft()); - Point bottomRight = apply(r.getBottomRight()); - int Xmin = Math.min(topLeft.x, bottomRight.x); - int Ymin = Math.min(topLeft.y, bottomRight.y); - int Xmax = Math.max(topLeft.x, bottomRight.x); - int Ymax = Math.max(topLeft.y, bottomRight.y); - return new RECT(Xmin, Xmax, Ymin, Ymax); - - } - - public int getRotateSkew0() { - return hasRotate ? rotateSkew0 : 0; - } - - public int getRotateSkew1() { - return hasRotate ? rotateSkew1 : 0; - } - - public float getRotateSkew0Float() { - return (hasRotate ? toFloat(rotateSkew0) : 0); - } - - public float getRotateSkew1Float() { - return (hasRotate ? toFloat(rotateSkew1) : 0); - } - - public float getScaleXFloat() { - return (hasScale ? toFloat(scaleX) : 1); - } - - public float getScaleYFloat() { - return (hasScale ? toFloat(scaleY) : 1); - } - - public int getScaleX() { - return (hasScale ? (scaleX) : (1 << 16)); - } - - public int getScaleY() { - return (hasScale ? (scaleY) : (1 << 16)); - } - - public MATRIX merge(MATRIX m) { - MATRIX ret = new MATRIX(); - ret.translateX = m.translateX + this.translateX; - ret.translateY = m.translateY + this.translateY; - - ret.scaleX = (m.hasScale ? m.scaleX : 1) * (this.hasScale ? this.scaleX : 1); - ret.scaleY = (m.hasScale ? m.scaleY : 1) * (this.hasScale ? this.scaleY : 1); - ret.rotateSkew0 = m.rotateSkew0 + this.rotateSkew0; - ret.rotateSkew1 = m.rotateSkew1 + this.rotateSkew1; - ret.hasScale = true; - ret.hasRotate = true; - return ret; - } - - public boolean isEmpty() { - return (translateX == 0) && (translateY == 0) && (!hasRotate) && (!hasScale); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.awt.Point; +import java.io.Serializable; + +/** + * Represents a standard 2x3 transformation matrix of the sort commonly used in + * 2D graphics + * + * @author JPEXS + */ +public class MATRIX implements Serializable { + + /** + * Has scale values + */ + public boolean hasScale; + /** + * X scale value + */ + @Conditional("hasScale") + @SWFType(value = BasicType.FB, countField = "nScaleBits") + public int scaleX; + /** + * Y scale value + */ + @Conditional("hasScale") + @SWFType(value = BasicType.FB, countField = "nScaleBits") + public int scaleY; + /** + * Has rotate and skew values + */ + public boolean hasRotate; + /** + * First rotate and skew value + */ + @Conditional("hasRotate") + @SWFType(value = BasicType.FB, countField = "nRotateBits") + public int rotateSkew0; + /** + * Second rotate and skew value + */ + @Conditional("hasRotate") + @SWFType(value = BasicType.FB, countField = "nRotateBits") + public int rotateSkew1; + /** + * X translate value in twips + */ + @SWFType(value = BasicType.SB, countField = "nTranslateBits") + public int translateX; + /** + * Y translate value in twips + */ + @SWFType(value = BasicType.SB, countField = "nTranslateBits") + public int translateY; + + @Calculated + @SWFType(value = BasicType.UB, count = 5) + public int nTranslateBits; + + @Calculated + @SWFType(value = BasicType.UB, count = 5) + public int nRotateBits; + + @Calculated + @SWFType(value = BasicType.UB, count = 5) + public int nScaleBits; + + public MATRIX() { + } + + public MATRIX(MATRIX m) { + if (m == null) { + return; + } + hasScale = m.hasScale; + hasRotate = m.hasRotate; + scaleX = m.scaleX; + scaleY = m.scaleY; + rotateSkew0 = m.rotateSkew0; + rotateSkew1 = m.rotateSkew1; + translateX = m.translateX; + translateY = m.translateY; + } + + @Override + public String toString() { + return "[MATRIX scale:" + getScaleXFloat() + "," + getScaleYFloat() + ", rotate:" + getRotateSkew0Float() + "," + getRotateSkew1Float() + ", translate:" + translateX + "," + translateY + "]"; + } + + private float toFloat(int i) { + return ((float) i) / (1 << 16); + } + + public Point apply(Point p) { + Point ret = new Point(); + ret.x = (int) (p.x * (hasScale ? toFloat(scaleX) : 1) + p.y * (hasRotate ? toFloat(rotateSkew1) : 0) + translateX); + ret.y = (int) (p.x * (hasRotate ? toFloat(rotateSkew0) : 0) + p.y * (hasScale ? toFloat(scaleY) : 1) + translateY); + return ret; + } + + public RECT apply(RECT r) { + Point topLeft = apply(r.getTopLeft()); + Point bottomRight = apply(r.getBottomRight()); + int Xmin = Math.min(topLeft.x, bottomRight.x); + int Ymin = Math.min(topLeft.y, bottomRight.y); + int Xmax = Math.max(topLeft.x, bottomRight.x); + int Ymax = Math.max(topLeft.y, bottomRight.y); + return new RECT(Xmin, Xmax, Ymin, Ymax); + + } + + public int getRotateSkew0() { + return hasRotate ? rotateSkew0 : 0; + } + + public int getRotateSkew1() { + return hasRotate ? rotateSkew1 : 0; + } + + public float getRotateSkew0Float() { + return (hasRotate ? toFloat(rotateSkew0) : 0); + } + + public float getRotateSkew1Float() { + return (hasRotate ? toFloat(rotateSkew1) : 0); + } + + public float getScaleXFloat() { + return (hasScale ? toFloat(scaleX) : 1); + } + + public float getScaleYFloat() { + return (hasScale ? toFloat(scaleY) : 1); + } + + public int getScaleX() { + return (hasScale ? (scaleX) : (1 << 16)); + } + + public int getScaleY() { + return (hasScale ? (scaleY) : (1 << 16)); + } + + public MATRIX merge(MATRIX m) { + MATRIX ret = new MATRIX(); + ret.translateX = m.translateX + this.translateX; + ret.translateY = m.translateY + this.translateY; + + ret.scaleX = (m.hasScale ? m.scaleX : 1) * (this.hasScale ? this.scaleX : 1); + ret.scaleY = (m.hasScale ? m.scaleY : 1) * (this.hasScale ? this.scaleY : 1); + ret.rotateSkew0 = m.rotateSkew0 + this.rotateSkew0; + ret.rotateSkew1 = m.rotateSkew1 + this.rotateSkew1; + ret.hasScale = true; + ret.hasRotate = true; + return ret; + } + + public boolean isEmpty() { + return (translateX == 0) && (translateY == 0) && (!hasRotate) && (!hasScale); + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java similarity index 88% rename from src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java index c52d045ec..9c21f6ab4 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; diff --git a/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java similarity index 71% rename from src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java index 2702bb1ae..5be2d9455 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; diff --git a/src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java similarity index 61% rename from src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java index 1a72e2ecc..4970d2fbb 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHFOCALGRADIENT.java @@ -1,49 +1,48 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Well, this structure is undocumented, but exists - * - * @author JPEXS - */ -public class MORPHFOCALGRADIENT extends MORPHGRADIENT implements Serializable { - - @SWFType(BasicType.FIXED8) - public float startFocalPoint; - - @SWFType(BasicType.FIXED8) - public float endFocalPoint; - - @Override - public GRADIENT getGradientAt(int ratio) { - FOCALGRADIENT ret = new FOCALGRADIENT(); - ret.gradientRecords = new GRADRECORD[gradientRecords.length]; - for (int m = 0; m < gradientRecords.length; m++) { - - int gratio = (gradientRecords[m].startRatio + (gradientRecords[m].endRatio - gradientRecords[m].startRatio) * ratio / 65535); - ret.gradientRecords[m] = new GRADRECORD(); - ret.gradientRecords[m].color = morphColor(gradientRecords[m].startColor, gradientRecords[m].endColor, ratio); - ret.gradientRecords[m].ratio = gratio; - } - ret.focalPoint = (startFocalPoint + (endFocalPoint - startFocalPoint) * ratio / 65535); - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Well, this structure is undocumented, but exists + * + * @author JPEXS + */ +public class MORPHFOCALGRADIENT extends MORPHGRADIENT implements Serializable { + + @SWFType(BasicType.FIXED8) + public float startFocalPoint; + + @SWFType(BasicType.FIXED8) + public float endFocalPoint; + + @Override + public GRADIENT getGradientAt(int ratio) { + FOCALGRADIENT ret = new FOCALGRADIENT(); + ret.gradientRecords = new GRADRECORD[gradientRecords.length]; + for (int m = 0; m < gradientRecords.length; m++) { + + int gratio = (gradientRecords[m].startRatio + (gradientRecords[m].endRatio - gradientRecords[m].startRatio) * ratio / 65535); + ret.gradientRecords[m] = new GRADRECORD(); + ret.gradientRecords[m].color = morphColor(gradientRecords[m].startColor, gradientRecords[m].endColor, ratio); + ret.gradientRecords[m].ratio = gratio; + } + ret.focalPoint = (startFocalPoint + (endFocalPoint - startFocalPoint) * ratio / 65535); + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java similarity index 76% rename from src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java index b22e7aa36..0d4e2c814 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java @@ -1,94 +1,93 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Internal; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class MORPHGRADIENT implements Serializable { - - /** - * Spread mode. See GRADIENT.SPREAD_* constants - */ - @SWFType(value = BasicType.UB, count = 2) - public int spreadMode; - /** - * Interpolation mode. See GRADIENT.INTERPOLATION_* constants - */ - @SWFType(value = BasicType.UB, count = 2) - public int interPolationMode; - @Internal - public int numGradients; - - public MORPHGRADRECORD[] gradientRecords; - - public static RGBA morphColor(RGBA c1, RGBA c2, int ratio) { - int r = (c1.red + (c2.red - c1.red) * ratio / 65535); - int g = (c1.green + (c2.green - c1.green) * ratio / 65535); - int b = (c1.blue + (c2.blue - c1.blue) * ratio / 65535); - int a = (c1.alpha + (c2.alpha - c1.alpha) * ratio / 65535); - if (r > 255) { - r = 255; - } - if (g > 255) { - g = 255; - } - if (b > 255) { - b = 255; - } - if (a > 255) { - a = 255; - } - return new RGBA(r, g, b, a); - } - - public GRADIENT getGradientAt(int ratio) { - GRADIENT ret = new GRADIENT(); - ret.gradientRecords = new GRADRECORD[gradientRecords.length]; - for (int m = 0; m < gradientRecords.length; m++) { - - int gratio = (gradientRecords[m].startRatio + (gradientRecords[m].endRatio - gradientRecords[m].startRatio) * ratio / 65535); - ret.gradientRecords[m] = new GRADRECORD(); - ret.gradientRecords[m].color = morphColor(gradientRecords[m].startColor, gradientRecords[m].endColor, ratio); - ret.gradientRecords[m].ratio = gratio; - } - return ret; - } - - public GRADIENT getStartGradient() { - GRADIENT ret = new GRADIENT(); - ret.gradientRecords = new GRADRECORD[gradientRecords.length]; - for (int m = 0; m < gradientRecords.length; m++) { - ret.gradientRecords[m] = gradientRecords[m].getStartRecord(); - } - return ret; - } - - public GRADIENT getEndGradient() { - GRADIENT ret = new GRADIENT(); - ret.gradientRecords = new GRADRECORD[gradientRecords.length]; - for (int m = 0; m < gradientRecords.length; m++) { - ret.gradientRecords[m] = gradientRecords[m].getEndRecord(); - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Internal; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class MORPHGRADIENT implements Serializable { + + /** + * Spread mode. See GRADIENT.SPREAD_* constants + */ + @SWFType(value = BasicType.UB, count = 2) + public int spreadMode; + /** + * Interpolation mode. See GRADIENT.INTERPOLATION_* constants + */ + @SWFType(value = BasicType.UB, count = 2) + public int interPolationMode; + @Internal + public int numGradients; + + public MORPHGRADRECORD[] gradientRecords; + + public static RGBA morphColor(RGBA c1, RGBA c2, int ratio) { + int r = (c1.red + (c2.red - c1.red) * ratio / 65535); + int g = (c1.green + (c2.green - c1.green) * ratio / 65535); + int b = (c1.blue + (c2.blue - c1.blue) * ratio / 65535); + int a = (c1.alpha + (c2.alpha - c1.alpha) * ratio / 65535); + if (r > 255) { + r = 255; + } + if (g > 255) { + g = 255; + } + if (b > 255) { + b = 255; + } + if (a > 255) { + a = 255; + } + return new RGBA(r, g, b, a); + } + + public GRADIENT getGradientAt(int ratio) { + GRADIENT ret = new GRADIENT(); + ret.gradientRecords = new GRADRECORD[gradientRecords.length]; + for (int m = 0; m < gradientRecords.length; m++) { + + int gratio = (gradientRecords[m].startRatio + (gradientRecords[m].endRatio - gradientRecords[m].startRatio) * ratio / 65535); + ret.gradientRecords[m] = new GRADRECORD(); + ret.gradientRecords[m].color = morphColor(gradientRecords[m].startColor, gradientRecords[m].endColor, ratio); + ret.gradientRecords[m].ratio = gratio; + } + return ret; + } + + public GRADIENT getStartGradient() { + GRADIENT ret = new GRADIENT(); + ret.gradientRecords = new GRADRECORD[gradientRecords.length]; + for (int m = 0; m < gradientRecords.length; m++) { + ret.gradientRecords[m] = gradientRecords[m].getStartRecord(); + } + return ret; + } + + public GRADIENT getEndGradient() { + GRADIENT ret = new GRADIENT(); + ret.gradientRecords = new GRADRECORD[gradientRecords.length]; + for (int m = 0; m < gradientRecords.length; m++) { + ret.gradientRecords[m] = gradientRecords[m].getEndRecord(); + } + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java similarity index 50% rename from src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java index 148b46f39..a4147cbb2 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADRECORD.java @@ -1,51 +1,50 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class MORPHGRADRECORD implements Serializable { - - @SWFType(BasicType.UI8) - public int startRatio; - - public RGBA startColor; - - @SWFType(BasicType.UI8) - public int endRatio; - - public RGBA endColor; - - public GRADRECORD getStartRecord() { - GRADRECORD ret = new GRADRECORD(); - ret.ratio = startRatio; - ret.color = startColor; - return ret; - } - - public GRADRECORD getEndRecord() { - GRADRECORD ret = new GRADRECORD(); - ret.ratio = endRatio; - ret.color = endColor; - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class MORPHGRADRECORD implements Serializable { + + @SWFType(BasicType.UI8) + public int startRatio; + + public RGBA startColor; + + @SWFType(BasicType.UI8) + public int endRatio; + + public RGBA endColor; + + public GRADRECORD getStartRecord() { + GRADRECORD ret = new GRADRECORD(); + ret.ratio = startRatio; + ret.color = startColor; + return ret; + } + + public GRADRECORD getEndRecord() { + GRADRECORD ret = new GRADRECORD(); + ret.ratio = endRatio; + ret.color = endColor; + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java similarity index 57% rename from src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java index 2fe84cace..cf162e1fe 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE.java @@ -1,55 +1,54 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class MORPHLINESTYLE implements Serializable { - - @SWFType(BasicType.UI16) - public int startWidth; - @SWFType(BasicType.UI16) - public int endWidth; - public RGBA startColor; - public RGBA endColor; - - public LINESTYLE getStartLineStyle() { - LINESTYLE ret = new LINESTYLE(); - ret.color = startColor; - ret.width = startWidth; - return ret; - } - - public LINESTYLE getLineStyleAt(int ratio) { - LINESTYLE ret = new LINESTYLE(); - ret.color = MORPHGRADIENT.morphColor(startColor, endColor, ratio); - ret.width = startWidth + (endWidth - startWidth) * ratio / 65535; - return ret; - } - - public LINESTYLE getEndLineStyle() { - LINESTYLE ret = new LINESTYLE(); - ret.color = endColor; - ret.width = endWidth; - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class MORPHLINESTYLE implements Serializable { + + @SWFType(BasicType.UI16) + public int startWidth; + @SWFType(BasicType.UI16) + public int endWidth; + public RGBA startColor; + public RGBA endColor; + + public LINESTYLE getStartLineStyle() { + LINESTYLE ret = new LINESTYLE(); + ret.color = startColor; + ret.width = startWidth; + return ret; + } + + public LINESTYLE getLineStyleAt(int ratio) { + LINESTYLE ret = new LINESTYLE(); + ret.color = MORPHGRADIENT.morphColor(startColor, endColor, ratio); + ret.width = startWidth + (endWidth - startWidth) * ratio / 65535; + return ret; + } + + public LINESTYLE getEndLineStyle() { + LINESTYLE ret = new LINESTYLE(); + ret.color = endColor; + ret.width = endWidth; + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java similarity index 81% rename from src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java index a984599f6..eb903a54d 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLE2.java @@ -1,127 +1,126 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class MORPHLINESTYLE2 implements Serializable { - - @SWFType(BasicType.UI16) - public int startWidth; - @SWFType(BasicType.UI16) - public int endWidth; - @SWFType(value = BasicType.UB, count = 2) - public int startCapStyle; - @SWFType(value = BasicType.UB, count = 2) - public int joinStyle; - public static final int ROUND_JOIN = 0; - public static final int BEVEL_JOIN = 1; - public static final int MITER_JOIN = 2; - public boolean hasFillFlag; - public boolean noHScaleFlag; - public boolean noVScaleFlag; - public boolean pixelHintingFlag; - @Reserved - @SWFType(value = BasicType.UB, count = 5) - public int reserved; - public boolean noClose; - - @SWFType(value = BasicType.UB, count = 2) - public int endCapStyle; - - public static final int ROUND_CAP = 0; - public static final int NO_CAP = 1; - public static final int SQUARE_CAP = 2; - - @SWFType(value = BasicType.UI16) - @Conditional(value = "joinStyle", options = {MITER_JOIN}) - public int miterLimitFactor; - - @Conditional(value = "hasFillFlag", revert = true) - public RGBA startColor; - - @Conditional(value = "hasFillFlag", revert = true) - public RGBA endColor; - - @Conditional(value = "hasFillFlag") - public MORPHFILLSTYLE fillType; - - public LINESTYLE2 getLineStyle2At(int ratio) { - LINESTYLE2 ret = new LINESTYLE2(); - ret.width = startWidth + (endWidth - startWidth) * ratio / 65535; - ret.startCapStyle = startCapStyle; - ret.joinStyle = joinStyle; - ret.hasFillFlag = hasFillFlag; - ret.noHScaleFlag = noHScaleFlag; - ret.noVScaleFlag = noVScaleFlag; - ret.pixelHintingFlag = pixelHintingFlag; - ret.noClose = noClose; - ret.endCapStyle = endCapStyle; - ret.miterLimitFactor = miterLimitFactor; - if (hasFillFlag) { - ret.fillType = fillType.getFillStyleAt(ratio); - } else { - ret.color = MORPHGRADIENT.morphColor(startColor, endColor, ratio); - } - return ret; - } - - public LINESTYLE2 getStartLineStyle2() { - LINESTYLE2 ret = new LINESTYLE2(); - ret.width = startWidth; - ret.startCapStyle = startCapStyle; - ret.joinStyle = joinStyle; - ret.hasFillFlag = hasFillFlag; - ret.noHScaleFlag = noHScaleFlag; - ret.noVScaleFlag = noVScaleFlag; - ret.pixelHintingFlag = pixelHintingFlag; - ret.noClose = noClose; - ret.endCapStyle = endCapStyle; - ret.miterLimitFactor = miterLimitFactor; - ret.color = startColor; - if (hasFillFlag) { - ret.fillType = fillType.getStartFillStyle(); - } - return ret; - } - - public LINESTYLE2 getEndLineStyle2() { - LINESTYLE2 ret = new LINESTYLE2(); - ret.width = endWidth; - ret.startCapStyle = startCapStyle; - ret.joinStyle = joinStyle; - ret.hasFillFlag = hasFillFlag; - ret.noHScaleFlag = noHScaleFlag; - ret.noVScaleFlag = noVScaleFlag; - ret.pixelHintingFlag = pixelHintingFlag; - ret.noClose = noClose; - ret.endCapStyle = endCapStyle; - ret.miterLimitFactor = miterLimitFactor; - ret.color = endColor; - if (hasFillFlag) { - ret.fillType = fillType.getEndFillStyle(); - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class MORPHLINESTYLE2 implements Serializable { + + @SWFType(BasicType.UI16) + public int startWidth; + @SWFType(BasicType.UI16) + public int endWidth; + @SWFType(value = BasicType.UB, count = 2) + public int startCapStyle; + @SWFType(value = BasicType.UB, count = 2) + public int joinStyle; + public static final int ROUND_JOIN = 0; + public static final int BEVEL_JOIN = 1; + public static final int MITER_JOIN = 2; + public boolean hasFillFlag; + public boolean noHScaleFlag; + public boolean noVScaleFlag; + public boolean pixelHintingFlag; + @Reserved + @SWFType(value = BasicType.UB, count = 5) + public int reserved; + public boolean noClose; + + @SWFType(value = BasicType.UB, count = 2) + public int endCapStyle; + + public static final int ROUND_CAP = 0; + public static final int NO_CAP = 1; + public static final int SQUARE_CAP = 2; + + @SWFType(value = BasicType.UI16) + @Conditional(value = "joinStyle", options = {MITER_JOIN}) + public int miterLimitFactor; + + @Conditional(value = "hasFillFlag", revert = true) + public RGBA startColor; + + @Conditional(value = "hasFillFlag", revert = true) + public RGBA endColor; + + @Conditional(value = "hasFillFlag") + public MORPHFILLSTYLE fillType; + + public LINESTYLE2 getLineStyle2At(int ratio) { + LINESTYLE2 ret = new LINESTYLE2(); + ret.width = startWidth + (endWidth - startWidth) * ratio / 65535; + ret.startCapStyle = startCapStyle; + ret.joinStyle = joinStyle; + ret.hasFillFlag = hasFillFlag; + ret.noHScaleFlag = noHScaleFlag; + ret.noVScaleFlag = noVScaleFlag; + ret.pixelHintingFlag = pixelHintingFlag; + ret.noClose = noClose; + ret.endCapStyle = endCapStyle; + ret.miterLimitFactor = miterLimitFactor; + if (hasFillFlag) { + ret.fillType = fillType.getFillStyleAt(ratio); + } else { + ret.color = MORPHGRADIENT.morphColor(startColor, endColor, ratio); + } + return ret; + } + + public LINESTYLE2 getStartLineStyle2() { + LINESTYLE2 ret = new LINESTYLE2(); + ret.width = startWidth; + ret.startCapStyle = startCapStyle; + ret.joinStyle = joinStyle; + ret.hasFillFlag = hasFillFlag; + ret.noHScaleFlag = noHScaleFlag; + ret.noVScaleFlag = noVScaleFlag; + ret.pixelHintingFlag = pixelHintingFlag; + ret.noClose = noClose; + ret.endCapStyle = endCapStyle; + ret.miterLimitFactor = miterLimitFactor; + ret.color = startColor; + if (hasFillFlag) { + ret.fillType = fillType.getStartFillStyle(); + } + return ret; + } + + public LINESTYLE2 getEndLineStyle2() { + LINESTYLE2 ret = new LINESTYLE2(); + ret.width = endWidth; + ret.startCapStyle = startCapStyle; + ret.joinStyle = joinStyle; + ret.hasFillFlag = hasFillFlag; + ret.noHScaleFlag = noHScaleFlag; + ret.noVScaleFlag = noVScaleFlag; + ret.pixelHintingFlag = pixelHintingFlag; + ret.noClose = noClose; + ret.endCapStyle = endCapStyle; + ret.miterLimitFactor = miterLimitFactor; + ret.color = endColor; + if (hasFillFlag) { + ret.fillType = fillType.getEndFillStyle(); + } + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java similarity index 73% rename from src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java index f6f97688f..6703c29a4 100644 --- a/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java @@ -1,80 +1,79 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class MORPHLINESTYLEARRAY implements Serializable { - - public MORPHLINESTYLE[] lineStyles; - public MORPHLINESTYLE2[] lineStyles2; - - public LINESTYLEARRAY getLineStylesAt(int shapeNum, int ratio) { - LINESTYLEARRAY ret = new LINESTYLEARRAY(); - if (shapeNum == 1) { - ret.lineStyles = new LINESTYLE[lineStyles.length]; - for (int m = 0; m < lineStyles.length; m++) { - ret.lineStyles[m] = lineStyles[m].getLineStyleAt(ratio); - } - } - if (shapeNum == 2) { - ret.lineStyles = new LINESTYLE2[lineStyles2.length]; - for (int m = 0; m < lineStyles2.length; m++) { - ret.lineStyles[m] = lineStyles2[m].getLineStyle2At(ratio); - } - } - return ret; - } - - public LINESTYLEARRAY getStartLineStyles(int shapeNum) { - LINESTYLEARRAY ret = new LINESTYLEARRAY(); - if (shapeNum == 1) { - ret.lineStyles = new LINESTYLE[lineStyles.length]; - for (int m = 0; m < lineStyles.length; m++) { - ret.lineStyles[m] = lineStyles[m].getStartLineStyle(); - } - } - if (shapeNum == 2) { - ret.lineStyles = new LINESTYLE2[lineStyles2.length]; - for (int m = 0; m < lineStyles2.length; m++) { - ret.lineStyles[m] = lineStyles2[m].getStartLineStyle2(); - } - } - return ret; - } - - public LINESTYLEARRAY getEndLineStyles(int shapeNum) { - LINESTYLEARRAY ret = new LINESTYLEARRAY(); - if (shapeNum == 1) { - ret.lineStyles = new LINESTYLE[lineStyles.length]; - for (int m = 0; m < lineStyles.length; m++) { - ret.lineStyles[m] = lineStyles[m].getEndLineStyle(); - } - } - if (shapeNum == 2) { - ret.lineStyles = new LINESTYLE2[lineStyles2.length]; - for (int m = 0; m < lineStyles2.length; m++) { - ret.lineStyles[m] = lineStyles2[m].getEndLineStyle2(); - } - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class MORPHLINESTYLEARRAY implements Serializable { + + public MORPHLINESTYLE[] lineStyles; + public MORPHLINESTYLE2[] lineStyles2; + + public LINESTYLEARRAY getLineStylesAt(int shapeNum, int ratio) { + LINESTYLEARRAY ret = new LINESTYLEARRAY(); + if (shapeNum == 1) { + ret.lineStyles = new LINESTYLE[lineStyles.length]; + for (int m = 0; m < lineStyles.length; m++) { + ret.lineStyles[m] = lineStyles[m].getLineStyleAt(ratio); + } + } + if (shapeNum == 2) { + ret.lineStyles = new LINESTYLE2[lineStyles2.length]; + for (int m = 0; m < lineStyles2.length; m++) { + ret.lineStyles[m] = lineStyles2[m].getLineStyle2At(ratio); + } + } + return ret; + } + + public LINESTYLEARRAY getStartLineStyles(int shapeNum) { + LINESTYLEARRAY ret = new LINESTYLEARRAY(); + if (shapeNum == 1) { + ret.lineStyles = new LINESTYLE[lineStyles.length]; + for (int m = 0; m < lineStyles.length; m++) { + ret.lineStyles[m] = lineStyles[m].getStartLineStyle(); + } + } + if (shapeNum == 2) { + ret.lineStyles = new LINESTYLE2[lineStyles2.length]; + for (int m = 0; m < lineStyles2.length; m++) { + ret.lineStyles[m] = lineStyles2[m].getStartLineStyle2(); + } + } + return ret; + } + + public LINESTYLEARRAY getEndLineStyles(int shapeNum) { + LINESTYLEARRAY ret = new LINESTYLEARRAY(); + if (shapeNum == 1) { + ret.lineStyles = new LINESTYLE[lineStyles.length]; + for (int m = 0; m < lineStyles.length; m++) { + ret.lineStyles[m] = lineStyles[m].getEndLineStyle(); + } + } + if (shapeNum == 2) { + ret.lineStyles = new LINESTYLE2[lineStyles2.length]; + for (int m = 0; m < lineStyles2.length; m++) { + ret.lineStyles[m] = lineStyles2[m].getEndLineStyle2(); + } + } + return ret; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX15.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX15.java new file mode 100644 index 000000000..f57b47e83 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX15.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Represents 15-bit red, green and blue value + * + * @author JPEXS + */ +public class PIX15 implements Serializable { + + /** + * Red color value + */ + @SWFType(value = BasicType.UB, count = 5) + public int red; + /** + * Green color value + */ + @SWFType(value = BasicType.UB, count = 5) + public int green; + /** + * Blue color value + */ + @SWFType(value = BasicType.UB, count = 5) + public int blue; +} diff --git a/src/com/jpexs/decompiler/flash/types/PIX24.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX24.java similarity index 51% rename from src/com/jpexs/decompiler/flash/types/PIX24.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX24.java index c980aa857..81eb943d6 100644 --- a/src/com/jpexs/decompiler/flash/types/PIX24.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/PIX24.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Represents 15-bit red, green and blue value - * - * @author JPEXS - */ -public class PIX24 implements Serializable { - - @SWFType(BasicType.UI8) - @Reserved - public int reserved; - /** - * Red color value - */ - @SWFType(BasicType.UI8) - public int red; - /** - * Green color value - */ - @SWFType(BasicType.UI8) - public int green; - /** - * Blue color value - */ - @SWFType(BasicType.UI8) - public int blue; - - @Override - public String toString() { - return "[PIX24 red:" + red + ", green:" + green + ", blue:" + blue + "]"; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Represents 15-bit red, green and blue value + * + * @author JPEXS + */ +public class PIX24 implements Serializable { + + @SWFType(BasicType.UI8) + @Reserved + public int reserved; + /** + * Red color value + */ + @SWFType(BasicType.UI8) + public int red; + /** + * Green color value + */ + @SWFType(BasicType.UI8) + public int green; + /** + * Blue color value + */ + @SWFType(BasicType.UI8) + public int blue; + + @Override + public String toString() { + return "[PIX24 red:" + red + ", green:" + green + ", blue:" + blue + "]"; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/RECT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RECT.java similarity index 69% rename from src/com/jpexs/decompiler/flash/types/RECT.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RECT.java index ed1bf8b77..f203ae571 100644 --- a/src/com/jpexs/decompiler/flash/types/RECT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RECT.java @@ -1,96 +1,95 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.awt.Point; -import java.io.Serializable; - -/** - * A rectangle value represents a rectangular region. - * - * @author JPEXS - */ -public class RECT implements Serializable { - - /** - * X minimum position for rectangle in twips - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int Xmin; - - /** - * X maximum position for rectangle in twips - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int Xmax; - - /** - * Y minimum position for rectangle in twips - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int Ymin; - - /** - * Y maximum position for rectangle in twips - */ - @SWFType(value = BasicType.SB, countField = "nbits") - public int Ymax; - - @Calculated - @SWFType(value = BasicType.UB, count = 5) - public int nbits; - - public RECT(int Xmin, int Xmax, int Ymin, int Ymax) { - this.Xmin = Xmin; - this.Xmax = Xmax; - this.Ymin = Ymin; - this.Ymax = Ymax; - } - - public RECT() { - } - - public RECT(RECT r) { - Xmin = r.Xmin; - Xmax = r.Xmax; - Ymin = r.Ymin; - Ymax = r.Ymax; - } - - @Override - public String toString() { - return "[RECT x=" + Xmin + " to " + Xmax + ", y=" + Ymin + " to " + Ymax + "]"; - } - - public int getWidth() { - return (Xmax - Xmin) < 0 ? 0 : Xmax - Xmin; - } - - public int getHeight() { - return (Ymax - Ymin) < 0 ? 0 : Ymax - Ymin; - } - - public Point getTopLeft() { - return new Point(Xmin, Ymin); - } - - public Point getBottomRight() { - return new Point(Xmax, Ymax); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.awt.Point; +import java.io.Serializable; + +/** + * A rectangle value represents a rectangular region. + * + * @author JPEXS + */ +public class RECT implements Serializable { + + /** + * X minimum position for rectangle in twips + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int Xmin; + + /** + * X maximum position for rectangle in twips + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int Xmax; + + /** + * Y minimum position for rectangle in twips + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int Ymin; + + /** + * Y maximum position for rectangle in twips + */ + @SWFType(value = BasicType.SB, countField = "nbits") + public int Ymax; + + @Calculated + @SWFType(value = BasicType.UB, count = 5) + public int nbits; + + public RECT(int Xmin, int Xmax, int Ymin, int Ymax) { + this.Xmin = Xmin; + this.Xmax = Xmax; + this.Ymin = Ymin; + this.Ymax = Ymax; + } + + public RECT() { + } + + public RECT(RECT r) { + Xmin = r.Xmin; + Xmax = r.Xmax; + Ymin = r.Ymin; + Ymax = r.Ymax; + } + + @Override + public String toString() { + return "[RECT x=" + Xmin + " to " + Xmax + ", y=" + Ymin + " to " + Ymax + "]"; + } + + public int getWidth() { + return (Xmax - Xmin) < 0 ? 0 : Xmax - Xmin; + } + + public int getHeight() { + return (Ymax - Ymin) < 0 ? 0 : Ymax - Ymin; + } + + public Point getTopLeft() { + return new Point(Xmin, Ymin); + } + + public Point getBottomRight() { + return new Point(Xmax, Ymax); + } +} diff --git a/src/com/jpexs/decompiler/flash/types/RGB.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGB.java similarity index 71% rename from src/com/jpexs/decompiler/flash/types/RGB.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGB.java index 0454137be..fa68b61cd 100644 --- a/src/com/jpexs/decompiler/flash/types/RGB.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGB.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.configuration.Configuration; diff --git a/src/com/jpexs/decompiler/flash/types/RGBA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGBA.java similarity index 71% rename from src/com/jpexs/decompiler/flash/types/RGBA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGBA.java index 2dd93bc39..cfda4bfd8 100644 --- a/src/com/jpexs/decompiler/flash/types/RGBA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/RGBA.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.configuration.Configuration; diff --git a/src/com/jpexs/decompiler/flash/types/SHAPE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java similarity index 68% rename from src/com/jpexs/decompiler/flash/types/SHAPE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java index bcfacb99f..54e3f54a0 100644 --- a/src/com/jpexs/decompiler/flash/types/SHAPE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.exporters.shape.PathExporter; diff --git a/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java similarity index 60% rename from src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java index 135ae8c1f..79d24d392 100644 --- a/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java new file mode 100644 index 000000000..e82bb6608 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class SOUNDENVELOPE implements Serializable { + + @SWFType(BasicType.UI32) + public long pos44; + @SWFType(BasicType.UI16) + public int leftLevel; + @SWFType(BasicType.UI16) + public int rightLevel; +} diff --git a/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java similarity index 57% rename from src/com/jpexs/decompiler/flash/types/SOUNDINFO.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java index 9ef3d893b..bb493c487 100644 --- a/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java @@ -1,54 +1,53 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class SOUNDINFO implements Serializable { - - @Reserved - @SWFType(value = BasicType.UB, count = 2) - public int reserved; - public boolean syncStop; - public boolean syncNoMultiple; - public boolean hasEnvelope; - public boolean hasLoops; - public boolean hasOutPoint; - public boolean hasInPoint; - - @Conditional("hasInPoint") - @SWFType(BasicType.UI32) - public long inPoint; - - @Conditional("hasOutPoint") - @SWFType(BasicType.UI32) - public long outPoint; - - @Conditional("hasLoops") - @SWFType(BasicType.UI16) - public int loopCount; - - @Conditional("hasEnvelope") - public SOUNDENVELOPE[] envelopeRecords = new SOUNDENVELOPE[0]; -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class SOUNDINFO implements Serializable { + + @Reserved + @SWFType(value = BasicType.UB, count = 2) + public int reserved; + public boolean syncStop; + public boolean syncNoMultiple; + public boolean hasEnvelope; + public boolean hasLoops; + public boolean hasOutPoint; + public boolean hasInPoint; + + @Conditional("hasInPoint") + @SWFType(BasicType.UI32) + public long inPoint; + + @Conditional("hasOutPoint") + @SWFType(BasicType.UI32) + public long outPoint; + + @Conditional("hasLoops") + @SWFType(BasicType.UI16) + public int loopCount; + + @Conditional("hasEnvelope") + public SOUNDENVELOPE[] envelopeRecords = new SOUNDENVELOPE[0]; +} diff --git a/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java similarity index 67% rename from src/com/jpexs/decompiler/flash/types/TEXTRECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java index 5dc612d71..f644244ff 100644 --- a/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java @@ -1,70 +1,69 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.tags.DefineText2Tag; -import com.jpexs.decompiler.flash.tags.DefineTextTag; -import com.jpexs.decompiler.flash.tags.base.FontTag; -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.SWFArray; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class TEXTRECORD implements Serializable { - - public boolean styleFlagsHasFont; - public boolean styleFlagsHasColor; - public boolean styleFlagsHasYOffset; - public boolean styleFlagsHasXOffset; - - @Conditional("styleFlagsHasFont") - @SWFType(BasicType.UI16) - public int fontId; - - @Conditional(value = "styleFlagsHasColor", tags = {DefineTextTag.ID}) - public RGB textColor; - - @Conditional(value = "styleFlagsHasColor", tags = {DefineText2Tag.ID}) - public RGBA textColorA; - - @Conditional("styleFlagsHasXOffset") - @SWFType(BasicType.SI16) - public int xOffset; - - @Conditional("styleFlagsHasYOffset") - @SWFType(BasicType.SI16) - public int yOffset; - - @Conditional("styleFlagsHasFont") - @SWFType(BasicType.UI16) - public int textHeight; - - @SWFArray(countField = "glyphCount") - public GLYPHENTRY[] glyphEntries; - - public String getText(FontTag font) { - String ret = ""; - for (GLYPHENTRY ge : glyphEntries) { - ret += font.glyphToChar(ge.glyphIndex); - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.tags.DefineText2Tag; +import com.jpexs.decompiler.flash.tags.DefineTextTag; +import com.jpexs.decompiler.flash.tags.base.FontTag; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFArray; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class TEXTRECORD implements Serializable { + + public boolean styleFlagsHasFont; + public boolean styleFlagsHasColor; + public boolean styleFlagsHasYOffset; + public boolean styleFlagsHasXOffset; + + @Conditional("styleFlagsHasFont") + @SWFType(BasicType.UI16) + public int fontId; + + @Conditional(value = "styleFlagsHasColor", tags = {DefineTextTag.ID}) + public RGB textColor; + + @Conditional(value = "styleFlagsHasColor", tags = {DefineText2Tag.ID}) + public RGBA textColorA; + + @Conditional("styleFlagsHasXOffset") + @SWFType(BasicType.SI16) + public int xOffset; + + @Conditional("styleFlagsHasYOffset") + @SWFType(BasicType.SI16) + public int yOffset; + + @Conditional("styleFlagsHasFont") + @SWFType(BasicType.UI16) + public int textHeight; + + @SWFArray(countField = "glyphCount") + public GLYPHENTRY[] glyphEntries; + + public String getText(FontTag font) { + String ret = ""; + for (GLYPHENTRY ge : glyphEntries) { + ret += font.glyphToChar(ge.glyphIndex); + } + return ret; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONEDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONEDATA.java new file mode 100644 index 000000000..4e88950f0 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONEDATA.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class ZONEDATA implements Serializable { + + @SWFType(BasicType.FLOAT16) + public int alignmentCoordinate; + @SWFType(BasicType.FLOAT16) + public int range; + + @Override + public String toString() { + return "[ZONEDATA alignmentCoordinate=" + alignmentCoordinate + ", range=" + range + "]"; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/ZONERECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONERECORD.java similarity index 51% rename from src/com/jpexs/decompiler/flash/types/ZONERECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONERECORD.java index 11eacf070..72f368038 100644 --- a/src/com/jpexs/decompiler/flash/types/ZONERECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/ZONERECORD.java @@ -1,45 +1,44 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFArray; -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class ZONERECORD implements Serializable { - - @SWFArray(value = "zone", countField = "numZoneData") - public ZONEDATA[] zonedata = new ZONEDATA[0]; - public boolean zoneMaskX; - public boolean zoneMaskY; - - @Override - public String toString() { - String ret = "[ZONERECORD data:"; - for (int i = 0; i < zonedata.length; i++) { - if (i > 0) { - ret += ", "; - } - ret += zonedata[i]; - } - return ret + ", zoneMaskX:" + zoneMaskX + ", zoneMaskY:" + zoneMaskY + "]"; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types; + +import com.jpexs.decompiler.flash.types.annotations.SWFArray; +import java.io.Serializable; + +/** + * Represents 32-bit alpha, red, green and blue value + * + * @author JPEXS + */ +public class ZONERECORD implements Serializable { + + @SWFArray(value = "zone", countField = "numZoneData") + public ZONEDATA[] zonedata = new ZONEDATA[0]; + public boolean zoneMaskX; + public boolean zoneMaskY; + + @Override + public String toString() { + String ret = "[ZONERECORD data:"; + for (int i = 0; i < zonedata.length; i++) { + if (i > 0) { + ret += ", "; + } + ret += zonedata[i]; + } + return ret + ", zoneMaskX:" + zoneMaskX + ", zoneMaskY:" + zoneMaskY + "]"; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java new file mode 100644 index 000000000..3992ebd30 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Field is internal + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Calculated { + +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Conditional.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Conditional.java similarity index 63% rename from src/com/jpexs/decompiler/flash/types/annotations/Conditional.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Conditional.java index b0a6e1330..cf377e6cb 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/Conditional.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Conditional.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Mark for field that it is available only whern certain field (value) is set - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Conditional { - - ///Name of field on which this depends - String[] value() default {}; - - ///Tag IDs which this field must be in - int[] tags() default {}; - - ///Minimum SWF version for this field - int minSwfVersion() default 1; - - ///Maximum SWF version for this field - int maxSwfVersion() default Integer.MAX_VALUE; - - ///List of values for condition (if true/false is not enough) - int[] options() default {}; - - ///Revert condition (if false...) - boolean revert() default false; -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Mark for field that it is available only whern certain field (value) is set + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Conditional { + + ///Name of field on which this depends + String[] value() default {}; + + ///Tag IDs which this field must be in + int[] tags() default {}; + + ///Minimum SWF version for this field + int minSwfVersion() default 1; + + ///Maximum SWF version for this field + int maxSwfVersion() default Integer.MAX_VALUE; + + ///List of values for condition (if true/false is not enough) + int[] options() default {}; + + ///Revert condition (if false...) + boolean revert() default false; +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java similarity index 65% rename from src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java index 767ef0247..bfa0a0a4d 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/ConditionalType.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Mark for field that its type is different whern certain field (value) is set - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConditionalType { - - ///Name of field on which this depends - String[] value() default {}; - - ///Tag IDs which this field must be in - int[] tags() default {}; - - ///Minimum SWF version for this field - int minSwfVersion() default 1; - - ///Maximum SWF version for this field - int maxSwfVersion() default Integer.MAX_VALUE; - - ///List of values for condition (if true/false is not enough) - int[] options() default {}; - - ///Revert condition (if false...) - boolean revert() default false; - - ///Field type when condition is met - Class type(); -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Mark for field that its type is different whern certain field (value) is set + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConditionalType { + + ///Name of field on which this depends + String[] value() default {}; + + ///Tag IDs which this field must be in + int[] tags() default {}; + + ///Minimum SWF version for this field + int minSwfVersion() default 1; + + ///Maximum SWF version for this field + int maxSwfVersion() default Integer.MAX_VALUE; + + ///List of values for condition (if true/false is not enough) + int[] options() default {}; + + ///Revert condition (if false...) + boolean revert() default false; + + ///Field type when condition is met + Class type(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Internal.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Internal.java new file mode 100644 index 000000000..58ef61992 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Internal.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Field is internal + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Internal { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java new file mode 100644 index 000000000..77d6756a9 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +/** + * The String field can have large multiline text + * + * @author JPEXS + */ +public @interface Multiline { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Optional.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Optional.java new file mode 100644 index 000000000..ef83ff3cf --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Optional.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The field is optional anc can be unset + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Optional { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java new file mode 100644 index 000000000..105a9e6e3 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Field is reserved + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Reserved { +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java similarity index 54% rename from src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java index d353e20b1..fd69dc9bd 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFArray.java @@ -1,41 +1,40 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Marks array and list fields - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface SWFArray { - - /// Name of one item - String value() default ""; - - /// Number of items in array - int count() default -1; - - /// Field which means number of items in array - String countField() default ""; -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Marks array and list fields + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface SWFArray { + + /// Name of one item + String value() default ""; + + /// Number of items in array + int count() default -1; + + /// Field which means number of items in array + String countField() default ""; +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/SWFType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFType.java similarity index 64% rename from src/com/jpexs/decompiler/flash/types/annotations/SWFType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFType.java index 948136e6c..6597babcd 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/SWFType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/SWFType.java @@ -1,51 +1,50 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import com.jpexs.decompiler.flash.types.BasicType; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Maps basic java types (int,float,double) to SWF types (UI8,UI16...FLOAT) - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface SWFType { - - /// Type of value - BasicType value() default BasicType.OTHER; - - /// Alternate type when condition is met - BasicType alternateValue() default BasicType.NONE; - - /// Condition for alternate type - String alternateCondition() default ""; - - /// Count - used primarily for bit fields UB,SB,FB to specify number of bits - int count() default -1; - - /// Field name on which Count depends - String countField() default ""; - - //Count to add to countField - int countAdd() default 0; -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations; + +import com.jpexs.decompiler.flash.types.BasicType; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Maps basic java types (int,float,double) to SWF types (UI8,UI16...FLOAT) + * + * @author JPEXS + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface SWFType { + + /// Type of value + BasicType value() default BasicType.OTHER; + + /// Alternate type when condition is met + BasicType alternateValue() default BasicType.NONE; + + /// Condition for alternate type + String alternateCondition() default ""; + + /// Count - used primarily for bit fields UB,SB,FB to specify number of bits + int count() default -1; + + /// Field name on which Count depends + String countField() default ""; + + //Count to add to countField + int countAdd() default 0; +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java similarity index 85% rename from src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java index b5473cb23..7d664cbb0 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionEvaluator.java @@ -1,143 +1,142 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import java.io.IOException; -import java.io.StringReader; -import java.util.EmptyStackException; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.Stack; - -/** - * - * @author JPEXS - */ -public class ConditionEvaluator { - - private final Conditional cond; - - public ConditionEvaluator(Conditional cond) { - this.cond = cond; - } - - private void expressionRest(Map fields, Stack stack, ConditionLexer lex) throws IOException, ParseException { - ConditionToken tok = lex.lex(); - if (tok == null) { - return; - } - switch (tok.type) { - case AND: - Boolean andOp1 = stack.pop(); - expression(fields, stack, lex); - Boolean andOp2 = stack.pop(); - stack.push(andOp1 && andOp2); - break; - case OR: - Boolean orOp1 = stack.pop(); - expression(fields, stack, lex); - Boolean orOp2 = stack.pop(); - stack.push(orOp1 || orOp2); - break; - default: - lex.pushback(tok); - } - - } - - private void expression(Map fields, Stack stack, ConditionLexer lex) throws IOException, ParseException { - ConditionToken tok = lex.lex(); - if (tok == null) { - return; - } - switch (tok.type) { - case FIELD: - if (!fields.containsKey(tok.value)) { - throw new ParseException("Field not found", lex.yyline()); - } else { - stack.push(fields.get(tok.value)); - } - expressionRest(fields, stack, lex); - break; - case NOT: - expression(fields, stack, lex); - Boolean invOp = stack.pop(); - stack.push(!invOp); - break; - case PARENT_OPEN: - expression(fields, stack, lex); - tok = lex.lex(); - if (tok.type != ConditionTokenType.PARENT_CLOSE) { - throw new ParseException("End of parent expected", lex.yyline()); - } - expressionRest(fields, stack, lex); - break; - default: - throw new ParseException("Expression expected", lex.yyline()); - } - } - - public boolean eval(Map fields) throws ParseException { - ConditionLexer lex = new ConditionLexer(new StringReader(prepareCond())); - - Stack stack = new Stack<>(); - - try { - expression(fields, stack, lex); - } catch (IOException | EmptyStackException ex) { - throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); - } - if (prepareCond().isEmpty()) { - return true; - } - if (stack.size() != 1) { - throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); - } - - return stack.pop(); - } - - private String prepareCond() { - String vals[] = cond.value(); - if (vals == null || vals.length == 0) { - return ""; - } - String val = vals[0]; - for (int i = 1; i < vals.length; i++) { - val = val + "," + vals[i]; - } - return val; - } - - public Set getFields() throws ParseException { - Set ret = new HashSet<>(); - ConditionLexer lex = new ConditionLexer(new StringReader(prepareCond())); - ConditionToken tok; - try { - while ((tok = lex.lex()) != null) { - if (tok.type == ConditionTokenType.FIELD) { - ret.add(tok.value); - } - } - } catch (IOException ex) { - throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); - } - return ret; - } -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import java.io.IOException; +import java.io.StringReader; +import java.util.EmptyStackException; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.Stack; + +/** + * + * @author JPEXS + */ +public class ConditionEvaluator { + + private final Conditional cond; + + public ConditionEvaluator(Conditional cond) { + this.cond = cond; + } + + private void expressionRest(Map fields, Stack stack, ConditionLexer lex) throws IOException, ParseException { + ConditionToken tok = lex.lex(); + if (tok == null) { + return; + } + switch (tok.type) { + case AND: + Boolean andOp1 = stack.pop(); + expression(fields, stack, lex); + Boolean andOp2 = stack.pop(); + stack.push(andOp1 && andOp2); + break; + case OR: + Boolean orOp1 = stack.pop(); + expression(fields, stack, lex); + Boolean orOp2 = stack.pop(); + stack.push(orOp1 || orOp2); + break; + default: + lex.pushback(tok); + } + + } + + private void expression(Map fields, Stack stack, ConditionLexer lex) throws IOException, ParseException { + ConditionToken tok = lex.lex(); + if (tok == null) { + return; + } + switch (tok.type) { + case FIELD: + if (!fields.containsKey(tok.value)) { + throw new ParseException("Field not found", lex.yyline()); + } else { + stack.push(fields.get(tok.value)); + } + expressionRest(fields, stack, lex); + break; + case NOT: + expression(fields, stack, lex); + Boolean invOp = stack.pop(); + stack.push(!invOp); + break; + case PARENT_OPEN: + expression(fields, stack, lex); + tok = lex.lex(); + if (tok.type != ConditionTokenType.PARENT_CLOSE) { + throw new ParseException("End of parent expected", lex.yyline()); + } + expressionRest(fields, stack, lex); + break; + default: + throw new ParseException("Expression expected", lex.yyline()); + } + } + + public boolean eval(Map fields) throws ParseException { + ConditionLexer lex = new ConditionLexer(new StringReader(prepareCond())); + + Stack stack = new Stack<>(); + + try { + expression(fields, stack, lex); + } catch (IOException | EmptyStackException ex) { + throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); + } + if (prepareCond().isEmpty()) { + return true; + } + if (stack.size() != 1) { + throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); + } + + return stack.pop(); + } + + private String prepareCond() { + String vals[] = cond.value(); + if (vals == null || vals.length == 0) { + return ""; + } + String val = vals[0]; + for (int i = 1; i < vals.length; i++) { + val = val + "," + vals[i]; + } + return val; + } + + public Set getFields() throws ParseException { + Set ret = new HashSet<>(); + ConditionLexer lex = new ConditionLexer(new StringReader(prepareCond())); + ConditionToken tok; + try { + while ((tok = lex.lex()) != null) { + if (tok.type == ConditionTokenType.FIELD) { + ret.add(tok.value); + } + } + } catch (IOException ex) { + throw new ParseException("Invalid condition:" + prepareCond(), lex.yyline()); + } + return ret; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java similarity index 94% rename from src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java index 3461658c7..362d6b7bc 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java @@ -1,736 +1,733 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT */ - -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -import java.util.Stack; - -/** - * This class is a scanner generated by - * JFlex 1.5.0-SNAPSHOT from the - * specification file - * D:/Dropbox/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex - */ -public final class ConditionLexer { - - /** - * This character denotes the end of file - */ - public static final int YYEOF = -1; - - /** - * initial size of the lookahead buffer - */ - private static final int ZZ_BUFFERSIZE = 16384; - - /** - * lexical states - */ - public static final int YYINITIAL = 0; - - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the - * beginning of a line l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0 - }; - - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED - = "\12\0\1\10\1\10\1\10\1\10\23\0\1\5\4\0\1\3\1\0" - + "\1\6\1\7\2\0\1\4\1\0\1\1\1\0\12\1\7\0\32\1" - + "\4\0\1\1\1\0\32\1\1\0\1\2\10\0\1\10\u1fa2\0\1\10" - + "\1\10\udfd6\0"; - - /** - * Translates characters to character classes - */ - private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - - /** - * Translates DFA states to action switch labels. - */ - private static final int[] ZZ_ACTION = zzUnpackAction(); - - private static final String ZZ_ACTION_PACKED_0 - = "\1\0\1\1\1\2\1\3\2\4\1\5\1\6\1\7" - + "\1\3"; - - private static int[] zzUnpackAction() { - int[] result = new int[10]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - /** - * Translates a state to a row index in the transition table - */ - private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 - = "\0\0\0\11\0\22\0\33\0\44\0\11\0\11\0\11" - + "\0\11\0\11"; - - private static int[] zzUnpackRowMap() { - int[] result = new int[10]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); - } - return j; - } - - /** - * The transition table of the DFA - */ - private static final int[] ZZ_TRANS = zzUnpackTrans(); - - private static final String ZZ_TRANS_PACKED_0 - = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11" - + "\13\0\1\3\11\0\1\12\11\0\1\6\5\0"; - - private static int[] zzUnpackTrans() { - int[] result = new int[45]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 - = "\1\0\1\11\3\1\5\11"; - - private static int[] zzUnpackAttribute() { - int[] result = new int[10]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int[] result) { - int i = 0; /* index in packed string */ - - int j = offset; /* index in unpacked array */ - - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do { - result[j++] = value; - } while (--count > 0); - } - return j; - } - - /** - * the input device - */ - private java.io.Reader zzReader; - - /** - * the current state of the DFA - */ - private int zzState; - - /** - * the current lexical state - */ - private int zzLexicalState = YYINITIAL; - - /** - * this buffer contains the current text to be matched and is the source of - * the yytext() string - */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - - /** - * the textposition at the last accepting state - */ - private int zzMarkedPos; - - /** - * the current text position in the buffer - */ - private int zzCurrentPos; - - /** - * startRead marks the beginning of the yytext() string in the buffer - */ - private int zzStartRead; - - /** - * endRead marks the last character in the buffer, that has been read from - * input - */ - private int zzEndRead; - - /** - * number of newlines encountered up to the start of the matched text - */ - private int yyline; - - /** - * the number of characters up to the start of the matched text - */ - private int yychar; - - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; - - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; - - /** - * zzAtEOF == true <=> the scanner is at the EOF - */ - private boolean zzAtEOF; - - /** - * denotes if the user-EOF-code has already been executed - */ - private boolean zzEOFDone; - - /* user code: */ - /** - * Create an empty lexer, yyrset will be called later to reset and assign - * the reader - */ - public ConditionLexer() { - - } - - public int yychar() { - return yychar; - } - - public int yyline() { - return yyline + 1; - } - - private final Stack pushedBack = new Stack<>(); - - public void pushback(ConditionToken symb) { - pushedBack.push(symb); - } - - public ConditionToken lex() throws java.io.IOException, ParseException { - ConditionToken ret = null; - if (!pushedBack.isEmpty()) { - ret = pushedBack.pop(); - } else { - ret = yylex(); - } - return ret; - } - - /** - * Creates a new scanner There is also a java.io.InputStream version of this - * constructor. - * - * @param in the java.io.Reader to read input from. - */ - public ConditionLexer(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. There is also java.io.Reader version of this - * constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public ConditionLexer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in, java.nio.charset.Charset.forName("UTF-8"))); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char[] zzUnpackCMap(String packed) { - char[] map = new char[0x10000]; - int i = 0; /* index in packed string */ - - int j = 0; /* index in unpacked array */ - - while (i < 64) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do { - map[j++] = value; - } while (--count > 0); - } - return map; - } - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead - zzStartRead); - - /* translate stored positions */ - zzEndRead -= zzStartRead; - zzCurrentPos -= zzStartRead; - zzMarkedPos -= zzStartRead; - zzStartRead = 0; - } - - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos * 2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; - } - - /* finally: fill the buffer with new input */ - int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length - zzEndRead); - - if (numRead > 0) { - zzEndRead += numRead; - return false; - } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { - int c = zzReader.read(); - if (c == -1) { - return true; - } else { - zzBuffer[zzEndRead++] = (char) c; - return false; - } - } - - // numRead < 0 - return true; - } - - /** - * Closes the input stream. - * - * @throws java.io.IOException - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - - zzEndRead = zzStartRead; /* invalidate buffer */ - - if (zzReader != null) { - zzReader.close(); - } - } - - /** - * Resets the scanner to read from a new input stream. Does not close the - * old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). Lexical - * state is set to ZZ_INITIAL. - * - * Internal scan buffer is resized down to its initial length, if it has - * grown. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - if (zzBuffer.length > ZZ_BUFFERSIZE) { - zzBuffer = new char[ZZ_BUFFERSIZE]; - } - } - - /** - * Returns the current lexical state. - * - * @return - */ - public final int yystate() { - return zzLexicalState; - } - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - /** - * Returns the text matched by the current regular expression. - * - * @return - */ - public final String yytext() { - return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); - } - - /** - * Returns the character at position pos from the matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. A value from 0 to - * yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead + pos]; - } - - /** - * Returns the length of the matched text region. - * - * @return - */ - public final int yylength() { - return zzMarkedPos - zzStartRead; - } - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of yypushback(int) and - * a match-all fallback rule) this method will only be called with things - * that "Can't Possibly Happen". If this method is called, something is - * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done in error - * fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. This number must - * not be greater than yylength()! - */ - public void yypushback(int number) { - if (number > yylength()) { - zzScanError(ZZ_PUSHBACK_2BIG); - } - - zzMarkedPos -= number; - } - - /** - * Resumes scanning until the next regular expression is matched, the end of - * input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - * @throws - * com.jpexs.decompiler.flash.types.annotations.parser.ParseException - */ - public ConditionToken yylex() throws java.io.IOException, ParseException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char[] zzBufferL = zzBuffer; - char[] zzCMapL = ZZ_CMAP; - - int[] zzTransL = ZZ_TRANS; - int[] zzRowMapL = ZZ_ROWMAP; - int[] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar += zzMarkedPosL - zzStartRead; - - boolean zzR = false; - for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; - zzCurrentPosL++) { - switch (zzBufferL[zzCurrentPosL]) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) { - zzR = false; - } else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn++; - } - } - - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } else if (zzAtEOF) { - zzPeek = false; - } else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) { - zzPeek = false; - } else { - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - } - } - if (zzPeek) { - yyline--; - } - } - zzAction = -1; - - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; - - // set up zzAction for empty match case: - int zzAttributes = zzAttrL[zzState]; - if ((zzAttributes & 1) == 1) { - zzAction = zzState; - } - - zzForAction: - { - while (true) { - - if (zzCurrentPosL < zzEndReadL) { - zzInput = zzBufferL[zzCurrentPosL++]; - } else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; - if (zzNext == -1) { - break zzForAction; - } - zzState = zzNext; - - zzAttributes = zzAttrL[zzState]; - if ((zzAttributes & 1) == 1) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ((zzAttributes & 8) == 8) { - break zzForAction; - } - } - - } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 1: { - } - case 8: - break; - case 2: { - return new ConditionToken(ConditionTokenType.FIELD, yytext()); - } - case 9: - break; - case 3: { - return new ConditionToken(ConditionTokenType.OR, yytext()); - } - case 10: - break; - case 4: { - return new ConditionToken(ConditionTokenType.AND, yytext()); - } - case 11: - break; - case 5: { - return new ConditionToken(ConditionTokenType.NOT, yytext()); - } - case 12: - break; - case 6: { - return new ConditionToken(ConditionTokenType.PARENT_OPEN, yytext()); - } - case 13: - break; - case 7: { - return new ConditionToken(ConditionTokenType.PARENT_CLOSE, yytext()); - } - case 14: - break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - switch (zzLexicalState) { - case YYINITIAL: { - return null; - } - case 11: - break; - default: - return null; - } - } else { - zzScanError(ZZ_NO_MATCH); - } - } - } - } - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +import java.util.Stack; + +/** + * This class is a scanner generated by + * JFlex 1.5.0-SNAPSHOT from the + * specification file + * D:/Dropbox/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex + */ +public final class ConditionLexer { + + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** + * lexical states + */ + public static final int YYINITIAL = 0; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0 + }; + + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\12\0\1\10\1\10\1\10\1\10\23\0\1\5\4\0\1\3\1\0" + + "\1\6\1\7\2\0\1\4\1\0\1\1\1\0\12\1\7\0\32\1" + + "\4\0\1\1\1\0\32\1\1\0\1\2\10\0\1\10\u1fa2\0\1\10" + + "\1\10\udfd6\0"; + + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 + = "\1\0\1\1\1\2\1\3\2\4\1\5\1\6\1\7" + + "\1\3"; + + private static int[] zzUnpackAction() { + int[] result = new int[10]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\11\0\22\0\33\0\44\0\11\0\11\0\11" + + "\0\11\0\11"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[10]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 + = "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11" + + "\13\0\1\3\11\0\1\12\11\0\1\6\5\0"; + + private static int[] zzUnpackTrans() { + int[] result = new int[45]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\1\0\1\11\3\1\5\11"; + + private static int[] zzUnpackAttribute() { + int[] result = new int[10]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + + /** + * the input device + */ + private java.io.Reader zzReader; + + /** + * the current state of the DFA + */ + private int zzState; + + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + /** + * Create an empty lexer, yyrset will be called later to reset and assign + * the reader + */ + public ConditionLexer() { + + } + + public int yychar() { + return yychar; + } + + public int yyline() { + return yyline + 1; + } + + private final Stack pushedBack = new Stack<>(); + + public void pushback(ConditionToken symb) { + pushedBack.push(symb); + } + + public ConditionToken lex() throws java.io.IOException, ParseException { + ConditionToken ret = null; + if (!pushedBack.isEmpty()) { + ret = pushedBack.pop(); + } else { + ret = yylex(); + } + return ret; + } + + /** + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. + * + * @param in the java.io.Reader to read input from. + */ + public ConditionLexer(java.io.Reader in) { + this.zzReader = in; + } + + /** + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public ConditionLexer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in, java.nio.charset.Charset.forName("UTF-8"))); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ + + int j = 0; /* index in unpacked array */ + + while (i < 64) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); + } + return map; + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + + /* first: make room (if you can) */ + if (zzStartRead > 0) { + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); + + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[zzCurrentPos * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + } + + /* finally: fill the buffer with new input */ + int numRead = zzReader.read(zzBuffer, zzEndRead, + zzBuffer.length - zzEndRead); + + if (numRead > 0) { + zzEndRead += numRead; + return false; + } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 + return true; + } + + /** + * Closes the input stream. + * + * @throws java.io.IOException + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + + zzEndRead = zzStartRead; /* invalidate buffer */ + + if (zzReader != null) { + zzReader.close(); + } + } + + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. + * + * Internal scan buffer is resized down to its initial length, if it has + * grown. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + if (zzBuffer.length > ZZ_BUFFERSIZE) { + zzBuffer = new char[ZZ_BUFFERSIZE]; + } + } + + /** + * Returns the current lexical state. + * + * @return + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + /** + * Returns the text matched by the current regular expression. + * + * @return + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } + + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } + + /** + * Returns the length of the matched text region. + * + * @return + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } + + zzMarkedPos -= number; + } + + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + * @throws + * com.jpexs.decompiler.flash.types.annotations.parser.ParseException + */ + public ConditionToken yylex() throws java.io.IOException, ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + yychar += zzMarkedPosL - zzStartRead; + + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL[zzCurrentPosL]) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + // set up zzAction for empty match case: + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + } + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = zzBufferL[zzCurrentPosL++]; + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = zzBufferL[zzCurrentPosL++]; + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 1: { + } + case 8: + break; + case 2: { + return new ConditionToken(ConditionTokenType.FIELD, yytext()); + } + case 9: + break; + case 3: { + return new ConditionToken(ConditionTokenType.OR, yytext()); + } + case 10: + break; + case 4: { + return new ConditionToken(ConditionTokenType.AND, yytext()); + } + case 11: + break; + case 5: { + return new ConditionToken(ConditionTokenType.NOT, yytext()); + } + case 12: + break; + case 6: { + return new ConditionToken(ConditionTokenType.PARENT_OPEN, yytext()); + } + case 13: + break; + case 7: { + return new ConditionToken(ConditionTokenType.PARENT_CLOSE, yytext()); + } + case 14: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + switch (zzLexicalState) { + case YYINITIAL: { + return null; + } + case 11: + break; + default: + return null; + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java new file mode 100644 index 000000000..47f7d538b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +/** + * + * @author JPEXS + */ +public class ConditionToken { + + public String value; + public ConditionTokenType type; + + public ConditionToken(ConditionTokenType type, String value) { + this.value = value; + this.type = type; + } + + @Override + public String toString() { + return type.toString() + (value != null ? "[" + value + "]" : ""); + } + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java new file mode 100644 index 000000000..7f1c6f970 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +/** + * + * @author JPEXS + */ +public enum ConditionTokenType { + + FIELD, + OR, + AND, + PARENT_OPEN, + PARENT_CLOSE, + NOT +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java new file mode 100644 index 000000000..73abb1f1b --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +public class ParseException extends Exception { + + public long line; + public String text; + + public ParseException(String text, long line) { + super("ParseException:" + text + " on line " + line); + this.line = line; + this.text = text; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex similarity index 96% rename from src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex index 2b9d89027..e2a48e7a2 100644 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/conditions.flex @@ -1,85 +1,85 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -import java.util.Stack; - -%% - -%public -%class ConditionLexer -%final -%unicode -%char -%line -%column -%type ConditionToken -%throws ParseException - -%{ - - - /** - * Create an empty lexer, yyrset will be called later to reset and assign - * the reader - */ - public ConditionLexer() { - - } - - public int yychar() { - return yychar; - } - - public int yyline() { - return yyline+1; - } - - private Stack pushedBack=new Stack(); - - public void pushback(ConditionToken symb) { - pushedBack.push(symb); - } - - public ConditionToken lex() throws java.io.IOException, ParseException{ - ConditionToken ret=null; - if(!pushedBack.isEmpty()){ - ret = pushedBack.pop(); - }else{ - ret = yylex(); - } - return ret; - } - -%} - -Field = [A-Za-z0-9_\.]+ - -%% - - { - {Field} { - return new ConditionToken(ConditionTokenType.FIELD,yytext()); - } - "||" | "|" { return new ConditionToken(ConditionTokenType.OR,yytext()); } - "&&" | "," | "&" { return new ConditionToken(ConditionTokenType.AND,yytext()); } - "!" { return new ConditionToken(ConditionTokenType.NOT,yytext()); } - "(" { return new ConditionToken(ConditionTokenType.PARENT_OPEN,yytext()); } - ")" { return new ConditionToken(ConditionTokenType.PARENT_CLOSE,yytext()); } - . { } - <> {return null;} +/* + * Copyright (C) 2010-2014 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.types.annotations.parser; + +import java.util.Stack; + +%% + +%public +%class ConditionLexer +%final +%unicode +%char +%line +%column +%type ConditionToken +%throws ParseException + +%{ + + + /** + * Create an empty lexer, yyrset will be called later to reset and assign + * the reader + */ + public ConditionLexer() { + + } + + public int yychar() { + return yychar; + } + + public int yyline() { + return yyline+1; + } + + private Stack pushedBack=new Stack(); + + public void pushback(ConditionToken symb) { + pushedBack.push(symb); + } + + public ConditionToken lex() throws java.io.IOException, ParseException{ + ConditionToken ret=null; + if(!pushedBack.isEmpty()){ + ret = pushedBack.pop(); + }else{ + ret = yylex(); + } + return ret; + } + +%} + +Field = [A-Za-z0-9_\.]+ + +%% + + { + {Field} { + return new ConditionToken(ConditionTokenType.FIELD,yytext()); + } + "||" | "|" { return new ConditionToken(ConditionTokenType.OR,yytext()); } + "&&" | "," | "&" { return new ConditionToken(ConditionTokenType.AND,yytext()); } + "!" { return new ConditionToken(ConditionTokenType.NOT,yytext()); } + "(" { return new ConditionToken(ConditionTokenType.PARENT_OPEN,yytext()); } + ")" { return new ConditionToken(ConditionTokenType.PARENT_CLOSE,yytext()); } + . { } + <> {return null;} } \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java similarity index 76% rename from src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java index 4c0a9faf0..d980e3577 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BEVELFILTER.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; diff --git a/src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java similarity index 60% rename from src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java index f70940553..b8f8cbcff 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BLURFILTER.java @@ -1,68 +1,67 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.filters; - -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.helpers.SerializableImage; - -/** - * Blur filter based on a sub-pixel precise median filter - * - * @author JPEXS - */ -public class BLURFILTER extends FILTER { - - /** - * Horizontal blur amount - */ - @SWFType(BasicType.FIXED) - public double blurX; - /** - * Vertical blur amount - */ - @SWFType(BasicType.FIXED) - public double blurY; - /** - * Number of blur passes - */ - @SWFType(value = BasicType.UB, count = 5) - public int passes; - @Reserved - @SWFType(value = BasicType.UB, count = 3) - public int reserved; - - public BLURFILTER() { - super(1); - } - - @Override - public SerializableImage apply(SerializableImage src) { - return Filtering.blur(src, (int) blurX, (int) blurY, passes); - } - - @Override - public double getDeltaX() { - return blurX; - } - - @Override - public double getDeltaY() { - return blurY; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.filters; + +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.helpers.SerializableImage; + +/** + * Blur filter based on a sub-pixel precise median filter + * + * @author JPEXS + */ +public class BLURFILTER extends FILTER { + + /** + * Horizontal blur amount + */ + @SWFType(BasicType.FIXED) + public double blurX; + /** + * Vertical blur amount + */ + @SWFType(BasicType.FIXED) + public double blurY; + /** + * Number of blur passes + */ + @SWFType(value = BasicType.UB, count = 5) + public int passes; + @Reserved + @SWFType(value = BasicType.UB, count = 3) + public int reserved; + + public BLURFILTER() { + super(1); + } + + @Override + public SerializableImage apply(SerializableImage src) { + return Filtering.blur(src, (int) blurX, (int) blurY, passes); + } + + @Override + public double getDeltaX() { + return blurX; + } + + @Override + public double getDeltaY() { + return blurY; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java similarity index 93% rename from src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java index b13b7b2a9..1bdc3fcf8 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/BlendComposite.java @@ -1,350 +1,349 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.filters; - -import java.awt.Composite; -import java.awt.CompositeContext; -import java.awt.RenderingHints; -import java.awt.image.ColorModel; -import java.awt.image.DataBuffer; -import java.awt.image.DirectColorModel; -import java.awt.image.Raster; -import java.awt.image.RasterFormatException; -import java.awt.image.WritableRaster; - -/** - * - * @author JPEXS - */ -public final class BlendComposite implements Composite { - - public enum BlendingMode { - - LAYER, //TODO! - DARKEN, - MULTIPLY, - LIGHTEN, - SCREEN, - OVERLAY, - HARD_LIGHT, - ADD, - SUBTRACT, - DIFFERENCE, - INVERT, - ALPHA, - ERASE - } - public static final BlendComposite Alpha = new BlendComposite(BlendingMode.ALPHA); - public static final BlendComposite Erase = new BlendComposite(BlendingMode.ERASE); - public static final BlendComposite Invert = new BlendComposite(BlendingMode.INVERT); - public static final BlendComposite Multiply = new BlendComposite(BlendingMode.MULTIPLY); - public static final BlendComposite Screen = new BlendComposite(BlendingMode.SCREEN); - public static final BlendComposite Darken = new BlendComposite(BlendingMode.DARKEN); - public static final BlendComposite Lighten = new BlendComposite(BlendingMode.LIGHTEN); - public static final BlendComposite Overlay = new BlendComposite(BlendingMode.OVERLAY); - public static final BlendComposite HardLight = new BlendComposite(BlendingMode.HARD_LIGHT); - public static final BlendComposite Difference = new BlendComposite(BlendingMode.DIFFERENCE); - public static final BlendComposite Add = new BlendComposite(BlendingMode.ADD); - public static final BlendComposite Subtract = new BlendComposite(BlendingMode.SUBTRACT); - private final float alpha; - private final BlendingMode mode; - - private BlendComposite(BlendingMode mode) { - this(mode, 1.0f); - } - - private BlendComposite(BlendingMode mode, float alpha) { - this.mode = mode; - - if (alpha < 0.0f || alpha > 1.0f) { - throw new IllegalArgumentException( - "alpha must be comprised between 0.0f and 1.0f"); - } - this.alpha = alpha; - } - - public float getAlpha() { - return alpha; - } - - /** - *

- * Returns the blending mode of this composite.

- * - * @return the blending mode used by this object - */ - public BlendingMode getMode() { - return mode; - } - - /** - * {@inheritDoc} - * - * @return - */ - @Override - public int hashCode() { - return Float.floatToIntBits(alpha) * 31 + mode.ordinal(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof BlendComposite)) { - return false; - } - - BlendComposite bc = (BlendComposite) obj; - return mode == bc.mode && alpha == bc.alpha; - } - - private static boolean checkComponentsOrder(ColorModel cm) { - if (cm instanceof DirectColorModel - && cm.getTransferType() == DataBuffer.TYPE_INT) { - DirectColorModel directCM = (DirectColorModel) cm; - - return directCM.getRedMask() == 0x00FF0000 - && directCM.getGreenMask() == 0x0000FF00 - && directCM.getBlueMask() == 0x000000FF - && (directCM.getNumComponents() != 4 - || directCM.getAlphaMask() == 0xFF000000); - } - - return false; - } - - @Override - public CompositeContext createContext(ColorModel srcColorModel, - ColorModel dstColorModel, - RenderingHints hints) { - if (!checkComponentsOrder(srcColorModel) - || !checkComponentsOrder(dstColorModel)) { - throw new RasterFormatException("Incompatible color models"); - } - - return new BlendingContext(this); - } - - private static final class BlendingContext implements CompositeContext { - - private final Blender blender; - private final BlendComposite composite; - - private BlendingContext(BlendComposite composite) { - this.composite = composite; - this.blender = Blender.getBlenderFor(composite); - } - - @Override - public void dispose() { - } - - @Override - public void compose(Raster src, Raster dstIn, WritableRaster dstOut) { - int width = Math.min(src.getWidth(), dstIn.getWidth()); - int height = Math.min(src.getHeight(), dstIn.getHeight()); - - float alpha = composite.getAlpha(); - - int[] result = new int[4]; - int[] srcPixel = new int[4]; - int[] dstPixel = new int[4]; - int[] retPixel = new int[4]; - int[] srcPixels = new int[width]; - int[] dstPixels = new int[width]; - - for (int y = 0; y < height; y++) { - src.getDataElements(0, y, width, 1, srcPixels); - dstIn.getDataElements(0, y, width, 1, dstPixels); - for (int x = 0; x < width; x++) { - int pixel = srcPixels[x]; - srcPixel[0] = (pixel >> 16) & 0xFF; - srcPixel[1] = (pixel >> 8) & 0xFF; - srcPixel[2] = (pixel) & 0xFF; - srcPixel[3] = (pixel >> 24) & 0xFF; - - pixel = dstPixels[x]; - dstPixel[0] = (pixel >> 16) & 0xFF; - dstPixel[1] = (pixel >> 8) & 0xFF; - dstPixel[2] = (pixel) & 0xFF; - dstPixel[3] = (pixel >> 24) & 0xFF; - - blender.blend(srcPixel, dstPixel, result); - - retPixel[0] = ((int) (dstPixel[0] + (result[0] - dstPixel[0]) * alpha) & 0xFF); - retPixel[1] = ((int) (dstPixel[1] + (result[1] - dstPixel[1]) * alpha) & 0xFF); - retPixel[2] = (int) (dstPixel[2] + (result[2] - dstPixel[2]) * alpha) & 0xFF; - retPixel[3] = ((int) (dstPixel[3] + (result[3] - dstPixel[3]) * alpha) & 0xFF); - - float af = ((float) srcPixel[3]) / 255f; - retPixel[0] = (int) ((1f - af) * dstPixel[0] + af * retPixel[0]); - retPixel[1] = (int) ((1f - af) * dstPixel[1] + af * retPixel[1]); - retPixel[2] = (int) ((1f - af) * dstPixel[2] + af * retPixel[2]); - retPixel[3] = (int) ((1f - af) * dstPixel[3] + af * retPixel[3]); - - dstPixels[x] = (retPixel[3] << 24) - | retPixel[0] << 16 - | retPixel[1] << 8 - | retPixel[2]; - } - dstOut.setDataElements(0, y, width, 1, dstPixels); - } - } - } - - private static abstract class Blender { - - public abstract void blend(int[] src, int[] dst, int[] result); - - public static Blender getBlenderFor(BlendComposite composite) { - switch (composite.getMode()) { - case ADD: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = Math.min(255, src[0] + dst[0]); - result[1] = Math.min(255, src[1] + dst[1]); - result[2] = Math.min(255, src[2] + dst[2]); - result[3] = Math.min(255, src[3] + dst[3]); - } - }; - case INVERT: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = 255 - dst[0]; - result[1] = 255 - dst[1]; - result[2] = 255 - dst[2]; - result[3] = src[3]; - } - }; - case ALPHA: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = src[0]; - result[1] = src[1]; - result[2] = src[2]; - result[3] = dst[3]; //? - } - }; - case ERASE: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = src[0]; - result[1] = src[1]; - result[2] = src[2]; - result[3] = 255 - dst[3]; //? - } - }; - - case DARKEN: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = Math.min(src[0], dst[0]); - result[1] = Math.min(src[1], dst[1]); - result[2] = Math.min(src[2], dst[2]); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - case DIFFERENCE: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = Math.abs(dst[0] - src[0]); - result[1] = Math.abs(dst[1] - src[1]); - result[2] = Math.abs(dst[2] - src[2]); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - - case HARD_LIGHT: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = src[0] < 128 ? dst[0] * src[0] >> 7 - : 255 - ((255 - src[0]) * (255 - dst[0]) >> 7); - result[1] = src[1] < 128 ? dst[1] * src[1] >> 7 - : 255 - ((255 - src[1]) * (255 - dst[1]) >> 7); - result[2] = src[2] < 128 ? dst[2] * src[2] >> 7 - : 255 - ((255 - src[2]) * (255 - dst[2]) >> 7); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - - case LIGHTEN: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = Math.max(src[0], dst[0]); - result[1] = Math.max(src[1], dst[1]); - result[2] = Math.max(src[2], dst[2]); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - case MULTIPLY: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = (src[0] * dst[0]) >> 8; - result[1] = (src[1] * dst[1]) >> 8; - result[2] = (src[2] * dst[2]) >> 8; - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - - case OVERLAY: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = dst[0] < 128 ? dst[0] * src[0] >> 7 - : 255 - ((255 - dst[0]) * (255 - src[0]) >> 7); - result[1] = dst[1] < 128 ? dst[1] * src[1] >> 7 - : 255 - ((255 - dst[1]) * (255 - src[1]) >> 7); - result[2] = dst[2] < 128 ? dst[2] * src[2] >> 7 - : 255 - ((255 - dst[2]) * (255 - src[2]) >> 7); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - case SCREEN: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = 255 - ((255 - src[0]) * (255 - dst[0]) >> 8); - result[1] = 255 - ((255 - src[1]) * (255 - dst[1]) >> 8); - result[2] = 255 - ((255 - src[2]) * (255 - dst[2]) >> 8); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - - case SUBTRACT: - return new Blender() { - @Override - public void blend(int[] src, int[] dst, int[] result) { - result[0] = Math.max(0, src[0] + dst[0] - 256); - result[1] = Math.max(0, src[1] + dst[1] - 256); - result[2] = Math.max(0, src[2] + dst[2] - 256); - result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); - } - }; - } - throw new IllegalArgumentException("Blender not implemented for " - + composite.getMode().name()); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.filters; + +import java.awt.Composite; +import java.awt.CompositeContext; +import java.awt.RenderingHints; +import java.awt.image.ColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.DirectColorModel; +import java.awt.image.Raster; +import java.awt.image.RasterFormatException; +import java.awt.image.WritableRaster; + +/** + * + * @author JPEXS + */ +public final class BlendComposite implements Composite { + + public enum BlendingMode { + + LAYER, //TODO! + DARKEN, + MULTIPLY, + LIGHTEN, + SCREEN, + OVERLAY, + HARD_LIGHT, + ADD, + SUBTRACT, + DIFFERENCE, + INVERT, + ALPHA, + ERASE + } + public static final BlendComposite Alpha = new BlendComposite(BlendingMode.ALPHA); + public static final BlendComposite Erase = new BlendComposite(BlendingMode.ERASE); + public static final BlendComposite Invert = new BlendComposite(BlendingMode.INVERT); + public static final BlendComposite Multiply = new BlendComposite(BlendingMode.MULTIPLY); + public static final BlendComposite Screen = new BlendComposite(BlendingMode.SCREEN); + public static final BlendComposite Darken = new BlendComposite(BlendingMode.DARKEN); + public static final BlendComposite Lighten = new BlendComposite(BlendingMode.LIGHTEN); + public static final BlendComposite Overlay = new BlendComposite(BlendingMode.OVERLAY); + public static final BlendComposite HardLight = new BlendComposite(BlendingMode.HARD_LIGHT); + public static final BlendComposite Difference = new BlendComposite(BlendingMode.DIFFERENCE); + public static final BlendComposite Add = new BlendComposite(BlendingMode.ADD); + public static final BlendComposite Subtract = new BlendComposite(BlendingMode.SUBTRACT); + private final float alpha; + private final BlendingMode mode; + + private BlendComposite(BlendingMode mode) { + this(mode, 1.0f); + } + + private BlendComposite(BlendingMode mode, float alpha) { + this.mode = mode; + + if (alpha < 0.0f || alpha > 1.0f) { + throw new IllegalArgumentException( + "alpha must be comprised between 0.0f and 1.0f"); + } + this.alpha = alpha; + } + + public float getAlpha() { + return alpha; + } + + /** + *

+ * Returns the blending mode of this composite.

+ * + * @return the blending mode used by this object + */ + public BlendingMode getMode() { + return mode; + } + + /** + * {@inheritDoc} + * + * @return + */ + @Override + public int hashCode() { + return Float.floatToIntBits(alpha) * 31 + mode.ordinal(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof BlendComposite)) { + return false; + } + + BlendComposite bc = (BlendComposite) obj; + return mode == bc.mode && alpha == bc.alpha; + } + + private static boolean checkComponentsOrder(ColorModel cm) { + if (cm instanceof DirectColorModel + && cm.getTransferType() == DataBuffer.TYPE_INT) { + DirectColorModel directCM = (DirectColorModel) cm; + + return directCM.getRedMask() == 0x00FF0000 + && directCM.getGreenMask() == 0x0000FF00 + && directCM.getBlueMask() == 0x000000FF + && (directCM.getNumComponents() != 4 + || directCM.getAlphaMask() == 0xFF000000); + } + + return false; + } + + @Override + public CompositeContext createContext(ColorModel srcColorModel, + ColorModel dstColorModel, + RenderingHints hints) { + if (!checkComponentsOrder(srcColorModel) + || !checkComponentsOrder(dstColorModel)) { + throw new RasterFormatException("Incompatible color models"); + } + + return new BlendingContext(this); + } + + private static final class BlendingContext implements CompositeContext { + + private final Blender blender; + private final BlendComposite composite; + + private BlendingContext(BlendComposite composite) { + this.composite = composite; + this.blender = Blender.getBlenderFor(composite); + } + + @Override + public void dispose() { + } + + @Override + public void compose(Raster src, Raster dstIn, WritableRaster dstOut) { + int width = Math.min(src.getWidth(), dstIn.getWidth()); + int height = Math.min(src.getHeight(), dstIn.getHeight()); + + float alpha = composite.getAlpha(); + + int[] result = new int[4]; + int[] srcPixel = new int[4]; + int[] dstPixel = new int[4]; + int[] retPixel = new int[4]; + int[] srcPixels = new int[width]; + int[] dstPixels = new int[width]; + + for (int y = 0; y < height; y++) { + src.getDataElements(0, y, width, 1, srcPixels); + dstIn.getDataElements(0, y, width, 1, dstPixels); + for (int x = 0; x < width; x++) { + int pixel = srcPixels[x]; + srcPixel[0] = (pixel >> 16) & 0xFF; + srcPixel[1] = (pixel >> 8) & 0xFF; + srcPixel[2] = (pixel) & 0xFF; + srcPixel[3] = (pixel >> 24) & 0xFF; + + pixel = dstPixels[x]; + dstPixel[0] = (pixel >> 16) & 0xFF; + dstPixel[1] = (pixel >> 8) & 0xFF; + dstPixel[2] = (pixel) & 0xFF; + dstPixel[3] = (pixel >> 24) & 0xFF; + + blender.blend(srcPixel, dstPixel, result); + + retPixel[0] = ((int) (dstPixel[0] + (result[0] - dstPixel[0]) * alpha) & 0xFF); + retPixel[1] = ((int) (dstPixel[1] + (result[1] - dstPixel[1]) * alpha) & 0xFF); + retPixel[2] = (int) (dstPixel[2] + (result[2] - dstPixel[2]) * alpha) & 0xFF; + retPixel[3] = ((int) (dstPixel[3] + (result[3] - dstPixel[3]) * alpha) & 0xFF); + + float af = ((float) srcPixel[3]) / 255f; + retPixel[0] = (int) ((1f - af) * dstPixel[0] + af * retPixel[0]); + retPixel[1] = (int) ((1f - af) * dstPixel[1] + af * retPixel[1]); + retPixel[2] = (int) ((1f - af) * dstPixel[2] + af * retPixel[2]); + retPixel[3] = (int) ((1f - af) * dstPixel[3] + af * retPixel[3]); + + dstPixels[x] = (retPixel[3] << 24) + | retPixel[0] << 16 + | retPixel[1] << 8 + | retPixel[2]; + } + dstOut.setDataElements(0, y, width, 1, dstPixels); + } + } + } + + private static abstract class Blender { + + public abstract void blend(int[] src, int[] dst, int[] result); + + public static Blender getBlenderFor(BlendComposite composite) { + switch (composite.getMode()) { + case ADD: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = Math.min(255, src[0] + dst[0]); + result[1] = Math.min(255, src[1] + dst[1]); + result[2] = Math.min(255, src[2] + dst[2]); + result[3] = Math.min(255, src[3] + dst[3]); + } + }; + case INVERT: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = 255 - dst[0]; + result[1] = 255 - dst[1]; + result[2] = 255 - dst[2]; + result[3] = src[3]; + } + }; + case ALPHA: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = src[0]; + result[1] = src[1]; + result[2] = src[2]; + result[3] = dst[3]; //? + } + }; + case ERASE: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = src[0]; + result[1] = src[1]; + result[2] = src[2]; + result[3] = 255 - dst[3]; //? + } + }; + + case DARKEN: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = Math.min(src[0], dst[0]); + result[1] = Math.min(src[1], dst[1]); + result[2] = Math.min(src[2], dst[2]); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + case DIFFERENCE: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = Math.abs(dst[0] - src[0]); + result[1] = Math.abs(dst[1] - src[1]); + result[2] = Math.abs(dst[2] - src[2]); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + + case HARD_LIGHT: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = src[0] < 128 ? dst[0] * src[0] >> 7 + : 255 - ((255 - src[0]) * (255 - dst[0]) >> 7); + result[1] = src[1] < 128 ? dst[1] * src[1] >> 7 + : 255 - ((255 - src[1]) * (255 - dst[1]) >> 7); + result[2] = src[2] < 128 ? dst[2] * src[2] >> 7 + : 255 - ((255 - src[2]) * (255 - dst[2]) >> 7); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + + case LIGHTEN: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = Math.max(src[0], dst[0]); + result[1] = Math.max(src[1], dst[1]); + result[2] = Math.max(src[2], dst[2]); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + case MULTIPLY: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = (src[0] * dst[0]) >> 8; + result[1] = (src[1] * dst[1]) >> 8; + result[2] = (src[2] * dst[2]) >> 8; + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + + case OVERLAY: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = dst[0] < 128 ? dst[0] * src[0] >> 7 + : 255 - ((255 - dst[0]) * (255 - src[0]) >> 7); + result[1] = dst[1] < 128 ? dst[1] * src[1] >> 7 + : 255 - ((255 - dst[1]) * (255 - src[1]) >> 7); + result[2] = dst[2] < 128 ? dst[2] * src[2] >> 7 + : 255 - ((255 - dst[2]) * (255 - src[2]) >> 7); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + case SCREEN: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = 255 - ((255 - src[0]) * (255 - dst[0]) >> 8); + result[1] = 255 - ((255 - src[1]) * (255 - dst[1]) >> 8); + result[2] = 255 - ((255 - src[2]) * (255 - dst[2]) >> 8); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + + case SUBTRACT: + return new Blender() { + @Override + public void blend(int[] src, int[] dst, int[] result) { + result[0] = Math.max(0, src[0] + dst[0] - 256); + result[1] = Math.max(0, src[1] + dst[1] - 256); + result[2] = Math.max(0, src[2] + dst[2] - 256); + result[3] = Math.min(255, src[3] + dst[3] - (src[3] * dst[3]) / 255); + } + }; + } + throw new IllegalArgumentException("Blender not implemented for " + + composite.getMode().name()); + } + } +} diff --git a/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java similarity index 59% rename from src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java index e36321c20..0bcb1a8e8 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.filters; - -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.helpers.SerializableImage; - -/** - * Applies a color transformation on the pixels of a display list object - * - * @author JPEXS - */ -public class COLORMATRIXFILTER extends FILTER { - - /** - * Color matrix values - */ - @SWFType(BasicType.FLOAT) - public float[] matrix = new float[20]; - - /** - * Constructor - */ - public COLORMATRIXFILTER() { - super(6); - } - - @Override - public SerializableImage apply(SerializableImage src) { - float[][] matrix2 = new float[4][4]; - for (int y = 0; y < 4; y++) { - for (int x = 0; x < 4; x++) { - matrix2[y][x] = matrix[y * 5 + x]; - } - } - //matrix2[4][4] = 1; - return Filtering.colorMatrix(src, matrix2); - } - - @Override - public double getDeltaX() { - return 0; - } - - @Override - public double getDeltaY() { - return 0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.filters; + +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.helpers.SerializableImage; + +/** + * Applies a color transformation on the pixels of a display list object + * + * @author JPEXS + */ +public class COLORMATRIXFILTER extends FILTER { + + /** + * Color matrix values + */ + @SWFType(BasicType.FLOAT) + public float[] matrix = new float[20]; + + /** + * Constructor + */ + public COLORMATRIXFILTER() { + super(6); + } + + @Override + public SerializableImage apply(SerializableImage src) { + float[][] matrix2 = new float[4][4]; + for (int y = 0; y < 4; y++) { + for (int x = 0; x < 4; x++) { + matrix2[y][x] = matrix[y * 5 + x]; + } + } + //matrix2[4][4] = 1; + return Filtering.colorMatrix(src, matrix2); + } + + @Override + public double getDeltaX() { + return 0; + } + + @Override + public double getDeltaY() { + return 0; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java similarity index 71% rename from src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java index ab6a3e994..0df2a352f 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java @@ -1,102 +1,101 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.filters; - -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.RGBA; -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.helpers.SerializableImage; - -/** - * Two-dimensional discrete convolution filter. - * - * @author JPEXS - */ -public class CONVOLUTIONFILTER extends FILTER { - - /** - * Horizontal matrix size - */ - @SWFType(BasicType.UI8) - public int matrixX; - /** - * Vertical matrix size - */ - @SWFType(BasicType.UI8) - public int matrixY; - /** - * Divisor applied to the matrix values - */ - @SWFType(BasicType.FLOAT) - public float divisor; - /** - * Bias applied to the matrix values - */ - @SWFType(BasicType.FLOAT) - public float bias; - /** - * Matrix values - */ - @SWFType(BasicType.FLOAT) - public float[][] matrix = new float[0][0]; - /** - * Default color for pixels outside the image - */ - public RGBA defaultColor; - @Reserved - @SWFType(value = BasicType.UB, count = 6) - public int reserved; - /** - * Clamp mode - */ - public boolean clamp; - /** - * Preserve the alpha - */ - public boolean preserveAlpha; - - /** - * Constructor - */ - public CONVOLUTIONFILTER() { - super(5); - } - - @Override - public SerializableImage apply(SerializableImage src) { - int height = matrix.length; - int width = matrix[0].length; - float[] matrix2 = new float[width * height]; - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - matrix2[y * width + x] = matrix[x][y] * divisor + bias; - } - } - return Filtering.convolution(src, matrix2, width, height); - } - - @Override - public double getDeltaX() { - return 0; - } - - @Override - public double getDeltaY() { - return 0; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.filters; + +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.annotations.Reserved; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.helpers.SerializableImage; + +/** + * Two-dimensional discrete convolution filter. + * + * @author JPEXS + */ +public class CONVOLUTIONFILTER extends FILTER { + + /** + * Horizontal matrix size + */ + @SWFType(BasicType.UI8) + public int matrixX; + /** + * Vertical matrix size + */ + @SWFType(BasicType.UI8) + public int matrixY; + /** + * Divisor applied to the matrix values + */ + @SWFType(BasicType.FLOAT) + public float divisor; + /** + * Bias applied to the matrix values + */ + @SWFType(BasicType.FLOAT) + public float bias; + /** + * Matrix values + */ + @SWFType(BasicType.FLOAT) + public float[][] matrix = new float[0][0]; + /** + * Default color for pixels outside the image + */ + public RGBA defaultColor; + @Reserved + @SWFType(value = BasicType.UB, count = 6) + public int reserved; + /** + * Clamp mode + */ + public boolean clamp; + /** + * Preserve the alpha + */ + public boolean preserveAlpha; + + /** + * Constructor + */ + public CONVOLUTIONFILTER() { + super(5); + } + + @Override + public SerializableImage apply(SerializableImage src) { + int height = matrix.length; + int width = matrix[0].length; + float[] matrix2 = new float[width * height]; + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + matrix2[y * width + x] = matrix[x][y] * divisor + bias; + } + } + return Filtering.convolution(src, matrix2, width, height); + } + + @Override + public double getDeltaX() { + return 0; + } + + @Override + public double getDeltaY() { + return 0; + } +} diff --git a/src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java similarity index 73% rename from src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java index be1d8b76f..96de3c11f 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/DROPSHADOWFILTER.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; diff --git a/src/com/jpexs/decompiler/flash/types/filters/FILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/FILTER.java similarity index 50% rename from src/com/jpexs/decompiler/flash/types/filters/FILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/FILTER.java index 0ffc0ff7c..7af9f0c97 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/FILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/FILTER.java @@ -1,51 +1,50 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.filters; - -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import com.jpexs.helpers.SerializableImage; -import java.io.Serializable; - -/** - * Bitmap filter - * - * @author JPEXS - */ -public abstract class FILTER implements Serializable { - - /** - * Identificator of type of the filter - */ - @SWFType(BasicType.UI8) - public int id; - - /** - * Constructor - * - * @param id Type identificator - */ - public FILTER(int id) { - this.id = id; - } - - public abstract SerializableImage apply(SerializableImage src); - - public abstract double getDeltaX(); - - public abstract double getDeltaY(); -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.filters; + +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; +import com.jpexs.helpers.SerializableImage; +import java.io.Serializable; + +/** + * Bitmap filter + * + * @author JPEXS + */ +public abstract class FILTER implements Serializable { + + /** + * Identificator of type of the filter + */ + @SWFType(BasicType.UI8) + public int id; + + /** + * Constructor + * + * @param id Type identificator + */ + public FILTER(int id) { + this.id = id; + } + + public abstract SerializableImage apply(SerializableImage src); + + public abstract double getDeltaX(); + + public abstract double getDeltaY(); +} diff --git a/src/com/jpexs/decompiler/flash/types/filters/Filtering.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/Filtering.java similarity index 97% rename from src/com/jpexs/decompiler/flash/types/filters/Filtering.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/Filtering.java index 061614133..cba04e48f 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/Filtering.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/Filtering.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.helpers.SerializableImage; diff --git a/src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java similarity index 68% rename from src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java index 5612b789c..1a592cf2a 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GLOWFILTER.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; diff --git a/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java similarity index 81% rename from src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java index 1e93bfb98..3b27e47f3 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; diff --git a/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java similarity index 81% rename from src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java index b3346a694..1519f49e3 100644 --- a/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.filters; import com.jpexs.decompiler.flash.types.BasicType; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java similarity index 85% rename from src/com/jpexs/decompiler/flash/types/gfx/ContourType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java index fb0237169..12e5d3346 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/ContourType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java similarity index 96% rename from src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java index 77d14c7aa..fbc99609d 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/EdgeType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java similarity index 58% rename from src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java index 1b3cca497..08e2c6a9d 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FONTINFO.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/FontType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java similarity index 83% rename from src/com/jpexs/decompiler/flash/types/gfx/FontType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java index 84feef63f..b1a516056 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/FontType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.types.SHAPE; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java similarity index 89% rename from src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java index 24fa517d7..8616e782a 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.dumpview.DumpInfo; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java similarity index 85% rename from src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java index cba5fcf11..a31c4155f 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java @@ -1,195 +1,194 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.gfx; - -import java.io.IOException; -import java.io.OutputStream; - -/** - * - * @author JPEXS - */ -public class GFxOutputStream extends OutputStream { - - public static final int MaxUInt6 = (1 << 6) - 1; - public static final int MaxUInt7 = (1 << 7) - 1; - public static final int MaxUInt14 = (1 << 14) - 1; - public static final int MaxUInt22 = (1 << 22) - 1; - public static final int MaxUInt30 = (1 << 30) - 1; - public static final int MinSInt5 = -(1 << 4); - public static final int MaxSInt5 = (1 << 4) - 1; - public static final int MinSInt6 = -(1 << 5); - public static final int MaxSInt6 = (1 << 5) - 1; - public static final int MinSInt7 = -(1 << 6); - public static final int MaxSInt7 = (1 << 6) - 1; - public static final int MinSInt8 = -(1 << 7); - public static final int MaxSInt8 = (1 << 7) - 1; - public static final int MinSInt9 = -(1 << 8); - public static final int MaxSInt9 = (1 << 8) - 1; - public static final int MinSInt10 = -(1 << 9); - public static final int MaxSInt10 = (1 << 9) - 1; - public static final int MinSInt11 = -(1 << 10); - public static final int MaxSInt11 = (1 << 10) - 1; - public static final int MinSInt12 = -(1 << 11); - public static final int MaxSInt12 = (1 << 11) - 1; - public static final int MinSInt13 = -(1 << 12); - public static final int MaxSInt13 = (1 << 12) - 1; - public static final int MinSInt14 = -(1 << 13); - public static final int MaxSInt14 = (1 << 13) - 1; - public static final int MinSInt15 = -(1 << 14); - public static final int MaxSInt15 = (1 << 14) - 1; - public static final int MinSInt17 = -(1 << 16); - public static final int MaxSInt17 = (1 << 16) - 1; - public static final int MinSInt18 = -(1 << 17); - public static final int MaxSInt18 = (1 << 17) - 1; - public static final int MinSInt19 = -(1 << 18); - public static final int MaxSInt19 = (1 << 18) - 1; - public static final int MinSInt20 = -(1 << 19); - public static final int MaxSInt20 = (1 << 19) - 1; - public static final int MinSInt22 = -(1 << 21); - public static final int MaxSInt22 = (1 << 21) - 1; - private final OutputStream os; - private long pos = 0; - - public GFxOutputStream(OutputStream os) { - this.os = os; - } - - public long getPos() { - return pos; - } - - @Override - public void write(int b) throws IOException { - os.write(b); - pos++; - } - - /** - * Writes SI32 (Signed 32bit integer) value to the stream - * - * @param value SI32 value - * @throws IOException - */ - public void writeSI32(long value) throws IOException { - writeUI32(value); - } - - /** - * Writes SI16 (Signed 16bit integer) value to the stream - * - * @param value SI16 value - * @throws IOException - */ - public void writeSI16(int value) throws IOException { - writeUI16(value); - } - - /** - * Writes SI8 (Signed 8bit integer) value to the stream - * - * @param value SI8 value - * @throws IOException - */ - public void writeSI8(int value) throws IOException { - writeUI8(value); - } - - /** - * Writes UI32 (Unsigned 32bit integer) value to the stream - * - * @param value UI32 value - * @throws IOException - */ - public void writeUI32(long value) throws IOException { - write((int) (value & 0xff)); - write((int) ((value >> 8) & 0xff)); - write((int) ((value >> 16) & 0xff)); - write((int) ((value >> 24) & 0xff)); - } - - /** - * Writes UI16 (Unsigned 16bit integer) value to the stream - * - * @param value UI16 value - * @throws IOException - */ - public void writeUI16(int value) throws IOException { - write((int) (value & 0xff)); - write((int) ((value >> 8) & 0xff)); - } - - /** - * Writes UI8 (Unsigned 8bit integer) value to the stream - * - * @param val UI8 value to write - * @throws IOException - */ - public void writeUI8(int val) throws IOException { - write(val & 0xff); - } - - /** - * Writes FLOAT (single precision floating point value) value to the stream - * - * @param value FLOAT value - * @throws IOException - */ - public void writeFLOAT(float value) throws IOException { - writeUI32(Float.floatToIntBits(value)); - } - - public void writeSI15(int v) throws IOException { - if (v >= MinSInt7 && v <= MaxSInt7) { - writeUI8(v << 1); - return; - } - writeUI8((v << 1) | 1); - writeUI8(v >> 7); - } - - public void writeUI15(int v) throws IOException { - if (v <= MaxUInt7) { - writeUI8(v << 1); - return; - } - writeUI8((v << 1) | 1); - writeUI8(v >> 7); - } - - public void writeUI30(int v) throws IOException { - if (v <= MaxUInt6) { - writeUI8(v << 2); - return; - } - if (v <= MaxUInt14) { - writeUI8((v << 2) | 1); - writeUI8(v >> 6); - return; - } - if (v <= MaxUInt22) { - writeUI8((v << 2) | 2); - writeUI8(v >> 6); - writeUI8(v >> 14); - return; - } - writeUI8((v << 2) | 3); - writeUI8(v >> 6); - writeUI8(v >> 14); - writeUI8(v >> 22); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.gfx; + +import java.io.IOException; +import java.io.OutputStream; + +/** + * + * @author JPEXS + */ +public class GFxOutputStream extends OutputStream { + + public static final int MaxUInt6 = (1 << 6) - 1; + public static final int MaxUInt7 = (1 << 7) - 1; + public static final int MaxUInt14 = (1 << 14) - 1; + public static final int MaxUInt22 = (1 << 22) - 1; + public static final int MaxUInt30 = (1 << 30) - 1; + public static final int MinSInt5 = -(1 << 4); + public static final int MaxSInt5 = (1 << 4) - 1; + public static final int MinSInt6 = -(1 << 5); + public static final int MaxSInt6 = (1 << 5) - 1; + public static final int MinSInt7 = -(1 << 6); + public static final int MaxSInt7 = (1 << 6) - 1; + public static final int MinSInt8 = -(1 << 7); + public static final int MaxSInt8 = (1 << 7) - 1; + public static final int MinSInt9 = -(1 << 8); + public static final int MaxSInt9 = (1 << 8) - 1; + public static final int MinSInt10 = -(1 << 9); + public static final int MaxSInt10 = (1 << 9) - 1; + public static final int MinSInt11 = -(1 << 10); + public static final int MaxSInt11 = (1 << 10) - 1; + public static final int MinSInt12 = -(1 << 11); + public static final int MaxSInt12 = (1 << 11) - 1; + public static final int MinSInt13 = -(1 << 12); + public static final int MaxSInt13 = (1 << 12) - 1; + public static final int MinSInt14 = -(1 << 13); + public static final int MaxSInt14 = (1 << 13) - 1; + public static final int MinSInt15 = -(1 << 14); + public static final int MaxSInt15 = (1 << 14) - 1; + public static final int MinSInt17 = -(1 << 16); + public static final int MaxSInt17 = (1 << 16) - 1; + public static final int MinSInt18 = -(1 << 17); + public static final int MaxSInt18 = (1 << 17) - 1; + public static final int MinSInt19 = -(1 << 18); + public static final int MaxSInt19 = (1 << 18) - 1; + public static final int MinSInt20 = -(1 << 19); + public static final int MaxSInt20 = (1 << 19) - 1; + public static final int MinSInt22 = -(1 << 21); + public static final int MaxSInt22 = (1 << 21) - 1; + private final OutputStream os; + private long pos = 0; + + public GFxOutputStream(OutputStream os) { + this.os = os; + } + + public long getPos() { + return pos; + } + + @Override + public void write(int b) throws IOException { + os.write(b); + pos++; + } + + /** + * Writes SI32 (Signed 32bit integer) value to the stream + * + * @param value SI32 value + * @throws IOException + */ + public void writeSI32(long value) throws IOException { + writeUI32(value); + } + + /** + * Writes SI16 (Signed 16bit integer) value to the stream + * + * @param value SI16 value + * @throws IOException + */ + public void writeSI16(int value) throws IOException { + writeUI16(value); + } + + /** + * Writes SI8 (Signed 8bit integer) value to the stream + * + * @param value SI8 value + * @throws IOException + */ + public void writeSI8(int value) throws IOException { + writeUI8(value); + } + + /** + * Writes UI32 (Unsigned 32bit integer) value to the stream + * + * @param value UI32 value + * @throws IOException + */ + public void writeUI32(long value) throws IOException { + write((int) (value & 0xff)); + write((int) ((value >> 8) & 0xff)); + write((int) ((value >> 16) & 0xff)); + write((int) ((value >> 24) & 0xff)); + } + + /** + * Writes UI16 (Unsigned 16bit integer) value to the stream + * + * @param value UI16 value + * @throws IOException + */ + public void writeUI16(int value) throws IOException { + write((int) (value & 0xff)); + write((int) ((value >> 8) & 0xff)); + } + + /** + * Writes UI8 (Unsigned 8bit integer) value to the stream + * + * @param val UI8 value to write + * @throws IOException + */ + public void writeUI8(int val) throws IOException { + write(val & 0xff); + } + + /** + * Writes FLOAT (single precision floating point value) value to the stream + * + * @param value FLOAT value + * @throws IOException + */ + public void writeFLOAT(float value) throws IOException { + writeUI32(Float.floatToIntBits(value)); + } + + public void writeSI15(int v) throws IOException { + if (v >= MinSInt7 && v <= MaxSInt7) { + writeUI8(v << 1); + return; + } + writeUI8((v << 1) | 1); + writeUI8(v >> 7); + } + + public void writeUI15(int v) throws IOException { + if (v <= MaxUInt7) { + writeUI8(v << 1); + return; + } + writeUI8((v << 1) | 1); + writeUI8(v >> 7); + } + + public void writeUI30(int v) throws IOException { + if (v <= MaxUInt6) { + writeUI8(v << 2); + return; + } + if (v <= MaxUInt14) { + writeUI8((v << 2) | 1); + writeUI8(v >> 6); + return; + } + if (v <= MaxUInt22) { + writeUI8((v << 2) | 2); + writeUI8(v >> 6); + writeUI8(v >> 14); + return; + } + writeUI8((v << 2) | 3); + writeUI8(v >> 6); + writeUI8(v >> 14); + writeUI8(v >> 22); + } +} diff --git a/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java similarity index 51% rename from src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java index b031c97a0..d693a4593 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GLYPHIDX.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java similarity index 56% rename from src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java index 10b479b3f..c303d7cf2 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphInfoType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java similarity index 81% rename from src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java index 80d2d84ea..4cf267bf2 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/GlyphType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import com.jpexs.decompiler.flash.types.RECT; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java similarity index 53% rename from src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java index ffad24d35..3d01f7bd9 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/KerningPairType.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; diff --git a/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java similarity index 68% rename from src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java index 8b8befab8..c9f98e996 100644 --- a/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/TEXGLYPH.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.gfx; import java.io.IOException; diff --git a/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java similarity index 71% rename from src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java index 1fa14921a..bc4cb1997 100644 --- a/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/CurvedEdgeRecord.java @@ -1,87 +1,86 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.shaperecords; - -import com.jpexs.decompiler.flash.SWFOutputStream; -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.SWFType; - -/** - * - * @author JPEXS - */ -public class CurvedEdgeRecord extends SHAPERECORD { - - public boolean typeFlag = true; - public boolean straightFlag = false; - - @Calculated - @SWFType(value = BasicType.UB, count = 4) - public int numBits; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - public int controlDeltaX; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - public int controlDeltaY; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - public int anchorDeltaX; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - public int anchorDeltaY; - - @Override - public String toString() { - return "[CurvedEdgeRecord numBits=" + numBits + ", controlDeltaX=" + controlDeltaX + ", controlDeltaY=" + controlDeltaY + ", anchorDeltaX=" + anchorDeltaX + ". anchorDeltaY=" + anchorDeltaY + "]"; - } - - @Override - public int changeX(int x) { - return x + (controlDeltaX + anchorDeltaX); - } - - @Override - public int changeY(int y) { - return y + (controlDeltaY + anchorDeltaY); - } - - @Override - public void flip() { - int tmp; - tmp = controlDeltaX; - controlDeltaX = -anchorDeltaX; - anchorDeltaX = -tmp; - tmp = controlDeltaY; - controlDeltaY = -anchorDeltaY; - anchorDeltaY = -tmp; - } - - @Override - public boolean isMove() { - return true; - } - - @Override - public void calculateBits() { - numBits = SWFOutputStream.getNeededBitsS(controlDeltaX, controlDeltaY, anchorDeltaX, anchorDeltaY) - 2; - if (numBits < 0) { - numBits = 0; - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.shaperecords; + +import com.jpexs.decompiler.flash.SWFOutputStream; +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.SWFType; + +/** + * + * @author JPEXS + */ +public class CurvedEdgeRecord extends SHAPERECORD { + + public boolean typeFlag = true; + public boolean straightFlag = false; + + @Calculated + @SWFType(value = BasicType.UB, count = 4) + public int numBits; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + public int controlDeltaX; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + public int controlDeltaY; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + public int anchorDeltaX; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + public int anchorDeltaY; + + @Override + public String toString() { + return "[CurvedEdgeRecord numBits=" + numBits + ", controlDeltaX=" + controlDeltaX + ", controlDeltaY=" + controlDeltaY + ", anchorDeltaX=" + anchorDeltaX + ". anchorDeltaY=" + anchorDeltaY + "]"; + } + + @Override + public int changeX(int x) { + return x + (controlDeltaX + anchorDeltaX); + } + + @Override + public int changeY(int y) { + return y + (controlDeltaY + anchorDeltaY); + } + + @Override + public void flip() { + int tmp; + tmp = controlDeltaX; + controlDeltaX = -anchorDeltaX; + anchorDeltaX = -tmp; + tmp = controlDeltaY; + controlDeltaY = -anchorDeltaY; + anchorDeltaY = -tmp; + } + + @Override + public boolean isMove() { + return true; + } + + @Override + public void calculateBits() { + numBits = SWFOutputStream.getNeededBitsS(controlDeltaX, controlDeltaY, anchorDeltaX, anchorDeltaY) - 2; + if (numBits < 0) { + numBits = 0; + } + } +} diff --git a/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java similarity index 51% rename from src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java index fec8c27f5..19e67b5d5 100644 --- a/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/EndShapeRecord.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.shaperecords; - -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.SWFType; - -/** - * - * @author JPEXS - */ -public class EndShapeRecord extends SHAPERECORD { - - public boolean typeFlag = false; - @SWFType(value = BasicType.UB, count = 5) - public int endOfShape = 0; - - @Override - public String toString() { - return "[EndShapeRecord]"; - } - - @Override - public int changeX(int x) { - return x; - } - - @Override - public int changeY(int y) { - return y; - } - - @Override - public void flip() { - } - - @Override - public boolean isMove() { - return false; - } - - @Override - public void calculateBits() { - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.shaperecords; + +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.SWFType; + +/** + * + * @author JPEXS + */ +public class EndShapeRecord extends SHAPERECORD { + + public boolean typeFlag = false; + @SWFType(value = BasicType.UB, count = 5) + public int endOfShape = 0; + + @Override + public String toString() { + return "[EndShapeRecord]"; + } + + @Override + public int changeX(int x) { + return x; + } + + @Override + public int changeY(int y) { + return y; + } + + @Override + public void flip() { + } + + @Override + public boolean isMove() { + return false; + } + + @Override + public void calculateBits() { + } +} diff --git a/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java similarity index 96% rename from src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java index e9bbc1f49..6fffbde49 100644 --- a/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.shaperecords; import com.jpexs.decompiler.flash.SWF; diff --git a/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java similarity index 75% rename from src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java index 5472c25af..d6776fc4c 100644 --- a/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StraightEdgeRecord.java @@ -1,106 +1,105 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.shaperecords; - -import com.jpexs.decompiler.flash.SWFOutputStream; -import com.jpexs.decompiler.flash.types.BasicType; -import com.jpexs.decompiler.flash.types.annotations.Calculated; -import com.jpexs.decompiler.flash.types.annotations.Conditional; -import com.jpexs.decompiler.flash.types.annotations.SWFType; - -/** - * - * @author JPEXS - */ -public class StraightEdgeRecord extends SHAPERECORD { - - /* - if (!ser.generalLineFlag) { - ser.vertLineFlag = readUB(1) == 1; - } - if (ser.generalLineFlag || (!ser.vertLineFlag)) { - ser.deltaX = (int) readSB(ser.numBits + 2); - } - if (ser.generalLineFlag || (ser.vertLineFlag)) { - ser.deltaY = (int) readSB(ser.numBits + 2); - } - */ - public int typeFlag = 1; - public int straightFlag = 1; - - @Calculated - @SWFType(value = BasicType.UB, count = 4) - public int numBits; - public boolean generalLineFlag; - - @Conditional(value = "generalLineFlag", revert = true) - public boolean vertLineFlag; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - @Conditional("generalLineFlag|!vertLineFlag") - public int deltaX; - - @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) - @Conditional("generalLineFlag|vertLineFlag") - public int deltaY; - - @Override - public String toString() { - return "[StraightEdgeRecord numBits=" + numBits + ", generalLineFlag=" + generalLineFlag + ", vertLineFlag=" + vertLineFlag + ", deltaX=" + deltaX + ", deltaY=" + deltaY + "]"; - } - - @Override - public int changeX(int x) { - if (generalLineFlag) { - return x + deltaX; - } else if (vertLineFlag) { - return x; - } else { - return x + deltaX; - } - } - - @Override - public int changeY(int y) { - if (generalLineFlag) { - return y + deltaY; - } else if (vertLineFlag) { - return y + deltaY; - } else { - return y; - } - } - - @Override - public void flip() { - deltaX = -deltaX; - deltaY = -deltaY; - } - - @Override - public boolean isMove() { - return true; - } - - @Override - public void calculateBits() { - numBits = SWFOutputStream.getNeededBitsS(deltaX, deltaY) - 2; - if (numBits < 0) { - numBits = 0; - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.shaperecords; + +import com.jpexs.decompiler.flash.SWFOutputStream; +import com.jpexs.decompiler.flash.types.BasicType; +import com.jpexs.decompiler.flash.types.annotations.Calculated; +import com.jpexs.decompiler.flash.types.annotations.Conditional; +import com.jpexs.decompiler.flash.types.annotations.SWFType; + +/** + * + * @author JPEXS + */ +public class StraightEdgeRecord extends SHAPERECORD { + + /* + if (!ser.generalLineFlag) { + ser.vertLineFlag = readUB(1) == 1; + } + if (ser.generalLineFlag || (!ser.vertLineFlag)) { + ser.deltaX = (int) readSB(ser.numBits + 2); + } + if (ser.generalLineFlag || (ser.vertLineFlag)) { + ser.deltaY = (int) readSB(ser.numBits + 2); + } + */ + public int typeFlag = 1; + public int straightFlag = 1; + + @Calculated + @SWFType(value = BasicType.UB, count = 4) + public int numBits; + public boolean generalLineFlag; + + @Conditional(value = "generalLineFlag", revert = true) + public boolean vertLineFlag; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + @Conditional("generalLineFlag|!vertLineFlag") + public int deltaX; + + @SWFType(value = BasicType.SB, countField = "numBits", countAdd = 2) + @Conditional("generalLineFlag|vertLineFlag") + public int deltaY; + + @Override + public String toString() { + return "[StraightEdgeRecord numBits=" + numBits + ", generalLineFlag=" + generalLineFlag + ", vertLineFlag=" + vertLineFlag + ", deltaX=" + deltaX + ", deltaY=" + deltaY + "]"; + } + + @Override + public int changeX(int x) { + if (generalLineFlag) { + return x + deltaX; + } else if (vertLineFlag) { + return x; + } else { + return x + deltaX; + } + } + + @Override + public int changeY(int y) { + if (generalLineFlag) { + return y + deltaY; + } else if (vertLineFlag) { + return y + deltaY; + } else { + return y; + } + } + + @Override + public void flip() { + deltaX = -deltaX; + deltaY = -deltaY; + } + + @Override + public boolean isMove() { + return true; + } + + @Override + public void calculateBits() { + numBits = SWFOutputStream.getNeededBitsS(deltaX, deltaY) - 2; + if (numBits < 0) { + numBits = 0; + } + } +} diff --git a/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java similarity index 84% rename from src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java index 9ce2b661d..98201e513 100644 --- a/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/StyleChangeRecord.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.shaperecords; import com.jpexs.decompiler.flash.SWFOutputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java similarity index 93% rename from src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java index 0e0263a5e..601752d88 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.EndOfStreamException; diff --git a/src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java similarity index 85% rename from src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java index 1c824dd1d..ac14784da 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3Decoder.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java similarity index 76% rename from src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java index f990a7396..229d9ca54 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java @@ -1,106 +1,105 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.sound; - -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; -import javazoom.jl.decoder.Bitstream; -import javazoom.jl.decoder.BitstreamException; -import javazoom.jl.decoder.Decoder; -import javazoom.jl.decoder.DecoderException; -import javazoom.jl.decoder.Header; -import javazoom.jl.decoder.SampleBuffer; - -/** - * - * @author JPEXS - */ -public class MP3FRAME { - - private Header h; - private SampleBuffer samples; - - private MP3FRAME() { - - } - - public static MP3FRAME readFrame(Bitstream bitstream, Decoder decoder) throws IOException { - MP3FRAME ret = new MP3FRAME(); - try { - ret.h = bitstream.readFrame(); - if (ret.h == null) { - return null; - } - } catch (BitstreamException ex) { - Logger.getLogger(MP3FRAME.class.getName()).log(Level.SEVERE, null, ex); - } - try { - ret.samples = (SampleBuffer) decoder.decodeFrame(ret.h, bitstream); - } catch (DecoderException ex) { - Logger.getLogger(MP3FRAME.class.getName()).log(Level.SEVERE, null, ex); - } - bitstream.closeFrame(); - return ret; - } - - public boolean isStereo() { - return h.mode() != Header.SINGLE_CHANNEL; - } - - public SampleBuffer getSamples() { - return samples; - } - - public int getSamplingRate() { - switch (h.sample_frequency()) { - case Header.THIRTYTWO: - if (h.version() == Header.MPEG1) { - return 32000; - } else if (h.version() == Header.MPEG2_LSF) { - return 16000; - } else // SZD - { - return 8000; - } - case Header.FOURTYFOUR_POINT_ONE: - if (h.version() == Header.MPEG1) { - return 44100; - } else if (h.version() == Header.MPEG2_LSF) { - return 22050; - } else // SZD - { - return 11025; - } - case Header.FOURTYEIGHT: - if (h.version() == Header.MPEG1) { - return 48000; - } else if (h.version() == Header.MPEG2_LSF) { - return 24000; - } else // SZD - { - return 12000; - } - default: - return 0; - } - } - - public int getBitRate() { - return h.bitrate(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.types.sound; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javazoom.jl.decoder.Bitstream; +import javazoom.jl.decoder.BitstreamException; +import javazoom.jl.decoder.Decoder; +import javazoom.jl.decoder.DecoderException; +import javazoom.jl.decoder.Header; +import javazoom.jl.decoder.SampleBuffer; + +/** + * + * @author JPEXS + */ +public class MP3FRAME { + + private Header h; + private SampleBuffer samples; + + private MP3FRAME() { + + } + + public static MP3FRAME readFrame(Bitstream bitstream, Decoder decoder) throws IOException { + MP3FRAME ret = new MP3FRAME(); + try { + ret.h = bitstream.readFrame(); + if (ret.h == null) { + return null; + } + } catch (BitstreamException ex) { + Logger.getLogger(MP3FRAME.class.getName()).log(Level.SEVERE, null, ex); + } + try { + ret.samples = (SampleBuffer) decoder.decodeFrame(ret.h, bitstream); + } catch (DecoderException ex) { + Logger.getLogger(MP3FRAME.class.getName()).log(Level.SEVERE, null, ex); + } + bitstream.closeFrame(); + return ret; + } + + public boolean isStereo() { + return h.mode() != Header.SINGLE_CHANNEL; + } + + public SampleBuffer getSamples() { + return samples; + } + + public int getSamplingRate() { + switch (h.sample_frequency()) { + case Header.THIRTYTWO: + if (h.version() == Header.MPEG1) { + return 32000; + } else if (h.version() == Header.MPEG2_LSF) { + return 16000; + } else // SZD + { + return 8000; + } + case Header.FOURTYFOUR_POINT_ONE: + if (h.version() == Header.MPEG1) { + return 44100; + } else if (h.version() == Header.MPEG2_LSF) { + return 22050; + } else // SZD + { + return 11025; + } + case Header.FOURTYEIGHT: + if (h.version() == Header.MPEG1) { + return 48000; + } else if (h.version() == Header.MPEG2_LSF) { + return 24000; + } else // SZD + { + return 12000; + } + default: + return 0; + } + } + + public int getBitRate() { + return h.bitrate(); + } +} diff --git a/src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java similarity index 68% rename from src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java index 38cffbbe8..1fd7b1718 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/MP3SOUNDDATA.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java similarity index 74% rename from src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java index 3120f5521..96dddc555 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NellyMoserDecoder.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java similarity index 52% rename from src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java index 6695859a8..7157ad1f4 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/NoDecoder.java @@ -1,20 +1,18 @@ /* - * Copyright (C) 2014 * @author JPEXS - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java similarity index 59% rename from src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java index 471ceab47..903ecca82 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundDecoder.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java similarity index 92% rename from src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java index 40967d361..e5c7a4d89 100644 --- a/src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/sound/SoundFormat.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.types.sound; import com.jpexs.decompiler.flash.SWFInputStream; diff --git a/src/com/jpexs/decompiler/flash/xfl/FLAVersion.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/FLAVersion.java similarity index 81% rename from src/com/jpexs/decompiler/flash/xfl/FLAVersion.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/FLAVersion.java index 3da6d14f7..a20eb5c7a 100644 --- a/src/com/jpexs/decompiler/flash/xfl/FLAVersion.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/FLAVersion.java @@ -1,117 +1,116 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.xfl; - -import java.util.HashMap; -import java.util.Map; - -/** - * - * @author JPEXS - */ -public enum FLAVersion { - - CS5("CS5", "Flash CS 5", "2.0", 10), - CS5_5("CS5.5", "Flash CS 5.5", "2.1", 11), - CS6("CS6", "Flash CS 6", "2.2", 17), - CC("CC", "Flash CC", "2.4", Integer.MAX_VALUE) { - - @Override - public int minASVersion() { - return 3; //AS 1/2 not supported anymore - } - - }; - - private final String xflVersion; - private final String shortName; - private final String applicationName; - private final int maxSwfVersion; - - private static final Map versionToPlayerMap = new HashMap<>(); - - static { - versionToPlayerMap.put(10, "FlashPlayer10.0"); //10 & 10.1 - versionToPlayerMap.put(11, "FlashPlayer10.2"); - versionToPlayerMap.put(12, "FlashPlayer10.3"); - versionToPlayerMap.put(13, "FlashPlayer11.0"); - versionToPlayerMap.put(14, "FlashPlayer11.1"); - versionToPlayerMap.put(15, "FlashPlayer11.2"); - versionToPlayerMap.put(16, "FlashPlayer11.3"); - versionToPlayerMap.put(17, "FlashPlayer11.4"); - versionToPlayerMap.put(18, "FlashPlayer11.5"); - versionToPlayerMap.put(19, "FlashPlayer11.6"); - versionToPlayerMap.put(20, "FlashPlayer11.7"); - versionToPlayerMap.put(21, "FlashPlayer11.8"); - versionToPlayerMap.put(22, "FlashPlayer11.9"); - versionToPlayerMap.put(23, "FlashPlayer12.0"); - } - - private FLAVersion(String shortName, String applicationName, String xflVersion, int maxSwfVersion) { - this.xflVersion = xflVersion; - this.shortName = shortName; - this.applicationName = applicationName; - this.maxSwfVersion = maxSwfVersion; - } - - public String xflVersion() { - return xflVersion; - } - - public int maxSwfVersion() { - return maxSwfVersion; - } - - public int minASVersion() { - return 1; - } - - public String applicationName() { - return applicationName; - } - - public String shortName() { - return shortName; - } - - @Override - public String toString() { - return shortName; - } - - public static String swfVersionToPlayer(int version) { - if (versionToPlayerMap.containsKey(version)) { - return versionToPlayerMap.get(version); - } - return ""; - } - - public static FLAVersion fromString(String s) { - if (s == null) { - return null; - } - for (FLAVersion v : FLAVersion.values()) { - if (v.shortName.toLowerCase().equals(s.toLowerCase())) { - return v; - } - if (v.xflVersion.equals(s)) { - return v; - } - } - return null; - } -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.xfl; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author JPEXS + */ +public enum FLAVersion { + + CS5("CS5", "Flash CS 5", "2.0", 10), + CS5_5("CS5.5", "Flash CS 5.5", "2.1", 11), + CS6("CS6", "Flash CS 6", "2.2", 17), + CC("CC", "Flash CC", "2.4", Integer.MAX_VALUE) { + + @Override + public int minASVersion() { + return 3; //AS 1/2 not supported anymore + } + + }; + + private final String xflVersion; + private final String shortName; + private final String applicationName; + private final int maxSwfVersion; + + private static final Map versionToPlayerMap = new HashMap<>(); + + static { + versionToPlayerMap.put(10, "FlashPlayer10.0"); //10 & 10.1 + versionToPlayerMap.put(11, "FlashPlayer10.2"); + versionToPlayerMap.put(12, "FlashPlayer10.3"); + versionToPlayerMap.put(13, "FlashPlayer11.0"); + versionToPlayerMap.put(14, "FlashPlayer11.1"); + versionToPlayerMap.put(15, "FlashPlayer11.2"); + versionToPlayerMap.put(16, "FlashPlayer11.3"); + versionToPlayerMap.put(17, "FlashPlayer11.4"); + versionToPlayerMap.put(18, "FlashPlayer11.5"); + versionToPlayerMap.put(19, "FlashPlayer11.6"); + versionToPlayerMap.put(20, "FlashPlayer11.7"); + versionToPlayerMap.put(21, "FlashPlayer11.8"); + versionToPlayerMap.put(22, "FlashPlayer11.9"); + versionToPlayerMap.put(23, "FlashPlayer12.0"); + } + + private FLAVersion(String shortName, String applicationName, String xflVersion, int maxSwfVersion) { + this.xflVersion = xflVersion; + this.shortName = shortName; + this.applicationName = applicationName; + this.maxSwfVersion = maxSwfVersion; + } + + public String xflVersion() { + return xflVersion; + } + + public int maxSwfVersion() { + return maxSwfVersion; + } + + public int minASVersion() { + return 1; + } + + public String applicationName() { + return applicationName; + } + + public String shortName() { + return shortName; + } + + @Override + public String toString() { + return shortName; + } + + public static String swfVersionToPlayer(int version) { + if (versionToPlayerMap.containsKey(version)) { + return versionToPlayerMap.get(version); + } + return ""; + } + + public static FLAVersion fromString(String s) { + if (s == null) { + return null; + } + for (FLAVersion v : FLAVersion.values()) { + if (v.shortName.toLowerCase().equals(s.toLowerCase())) { + return v; + } + if (v.xflVersion.equals(s)) { + return v; + } + } + return null; + } +} diff --git a/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java similarity index 99% rename from src/com/jpexs/decompiler/flash/xfl/XFLConverter.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index 1de47d401..2f93546d7 100644 --- a/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.xfl; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Block.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Block.java new file mode 100644 index 000000000..a57112caa --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Block.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import com.jpexs.decompiler.graph.model.ContinueItem; +import java.util.List; + +public interface Block { + + public List getContinues(); + + public List> getSubs(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/CompilationException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/CompilationException.java new file mode 100644 index 000000000..d773318ec --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/CompilationException.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +/** + * + * @author JPEXS + */ +public class CompilationException extends Exception { + + public int line; + public String text; + + public CompilationException(String message, int line) { + super("Compilation error on line " + line + ": " + message); + this.line = line; + this.text = message; + } + +} diff --git a/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java similarity index 99% rename from src/com/jpexs/decompiler/graph/Graph.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index 657ba2ea7..1185059b7 100644 --- a/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/graph/GraphPart.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPart.java similarity index 88% rename from src/com/jpexs/decompiler/graph/GraphPart.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPart.java index 2b9174e75..a1ad12dfb 100644 --- a/src/com/jpexs/decompiler/graph/GraphPart.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPart.java @@ -1,270 +1,269 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import com.jpexs.decompiler.flash.BaseLocalData; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class GraphPart implements Serializable { - - public int start = 0; - public int end = 0; - public int instanceCount = 0; - public List nextParts = new ArrayList<>(); - public int posX = -1; - public int posY = -1; - public GraphPath path = new GraphPath(); - public List refs = new ArrayList<>(); - public boolean ignored = false; - public List forContinues = new ArrayList<>(); - public int level; - public int discoveredTime; - public int finishedTime; - public int order; - public List throwParts = new ArrayList<>(); - - public int setTime(int time, List ordered, List visited) { - if (visited.contains(this)) { - return time; - } - discoveredTime = time; - visited.add(this); - for (GraphPart next : nextParts) { - if (!visited.contains(next)) { - time = next.setTime(time + 1, ordered, visited); - } - } - time++; - finishedTime = time; - order = ordered.size(); - ordered.add(this); - return time; - } - - private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List visited, List loops) throws InterruptedException { - if (Thread.currentThread().isInterrupted()) { - throw new InterruptedException(); - } - - GraphPart tpart = gr.checkPart(null, localData, this, null); - if (tpart == null) { - return false; - } - if (tpart != this) { - return tpart.leadsTo(localData, gr, code, part, visited, loops); - } - Loop currentLoop = null; - for (Loop l : loops) { - /*if(l.phase==0){ - if(l.loopContinue==this){ - l.leadsToMark = 1; - next = l.loopBreak; - currentLoop = l; - continue; - } - }*/ - if (l.phase == 1) { - if (l.loopContinue == this) { - return false; - } - if (l.loopPreContinue == this) { - return false; - } - if (l.loopBreak == this) { - //return false; //? - } - } - } - if (visited.contains(this)) { - return false; - } - /*if (loops.contains(this)) { - return false; - }*/ - visited.add(this); - if (end < code.size() && code.get(end).isBranch() && (code.get(end).ignoredLoops())) { - return false; - } - for (GraphPart p : nextParts) { - if (p == part) { - return true; - } else { - if (p.leadsTo(localData, gr, code, part, visited, loops)) { - return true; - } - } - } - for (GraphPart p : throwParts) { - if (p == part) { - return true; - } else { - if (p.leadsTo(localData, gr, code, part, visited, loops)) { - return true; - } - } - } - return false; - } - - public boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List loops) throws InterruptedException { - for (Loop l : loops) { - l.leadsToMark = 0; - } - return leadsTo(localData, gr, code, part, new ArrayList(), loops); - } - - public GraphPart(int start, int end) { - this.start = start; - this.end = end; - } - - private GraphPart getNextPartPath(GraphPart original, GraphPath path, List visited) { - if (visited.contains(this) && (this == original)) { - return null; - } - if (visited.contains(this) && (this != original)) { - return null; - } - visited.add(this); - for (GraphPart p : nextParts) { - if (p == original) { - continue; - } - if (p.path.equals(path)) { - return p; - } else if (p.path.length() >= path.length()) { - GraphPart gp = p.getNextPartPath(original, path, visited); - if (gp != null) { - return gp; - } - } - } - return null; - } - - public GraphPart getNextPartPath(List ignored) { - List visited = new ArrayList<>(); - visited.addAll(ignored); - if (visited.contains(this)) { - visited.remove(this); - } - return getNextPartPath(this, path, visited); - } - - public GraphPart getNextSuperPartPath(List ignored) { - List visited = new ArrayList<>(); - visited.addAll(ignored); - return getNextSuperPartPath(this, path, visited); - } - - private GraphPart getNextSuperPartPath(GraphPart original, GraphPath path, List visited) { - if (visited.contains(this)) { - return null; - } - visited.add(this); - for (GraphPart p : nextParts) { - if (p == original) { - continue; - } - if (p.path.length() < path.length()) { - return p; - } else { - GraphPart gp = p.getNextSuperPartPath(original, path, visited); - if (gp != null) { - return gp; - } - } - } - return null; - } - - @Override - public String toString() { - if (end < start) { - return "<-> " + (start + 1) + "-" + (end + 1); - } - return "" + (start + 1) + "-" + (end + 1) + (instanceCount > 1 ? "(" + instanceCount + " links)" : "");// + " p" + path; - } - - public boolean containsIP(int ip) { - return (ip >= start) && (ip <= end); - } - - private boolean containsPart(GraphPart part, GraphPart what, List used) { - if (used.contains(part)) { - return false; - } - used.add(part); - for (GraphPart subpart : part.nextParts) { - if (subpart == what) { - return true; - } - if (containsPart(subpart, what, used)) { - return true; - } - } - return false; - } - - public int getHeight() { - return end - start + 1; - } - - public int getPosAt(int offset) { - return start + offset; - } - - public boolean containsPart(GraphPart what) { - return containsPart(this, what, new ArrayList()); - } - - public List getSubParts() { - List ret = new ArrayList<>(); - ret.add(this); - return ret; - } - - @Override - public int hashCode() { - int hash = 7; - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (!(obj instanceof GraphPart)) { - return false; - } - final GraphPart other = (GraphPart) obj; - if (this.start != other.start) { - return false; - } - if (this.end != other.end) { - return false; - } - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import com.jpexs.decompiler.flash.BaseLocalData; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class GraphPart implements Serializable { + + public int start = 0; + public int end = 0; + public int instanceCount = 0; + public List nextParts = new ArrayList<>(); + public int posX = -1; + public int posY = -1; + public GraphPath path = new GraphPath(); + public List refs = new ArrayList<>(); + public boolean ignored = false; + public List forContinues = new ArrayList<>(); + public int level; + public int discoveredTime; + public int finishedTime; + public int order; + public List throwParts = new ArrayList<>(); + + public int setTime(int time, List ordered, List visited) { + if (visited.contains(this)) { + return time; + } + discoveredTime = time; + visited.add(this); + for (GraphPart next : nextParts) { + if (!visited.contains(next)) { + time = next.setTime(time + 1, ordered, visited); + } + } + time++; + finishedTime = time; + order = ordered.size(); + ordered.add(this); + return time; + } + + private boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List visited, List loops) throws InterruptedException { + if (Thread.currentThread().isInterrupted()) { + throw new InterruptedException(); + } + + GraphPart tpart = gr.checkPart(null, localData, this, null); + if (tpart == null) { + return false; + } + if (tpart != this) { + return tpart.leadsTo(localData, gr, code, part, visited, loops); + } + Loop currentLoop = null; + for (Loop l : loops) { + /*if(l.phase==0){ + if(l.loopContinue==this){ + l.leadsToMark = 1; + next = l.loopBreak; + currentLoop = l; + continue; + } + }*/ + if (l.phase == 1) { + if (l.loopContinue == this) { + return false; + } + if (l.loopPreContinue == this) { + return false; + } + if (l.loopBreak == this) { + //return false; //? + } + } + } + if (visited.contains(this)) { + return false; + } + /*if (loops.contains(this)) { + return false; + }*/ + visited.add(this); + if (end < code.size() && code.get(end).isBranch() && (code.get(end).ignoredLoops())) { + return false; + } + for (GraphPart p : nextParts) { + if (p == part) { + return true; + } else { + if (p.leadsTo(localData, gr, code, part, visited, loops)) { + return true; + } + } + } + for (GraphPart p : throwParts) { + if (p == part) { + return true; + } else { + if (p.leadsTo(localData, gr, code, part, visited, loops)) { + return true; + } + } + } + return false; + } + + public boolean leadsTo(BaseLocalData localData, Graph gr, GraphSource code, GraphPart part, List loops) throws InterruptedException { + for (Loop l : loops) { + l.leadsToMark = 0; + } + return leadsTo(localData, gr, code, part, new ArrayList(), loops); + } + + public GraphPart(int start, int end) { + this.start = start; + this.end = end; + } + + private GraphPart getNextPartPath(GraphPart original, GraphPath path, List visited) { + if (visited.contains(this) && (this == original)) { + return null; + } + if (visited.contains(this) && (this != original)) { + return null; + } + visited.add(this); + for (GraphPart p : nextParts) { + if (p == original) { + continue; + } + if (p.path.equals(path)) { + return p; + } else if (p.path.length() >= path.length()) { + GraphPart gp = p.getNextPartPath(original, path, visited); + if (gp != null) { + return gp; + } + } + } + return null; + } + + public GraphPart getNextPartPath(List ignored) { + List visited = new ArrayList<>(); + visited.addAll(ignored); + if (visited.contains(this)) { + visited.remove(this); + } + return getNextPartPath(this, path, visited); + } + + public GraphPart getNextSuperPartPath(List ignored) { + List visited = new ArrayList<>(); + visited.addAll(ignored); + return getNextSuperPartPath(this, path, visited); + } + + private GraphPart getNextSuperPartPath(GraphPart original, GraphPath path, List visited) { + if (visited.contains(this)) { + return null; + } + visited.add(this); + for (GraphPart p : nextParts) { + if (p == original) { + continue; + } + if (p.path.length() < path.length()) { + return p; + } else { + GraphPart gp = p.getNextSuperPartPath(original, path, visited); + if (gp != null) { + return gp; + } + } + } + return null; + } + + @Override + public String toString() { + if (end < start) { + return "<-> " + (start + 1) + "-" + (end + 1); + } + return "" + (start + 1) + "-" + (end + 1) + (instanceCount > 1 ? "(" + instanceCount + " links)" : "");// + " p" + path; + } + + public boolean containsIP(int ip) { + return (ip >= start) && (ip <= end); + } + + private boolean containsPart(GraphPart part, GraphPart what, List used) { + if (used.contains(part)) { + return false; + } + used.add(part); + for (GraphPart subpart : part.nextParts) { + if (subpart == what) { + return true; + } + if (containsPart(subpart, what, used)) { + return true; + } + } + return false; + } + + public int getHeight() { + return end - start + 1; + } + + public int getPosAt(int offset) { + return start + offset; + } + + public boolean containsPart(GraphPart what) { + return containsPart(this, what, new ArrayList()); + } + + public List getSubParts() { + List ret = new ArrayList<>(); + ret.add(this); + return ret; + } + + @Override + public int hashCode() { + int hash = 7; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (!(obj instanceof GraphPart)) { + return false; + } + final GraphPart other = (GraphPart) obj; + if (this.start != other.start) { + return false; + } + if (this.end != other.end) { + return false; + } + return true; + } +} diff --git a/src/com/jpexs/decompiler/graph/GraphPartMulti.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPartMulti.java similarity index 65% rename from src/com/jpexs/decompiler/graph/GraphPartMulti.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPartMulti.java index 859b9d0e2..a86e3543e 100644 --- a/src/com/jpexs/decompiler/graph/GraphPartMulti.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPartMulti.java @@ -1,82 +1,81 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.util.Collections; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class GraphPartMulti extends GraphPart { - - public List parts; - - public GraphPartMulti(List parts) { - super(parts.get(0).start, parts.get(parts.size() - 1).end); - this.parts = parts; - this.path = parts.get(0).path; - } - - @Override - public String toString() { - String ret = ""; - ret += "[multi "; - boolean first = true; - for (GraphPart g : parts) { - if (first) { - first = false; - } else { - ret += ", "; - } - ret += g.toString(); - } - ret += "]"; - return ret; - } - - @Override - public int getHeight() { - int ret = 0; - for (GraphPart p : parts) { - ret += p.getHeight(); - } - return ret; - } - - @Override - public int getPosAt(int offset) { - int ofs = 0; - int pos = 0; - for (GraphPart p : parts) { - for (int i = 0; i < p.getHeight(); i++) { - pos = p.start + i; - ofs += 1; - if (ofs == offset) { - return pos; - } - } - } - return -1; - } - - @Override - public List getSubParts() { - return Collections.unmodifiableList(parts); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.util.Collections; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class GraphPartMulti extends GraphPart { + + public List parts; + + public GraphPartMulti(List parts) { + super(parts.get(0).start, parts.get(parts.size() - 1).end); + this.parts = parts; + this.path = parts.get(0).path; + } + + @Override + public String toString() { + String ret = ""; + ret += "[multi "; + boolean first = true; + for (GraphPart g : parts) { + if (first) { + first = false; + } else { + ret += ", "; + } + ret += g.toString(); + } + ret += "]"; + return ret; + } + + @Override + public int getHeight() { + int ret = 0; + for (GraphPart p : parts) { + ret += p.getHeight(); + } + return ret; + } + + @Override + public int getPosAt(int offset) { + int ofs = 0; + int pos = 0; + for (GraphPart p : parts) { + for (int i = 0; i < p.getHeight(); i++) { + pos = p.start + i; + ofs += 1; + if (ofs == offset) { + return pos; + } + } + } + return -1; + } + + @Override + public List getSubParts() { + return Collections.unmodifiableList(parts); + } +} diff --git a/src/com/jpexs/decompiler/graph/GraphPath.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPath.java similarity index 81% rename from src/com/jpexs/decompiler/graph/GraphPath.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPath.java index 9bd3c4024..37f369b73 100644 --- a/src/com/jpexs/decompiler/graph/GraphPath.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphPath.java @@ -1,158 +1,157 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class GraphPath implements Serializable { - - private final List keys = new ArrayList<>(); - private final List vals = new ArrayList<>(); - public String rootName = ""; - - public GraphPath(String rootName, List keys, List vals) { - this.rootName = rootName; - this.keys.addAll(keys); - this.vals.addAll(vals); - } - - public GraphPath(List keys, List vals) { - this.keys.addAll(keys); - this.vals.addAll(vals); - } - - public boolean startsWith(GraphPath p) { - if (p.length() > length()) { - return false; - } - - List otherKeys = new ArrayList<>(p.keys); - List otherVals = new ArrayList<>(p.vals); - - for (int i = 0; i < p.length(); i++) { - if (keys.get(i) != otherKeys.get(i)) { - return false; - } - if (vals.get(i) != otherVals.get(i)) { - return false; - } - } - return true; - } - - public GraphPath parent(int len) { - GraphPath par = new GraphPath(rootName); - for (int i = 0; i < len; i++) { - par.keys.add(keys.get(i)); - par.vals.add(vals.get(i)); - } - return par; - } - - public GraphPath sub(int part, int codePos) { - GraphPath next = new GraphPath(rootName, this.keys, this.vals); - next.keys.add(codePos); - next.vals.add(part); - return next; - } - - public GraphPath(String rootName) { - this.rootName = rootName; - } - - public GraphPath() { - } - - public int length() { - return vals.size(); - } - - public int get(int index) { - return vals.get(index); - } - - public int getKey(int index) { - return keys.get(index); - } - - @Override - public int hashCode() { - int hash = 5; - hash = 23 * hash + (this.keys != null ? this.keys.hashCode() : 0); - hash = 23 * hash + (this.vals != null ? this.vals.hashCode() : 0); - hash = 23 * hash + (this.rootName != null ? this.rootName.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final GraphPath other = (GraphPath) obj; - if (this.rootName == null && other.rootName != null) { - return false; - } - if (this.rootName != null && other.rootName == null) { - return false; - } - - if (this.rootName != null && other.rootName != null) { - if (!this.rootName.equals(other.rootName)) { - return false; - } - } - - if (!arrMatch(keys, other.keys)) { - return false; - } - if (!arrMatch(vals, other.vals)) { - return false; - } - return true; - } - - private static boolean arrMatch(List arr, List arr2) { - if (arr.size() != arr2.size()) { - return false; - } - for (int i = 0; i < arr.size(); i++) { - if (arr.get(i) != arr2.get(i)) { - return false; - } - } - return true; - } - - @Override - public String toString() { - String ret = rootName; - for (int i = 0; i < keys.size(); i++) { - ret += "/" + keys.get(i) + ":" + vals.get(i); - } - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class GraphPath implements Serializable { + + private final List keys = new ArrayList<>(); + private final List vals = new ArrayList<>(); + public String rootName = ""; + + public GraphPath(String rootName, List keys, List vals) { + this.rootName = rootName; + this.keys.addAll(keys); + this.vals.addAll(vals); + } + + public GraphPath(List keys, List vals) { + this.keys.addAll(keys); + this.vals.addAll(vals); + } + + public boolean startsWith(GraphPath p) { + if (p.length() > length()) { + return false; + } + + List otherKeys = new ArrayList<>(p.keys); + List otherVals = new ArrayList<>(p.vals); + + for (int i = 0; i < p.length(); i++) { + if (keys.get(i) != otherKeys.get(i)) { + return false; + } + if (vals.get(i) != otherVals.get(i)) { + return false; + } + } + return true; + } + + public GraphPath parent(int len) { + GraphPath par = new GraphPath(rootName); + for (int i = 0; i < len; i++) { + par.keys.add(keys.get(i)); + par.vals.add(vals.get(i)); + } + return par; + } + + public GraphPath sub(int part, int codePos) { + GraphPath next = new GraphPath(rootName, this.keys, this.vals); + next.keys.add(codePos); + next.vals.add(part); + return next; + } + + public GraphPath(String rootName) { + this.rootName = rootName; + } + + public GraphPath() { + } + + public int length() { + return vals.size(); + } + + public int get(int index) { + return vals.get(index); + } + + public int getKey(int index) { + return keys.get(index); + } + + @Override + public int hashCode() { + int hash = 5; + hash = 23 * hash + (this.keys != null ? this.keys.hashCode() : 0); + hash = 23 * hash + (this.vals != null ? this.vals.hashCode() : 0); + hash = 23 * hash + (this.rootName != null ? this.rootName.hashCode() : 0); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphPath other = (GraphPath) obj; + if (this.rootName == null && other.rootName != null) { + return false; + } + if (this.rootName != null && other.rootName == null) { + return false; + } + + if (this.rootName != null && other.rootName != null) { + if (!this.rootName.equals(other.rootName)) { + return false; + } + } + + if (!arrMatch(keys, other.keys)) { + return false; + } + if (!arrMatch(vals, other.vals)) { + return false; + } + return true; + } + + private static boolean arrMatch(List arr, List arr2) { + if (arr.size() != arr2.size()) { + return false; + } + for (int i = 0; i < arr.size(); i++) { + if (arr.get(i) != arr2.get(i)) { + return false; + } + } + return true; + } + + @Override + public String toString() { + String ret = rootName; + for (int i = 0; i < keys.size(); i++) { + ret += "/" + keys.get(i) + ":" + vals.get(i); + } + return ret; + } +} diff --git a/src/com/jpexs/decompiler/graph/GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java similarity index 81% rename from src/com/jpexs/decompiler/graph/GraphSource.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java index 88a015692..71241bb16 100644 --- a/src/com/jpexs/decompiler/graph/GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSource.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/graph/GraphSourceItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItem.java similarity index 52% rename from src/com/jpexs/decompiler/graph/GraphSourceItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItem.java index baf4d9722..1ce3f1921 100644 --- a/src/com/jpexs/decompiler/graph/GraphSourceItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.BaseLocalData; diff --git a/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java similarity index 54% rename from src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java index c1eaaa45c..d7c129726 100644 --- a/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemContainer.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java new file mode 100644 index 000000000..e005e69f5 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.io.Serializable; + +/** + * + * @author JPEXS + */ +public class GraphSourceItemPos implements Serializable { + + public GraphSourceItem item; + public int pos; + + public GraphSourceItemPos(GraphSourceItem item, int pos) { + this.item = item; + this.pos = pos; + } +} diff --git a/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java similarity index 91% rename from src/com/jpexs/decompiler/graph/GraphTargetItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index e82507d51..39fb2e4cd 100644 --- a/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/graph/Loop.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Loop.java similarity index 57% rename from src/com/jpexs/decompiler/graph/Loop.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Loop.java index 36e652c07..a3ed442a0 100644 --- a/src/com/jpexs/decompiler/graph/Loop.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Loop.java @@ -1,50 +1,49 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class Loop implements Serializable { - - public GraphPart loopContinue; - public GraphPart loopBreak; - public GraphPart loopPreContinue; - public List breakCandidates = new ArrayList<>(); - public List breakCandidatesLevels = new ArrayList<>(); - public long id; - public int leadsToMark; - public int reachableMark; - public int phase; - public int breakCandidatesLocked = 0; - - public Loop(long id, GraphPart loopContinue, GraphPart loopBreak) { - this.loopContinue = loopContinue; - this.loopBreak = loopBreak; - this.id = id; - } - - @Override - public String toString() { - return "loop(id:" + id + (loopPreContinue != null ? ",precontinue:" + loopPreContinue : "") + ",continue:" + loopContinue + ", break:" + loopBreak + ", phase:" + phase + ")"; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class Loop implements Serializable { + + public GraphPart loopContinue; + public GraphPart loopBreak; + public GraphPart loopPreContinue; + public List breakCandidates = new ArrayList<>(); + public List breakCandidatesLevels = new ArrayList<>(); + public long id; + public int leadsToMark; + public int reachableMark; + public int phase; + public int breakCandidatesLocked = 0; + + public Loop(long id, GraphPart loopContinue, GraphPart loopBreak) { + this.loopContinue = loopContinue; + this.loopBreak = loopBreak; + this.id = id; + } + + @Override + public String toString() { + return "loop(id:" + id + (loopPreContinue != null ? ",precontinue:" + loopPreContinue : "") + ",continue:" + loopContinue + ", break:" + loopBreak + ", phase:" + phase + ")"; + } +} diff --git a/src/com/jpexs/decompiler/graph/MarkItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java similarity index 55% rename from src/com/jpexs/decompiler/graph/MarkItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java index 8baa4a3ac..eab086535 100644 --- a/src/com/jpexs/decompiler/graph/MarkItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/MarkItem.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import com.jpexs.decompiler.flash.AppStrings; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class MarkItem extends GraphTargetItem { - - private final String mark; - - public MarkItem(String mark) { - super(null, NOPRECEDENCE); - this.mark = mark; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("//" + AppStrings.translate("decompilerMark") + ":" + mark); - } - - public String getMark() { - return mark; - } - - @Override - public boolean isEmpty() { - return true; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import com.jpexs.decompiler.flash.AppStrings; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.model.LocalData; + +/** + * + * @author JPEXS + */ +public class MarkItem extends GraphTargetItem { + + private final String mark; + + public MarkItem(String mark) { + super(null, NOPRECEDENCE); + this.mark = mark; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("//" + AppStrings.translate("decompilerMark") + ":" + mark); + } + + public String getMark() { + return mark; + } + + @Override + public boolean isEmpty() { + return true; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java similarity index 60% rename from src/com/jpexs/decompiler/graph/NotCompileTimeItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java index a9e14c6ec..12f299b4f 100644 --- a/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/NotCompileTimeItem.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public class NotCompileTimeItem extends GraphTargetItem { - - public GraphTargetItem object; - - public NotCompileTimeItem(GraphSourceItem instruction, GraphTargetItem object) { - super(instruction, NOPRECEDENCE); - this.object = object; - } - - @Override - public boolean isCompileTime(Set dependencies) { - return false; - } - - @Override - public GraphTargetItem getThroughNotCompilable() { - if (object == null) { - return object; - } - return object.getThroughNotCompilable(); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return object.toString(writer, localData); - } - - @Override - public boolean hasReturnValue() { - return object.hasReturnValue(); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public class NotCompileTimeItem extends GraphTargetItem { + + public GraphTargetItem object; + + public NotCompileTimeItem(GraphSourceItem instruction, GraphTargetItem object) { + super(instruction, NOPRECEDENCE); + this.object = object; + } + + @Override + public boolean isCompileTime(Set dependencies) { + return false; + } + + @Override + public GraphTargetItem getThroughNotCompilable() { + if (object == null) { + return object; + } + return object.getThroughNotCompilable(); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return object.toString(writer, localData); + } + + @Override + public boolean hasReturnValue() { + return object.hasReturnValue(); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/ScopeStack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/ScopeStack.java new file mode 100644 index 000000000..203bd6992 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/ScopeStack.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.util.Stack; + +/** + * + * @author JPEXS + */ +public class ScopeStack extends Stack { + +} diff --git a/src/com/jpexs/decompiler/graph/SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/SourceGenerator.java similarity index 80% rename from src/com/jpexs/decompiler/graph/SourceGenerator.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/SourceGenerator.java index 8ff393676..9383f89a3 100644 --- a/src/com/jpexs/decompiler/graph/SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/SourceGenerator.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateException.java new file mode 100644 index 000000000..3d7005db5 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateException.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +/** + * + * @author JPEXS + */ +public class TranslateException extends RuntimeException { + + public TranslateException(String s) { + super(s); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java new file mode 100644 index 000000000..afab7b975 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TranslateStack.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import java.util.Stack; + +/** + * + * @author JPEXS + */ +public class TranslateStack extends Stack { + +} diff --git a/src/com/jpexs/decompiler/graph/TypeFunctionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java similarity index 75% rename from src/com/jpexs/decompiler/graph/TypeFunctionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java index 47ca12e33..c27b6c5ff 100644 --- a/src/com/jpexs/decompiler/graph/TypeFunctionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeFunctionItem.java @@ -1,85 +1,84 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; -import com.jpexs.decompiler.graph.model.UnboundedTypeItem; -import java.util.Objects; - -/** - * - * @author JPEXS - */ -public class TypeFunctionItem extends GraphTargetItem { - - public static TypeFunctionItem BOOLEAN = new TypeFunctionItem("Boolean"); - public static TypeFunctionItem STRING = new TypeFunctionItem("String"); - public static TypeFunctionItem ARRAY = new TypeFunctionItem("Array"); - public static UnboundedTypeItem UNBOUNDED = new UnboundedTypeItem(); - - public String fullTypeName; - - public TypeFunctionItem(String fullTypeName) { - super(null, NOPRECEDENCE); - this.fullTypeName = fullTypeName; - } - - @Override - public int hashCode() { - int hash = 7; - hash = 83 * hash + Objects.hashCode(this.fullTypeName); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final TypeFunctionItem other = (TypeFunctionItem) obj; - if (!Objects.equals(this.fullTypeName, other.fullTypeName)) { - return false; - } - return true; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append(fullTypeName); - return writer; - } - - @Override - public GraphTargetItem returnType() { - return this; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public String toString() { - return "Function[" + fullTypeName + "]"; - } - -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.decompiler.graph.model.UnboundedTypeItem; +import java.util.Objects; + +/** + * + * @author JPEXS + */ +public class TypeFunctionItem extends GraphTargetItem { + + public static TypeFunctionItem BOOLEAN = new TypeFunctionItem("Boolean"); + public static TypeFunctionItem STRING = new TypeFunctionItem("String"); + public static TypeFunctionItem ARRAY = new TypeFunctionItem("Array"); + public static UnboundedTypeItem UNBOUNDED = new UnboundedTypeItem(); + + public String fullTypeName; + + public TypeFunctionItem(String fullTypeName) { + super(null, NOPRECEDENCE); + this.fullTypeName = fullTypeName; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 83 * hash + Objects.hashCode(this.fullTypeName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TypeFunctionItem other = (TypeFunctionItem) obj; + if (!Objects.equals(this.fullTypeName, other.fullTypeName)) { + return false; + } + return true; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append(fullTypeName); + return writer; + } + + @Override + public GraphTargetItem returnType() { + return this; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public String toString() { + return "Function[" + fullTypeName + "]"; + } + +} diff --git a/src/com/jpexs/decompiler/graph/TypeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java similarity index 82% rename from src/com/jpexs/decompiler/graph/TypeItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java index 8ae8fcfe1..f246b5ca8 100644 --- a/src/com/jpexs/decompiler/graph/TypeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/src/com/jpexs/decompiler/graph/model/AndItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java similarity index 64% rename from src/com/jpexs/decompiler/graph/model/AndItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java index aa4b003f3..56d34bf78 100644 --- a/src/com/jpexs/decompiler/graph/model/AndItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/AndItem.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -public class AndItem extends BinaryOpItem { - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(leftSide.getNeededSources()); - ret.addAll(rightSide.getNeededSources()); - return ret; - } - - public AndItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(src, PRECEDENCE_LOGICALAND, leftSide, rightSide, "&&"); - this.leftSide = leftSide; - this.rightSide = rightSide; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +public class AndItem extends BinaryOpItem { + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(leftSide.getNeededSources()); + ret.addAll(rightSide.getNeededSources()); + return ret; + } + + public AndItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(src, PRECEDENCE_LOGICALAND, leftSide, rightSide, "&&"); + this.leftSide = leftSide; + this.rightSide = rightSide; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java new file mode 100644 index 000000000..a8290206a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.graph.GraphTargetItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public interface BinaryOp { + + public GraphTargetItem getLeftSide(); + + public GraphTargetItem getRightSide(); + + public void setLeftSide(GraphTargetItem value); + + public void setRightSide(GraphTargetItem value); + + public int getPrecedence(); + + public List getAllSubItems(); +} diff --git a/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java similarity index 85% rename from src/com/jpexs/decompiler/graph/model/BinaryOpItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java index 5ceaca95b..553ff8d61 100644 --- a/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java @@ -1,199 +1,198 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphPart; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp { - - public GraphTargetItem leftSide; - public GraphTargetItem rightSide; - protected String operator = ""; - - @Override - public GraphPart getFirstPart() { - GraphPart fp = leftSide.getFirstPart(); - if (fp == null) { - return super.getFirstPart(); - } - return fp; - } - - public BinaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem leftSide, GraphTargetItem rightSide, String operator) { - super(instruction, precedence); - this.leftSide = leftSide; - this.rightSide = rightSide; - this.operator = operator; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (leftSide.getPrecedence() > precedence) { - writer.append("("); - leftSide.toString(writer, localData); - writer.append(")"); - } else { - leftSide.toString(writer, localData); - } - - writer.append(" "); - writer.append(operator); - writer.append(" "); - - if (rightSide.getPrecedence() > precedence) { - writer.append("("); - rightSide.toString(writer, localData); - writer.append(")"); - } else { - rightSide.toString(writer, localData); - } - return writer; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(leftSide.getNeededSources()); - ret.addAll(rightSide.getNeededSources()); - return ret; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(leftSide)) { - return false; - } - dependencies.add(leftSide); - if (leftSide != rightSide && dependencies.contains(rightSide)) { - return false; - } - dependencies.add(rightSide); - return leftSide.isCompileTime(dependencies) && rightSide.isCompileTime(dependencies); - } - - @Override - public boolean isVariableComputed() { - return leftSide.isVariableComputed() || rightSide.isVariableComputed(); - } - - @Override - public boolean hasSideEffect() { - return leftSide.hasSideEffect() || rightSide.hasSideEffect(); - } - - @Override - public int hashCode() { - int hash = 7; - hash = 71 * hash + (this.leftSide != null ? this.leftSide.hashCode() : 0); - hash = 71 * hash + (this.rightSide != null ? this.rightSide.hashCode() : 0); - hash = 71 * hash + (this.operator != null ? this.operator.hashCode() : 0); - return hash; - } - - public GraphTargetItem getLeftMostItem(GraphTargetItem item) { - GraphTargetItem ret = item; - if (ret instanceof BinaryOpItem) { - ret = ((BinaryOpItem) ret).getLeftMostItem(); - } - return ret; - } - - public GraphTargetItem getLeftMostItem() { - GraphTargetItem ret = leftSide; - if (ret instanceof BinaryOpItem) { - ret = ((BinaryOpItem) ret).getLeftMostItem(); - } - return ret; - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final BinaryOpItem other = (BinaryOpItem) obj; - if (this.leftSide != other.leftSide && (this.leftSide == null || !this.leftSide.equals(other.leftSide))) { - return false; - } - if (this.rightSide != other.rightSide && (this.rightSide == null || !this.rightSide.equals(other.rightSide))) { - return false; - } - if ((this.operator == null) ? (other.operator != null) : !this.operator.equals(other.operator)) { - return false; - } - return true; - } - - /*@Override - public boolean toBoolean() { - double val=toNumber(); - if(Double.isNaN(val)){ - return false; - } - if(Double.compare(val, 0)==0){ - return false; - } - return true; - }*/ - @Override - public GraphTargetItem getLeftSide() { - return leftSide; - } - - @Override - public GraphTargetItem getRightSide() { - return rightSide; - } - - @Override - public void setLeftSide(GraphTargetItem value) { - leftSide = value; - } - - @Override - public void setRightSide(GraphTargetItem value) { - rightSide = value; - } - - @Override - public int getPrecedence() { - return precedence; - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public List getAllSubItems() { - List ret = new ArrayList<>(); - ret.add(getLeftSide()); - ret.add(getRightSide()); - return ret; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphPart; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp { + + public GraphTargetItem leftSide; + public GraphTargetItem rightSide; + protected String operator = ""; + + @Override + public GraphPart getFirstPart() { + GraphPart fp = leftSide.getFirstPart(); + if (fp == null) { + return super.getFirstPart(); + } + return fp; + } + + public BinaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem leftSide, GraphTargetItem rightSide, String operator) { + super(instruction, precedence); + this.leftSide = leftSide; + this.rightSide = rightSide; + this.operator = operator; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (leftSide.getPrecedence() > precedence) { + writer.append("("); + leftSide.toString(writer, localData); + writer.append(")"); + } else { + leftSide.toString(writer, localData); + } + + writer.append(" "); + writer.append(operator); + writer.append(" "); + + if (rightSide.getPrecedence() > precedence) { + writer.append("("); + rightSide.toString(writer, localData); + writer.append(")"); + } else { + rightSide.toString(writer, localData); + } + return writer; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(leftSide.getNeededSources()); + ret.addAll(rightSide.getNeededSources()); + return ret; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(leftSide)) { + return false; + } + dependencies.add(leftSide); + if (leftSide != rightSide && dependencies.contains(rightSide)) { + return false; + } + dependencies.add(rightSide); + return leftSide.isCompileTime(dependencies) && rightSide.isCompileTime(dependencies); + } + + @Override + public boolean isVariableComputed() { + return leftSide.isVariableComputed() || rightSide.isVariableComputed(); + } + + @Override + public boolean hasSideEffect() { + return leftSide.hasSideEffect() || rightSide.hasSideEffect(); + } + + @Override + public int hashCode() { + int hash = 7; + hash = 71 * hash + (this.leftSide != null ? this.leftSide.hashCode() : 0); + hash = 71 * hash + (this.rightSide != null ? this.rightSide.hashCode() : 0); + hash = 71 * hash + (this.operator != null ? this.operator.hashCode() : 0); + return hash; + } + + public GraphTargetItem getLeftMostItem(GraphTargetItem item) { + GraphTargetItem ret = item; + if (ret instanceof BinaryOpItem) { + ret = ((BinaryOpItem) ret).getLeftMostItem(); + } + return ret; + } + + public GraphTargetItem getLeftMostItem() { + GraphTargetItem ret = leftSide; + if (ret instanceof BinaryOpItem) { + ret = ((BinaryOpItem) ret).getLeftMostItem(); + } + return ret; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final BinaryOpItem other = (BinaryOpItem) obj; + if (this.leftSide != other.leftSide && (this.leftSide == null || !this.leftSide.equals(other.leftSide))) { + return false; + } + if (this.rightSide != other.rightSide && (this.rightSide == null || !this.rightSide.equals(other.rightSide))) { + return false; + } + if ((this.operator == null) ? (other.operator != null) : !this.operator.equals(other.operator)) { + return false; + } + return true; + } + + /*@Override + public boolean toBoolean() { + double val=toNumber(); + if(Double.isNaN(val)){ + return false; + } + if(Double.compare(val, 0)==0){ + return false; + } + return true; + }*/ + @Override + public GraphTargetItem getLeftSide() { + return leftSide; + } + + @Override + public GraphTargetItem getRightSide() { + return rightSide; + } + + @Override + public void setLeftSide(GraphTargetItem value) { + leftSide = value; + } + + @Override + public void setRightSide(GraphTargetItem value) { + rightSide = value; + } + + @Override + public int getPrecedence() { + return precedence; + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public List getAllSubItems() { + List ret = new ArrayList<>(); + ret.add(getLeftSide()); + ret.add(getRightSide()); + return ret; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/BlockItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java similarity index 65% rename from src/com/jpexs/decompiler/graph/model/BlockItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java index 781fe2d84..646111311 100644 --- a/src/com/jpexs/decompiler/graph/model/BlockItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BlockItem.java @@ -1,63 +1,62 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.Graph; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class BlockItem extends GraphTargetItem { - - List commands; - - public BlockItem(GraphSourceItem src, List commands) { - super(src, PRECEDENCE_PRIMARY); - this.commands = commands; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.startBlock(); - Graph.graphToString(commands, writer, localData); - return writer.endBlock(); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, commands); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.Graph; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class BlockItem extends GraphTargetItem { + + List commands; + + public BlockItem(GraphSourceItem src, List commands) { + super(src, PRECEDENCE_PRIMARY); + this.commands = commands; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.startBlock(); + Graph.graphToString(commands, writer, localData); + return writer.endBlock(); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, commands); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/BreakItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java similarity index 68% rename from src/com/jpexs/decompiler/graph/model/BreakItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java index c07287404..8533980a7 100644 --- a/src/com/jpexs/decompiler/graph/model/BreakItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BreakItem.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class BreakItem extends GraphTargetItem { - - public long loopId; - private boolean labelRequired; - - public BreakItem(GraphSourceItem src, long loopId) { - super(src, NOPRECEDENCE); - this.loopId = loopId; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("break"); - if (writer instanceof NulWriter) { - NulWriter nulWriter = (NulWriter) writer; - labelRequired = loopId != nulWriter.getLoop(); - if (labelRequired) { - nulWriter.setLoopUsed(loopId); - } - } - if (labelRequired) { - writer.append(" loop" + loopId); - } - return writer; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class BreakItem extends GraphTargetItem { + + public long loopId; + private boolean labelRequired; + + public BreakItem(GraphSourceItem src, long loopId) { + super(src, NOPRECEDENCE); + this.loopId = loopId; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("break"); + if (writer instanceof NulWriter) { + NulWriter nulWriter = (NulWriter) writer; + labelRequired = loopId != nulWriter.getLoop(); + if (labelRequired) { + nulWriter.setLoopUsed(loopId); + } + } + if (labelRequired) { + writer.append(" loop" + loopId); + } + return writer; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java similarity index 67% rename from src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java index dcab3ff7d..e9019cc7c 100644 --- a/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommaExpressionItem.java @@ -1,68 +1,67 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class CommaExpressionItem extends GraphTargetItem { - - public List commands; - - public CommaExpressionItem(GraphSourceItem src, List commands) { - super(src, PRECEDENCE_PRIMARY); - this.commands = commands; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - boolean first = true; - for (GraphTargetItem t : commands) { - if (!first) { - writer.append(", "); - } - t.toString(writer, localData); - first = false; - } - return writer; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return commands.isEmpty() ? TypeItem.UNBOUNDED : commands.get(commands.size() - 1).returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class CommaExpressionItem extends GraphTargetItem { + + public List commands; + + public CommaExpressionItem(GraphSourceItem src, List commands) { + super(src, PRECEDENCE_PRIMARY); + this.commands = commands; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + boolean first = true; + for (GraphTargetItem t : commands) { + if (!first) { + writer.append(", "); + } + t.toString(writer, localData); + first = false; + } + return writer; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return commands.isEmpty() ? TypeItem.UNBOUNDED : commands.get(commands.size() - 1).returnType(); + } +} diff --git a/src/com/jpexs/decompiler/graph/model/CommentItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java similarity index 64% rename from src/com/jpexs/decompiler/graph/model/CommentItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java index b717b7554..35e8e3ee7 100644 --- a/src/com/jpexs/decompiler/graph/model/CommentItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java @@ -1,76 +1,75 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; - -/** - * - * @author JPEXS - */ -public class CommentItem extends GraphTargetItem { - - private final String[] commentLines; - - public CommentItem(String comment) { - super(null, NOPRECEDENCE); - this.commentLines = new String[]{comment}; - } - - public CommentItem(String[] commentLines) { - super(null, NOPRECEDENCE); - this.commentLines = commentLines; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("/* "); - for (int i = 0; i < commentLines.length; i++) { - writer.append(commentLines[i]); - if (i != commentLines.length - 1) { - writer.newLine(); - } - } - return writer.append(" */"); - } - - public String[] getCommentLines() { - return commentLines; - } - - @Override - public boolean isEmpty() { - return false; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; + +/** + * + * @author JPEXS + */ +public class CommentItem extends GraphTargetItem { + + private final String[] commentLines; + + public CommentItem(String comment) { + super(null, NOPRECEDENCE); + this.commentLines = new String[]{comment}; + } + + public CommentItem(String[] commentLines) { + super(null, NOPRECEDENCE); + this.commentLines = commentLines; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("/* "); + for (int i = 0; i < commentLines.length; i++) { + writer.append(commentLines[i]); + if (i != commentLines.length - 1) { + writer.newLine(); + } + } + return writer.append(" */"); + } + + public String[] getCommentLines() { + return commentLines; + } + + @Override + public boolean isEmpty() { + return false; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/ContinueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java similarity index 68% rename from src/com/jpexs/decompiler/graph/model/ContinueItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java index 823b78d1a..d3a35a18e 100644 --- a/src/com/jpexs/decompiler/graph/model/ContinueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ContinueItem.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ContinueItem extends GraphTargetItem { - - public long loopId; - private boolean labelRequired; - - public ContinueItem(GraphSourceItem src, long loopId) { - super(src, NOPRECEDENCE); - this.loopId = loopId; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - writer.append("continue"); - if (writer instanceof NulWriter) { - NulWriter nulWriter = (NulWriter) writer; - labelRequired = loopId != nulWriter.getNonSwitchLoop(); - if (labelRequired) { - nulWriter.setLoopUsed(loopId); - } - } - if (labelRequired) { - writer.append(" loop" + loopId); - } - return writer; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ContinueItem extends GraphTargetItem { + + public long loopId; + private boolean labelRequired; + + public ContinueItem(GraphSourceItem src, long loopId) { + super(src, NOPRECEDENCE); + this.loopId = loopId; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("continue"); + if (writer instanceof NulWriter) { + NulWriter nulWriter = (NulWriter) writer; + labelRequired = loopId != nulWriter.getNonSwitchLoop(); + if (labelRequired) { + nulWriter.setLoopUsed(loopId); + } + } + if (labelRequired) { + writer.append(" loop" + loopId); + } + return writer; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/DoWhileItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java similarity index 81% rename from src/com/jpexs/decompiler/graph/model/DoWhileItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java index 733f3a37b..6029b227f 100644 --- a/src/com/jpexs/decompiler/graph/model/DoWhileItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DoWhileItem.java @@ -1,127 +1,126 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; - -public class DoWhileItem extends LoopItem implements Block { - - public List commands; - public List expression; - private boolean labelUsed; - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (commands != null) { - ret.add(commands); - } - return ret; - } - - public DoWhileItem(GraphSourceItem src, Loop loop, List commands, List expression) { - super(src, loop); - this.expression = expression; - this.commands = commands; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("do"); - writer.startBlock(); - for (GraphTargetItem ti : commands) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - writer.endBlock().newLine(); - writer.append("while"); - if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { - writer.append(" "); - } - writer.append("("); - - for (int i = 0; i < expression.size(); i++) { - if (expression.get(i).isEmpty()) { - continue; - } - if (i != 0) { - writer.append(", "); - } - expression.get(i).toString(writer, localData); - } - - writer.append(");").newLine(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : commands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; + +public class DoWhileItem extends LoopItem implements Block { + + public List commands; + public List expression; + private boolean labelUsed; + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (commands != null) { + ret.add(commands); + } + return ret; + } + + public DoWhileItem(GraphSourceItem src, Loop loop, List commands, List expression) { + super(src, loop); + this.expression = expression; + this.commands = commands; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("do"); + writer.startBlock(); + for (GraphTargetItem ti : commands) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + writer.endBlock().newLine(); + writer.append("while"); + if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { + writer.append(" "); + } + writer.append("("); + + for (int i = 0; i < expression.size(); i++) { + if (expression.get(i).isEmpty()) { + continue; + } + if (i != 0) { + writer.append(", "); + } + expression.get(i).toString(writer, localData); + } + + writer.append(");").newLine(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : commands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/DuplicateItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java similarity index 72% rename from src/com/jpexs/decompiler/graph/model/DuplicateItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java index 89c120349..52f138364 100644 --- a/src/com/jpexs/decompiler/graph/model/DuplicateItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/DuplicateItem.java @@ -1,93 +1,92 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public class DuplicateItem extends GraphTargetItem { - - public DuplicateItem(GraphSourceItem src, GraphTargetItem value) { - super(src, value.getPrecedence()); - this.value = value; - } - - @Override - public Object getResult() { - return value.getResult(); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - return value.toString(writer, localData); - } - - @Override - public GraphTargetItem getNotCoerced() { - return value.getNotCoerced(); - } - - @Override - public GraphTargetItem getThroughRegister() { - return value.getThroughRegister(); - } - - @Override - public GraphTargetItem getThroughDuplicate() { - return value.getThroughDuplicate(); - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public boolean isVariableComputed() { - return value.isVariableComputed(); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public class DuplicateItem extends GraphTargetItem { + + public DuplicateItem(GraphSourceItem src, GraphTargetItem value) { + super(src, value.getPrecedence()); + this.value = value; + } + + @Override + public Object getResult() { + return value.getResult(); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + return value.toString(writer, localData); + } + + @Override + public GraphTargetItem getNotCoerced() { + return value.getNotCoerced(); + } + + @Override + public GraphTargetItem getThroughRegister() { + return value.getThroughRegister(); + } + + @Override + public GraphTargetItem getThroughDuplicate() { + return value.getThroughDuplicate(); + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public boolean isVariableComputed() { + return value.isVariableComputed(); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ExitItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ExitItem.java new file mode 100644 index 000000000..e168fd815 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ExitItem.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +/** + * + * @author JPEXS + */ +public interface ExitItem { +} diff --git a/src/com/jpexs/decompiler/graph/model/ForItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java similarity index 83% rename from src/com/jpexs/decompiler/graph/model/ForItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java index b6c750ced..ecf93b1d9 100644 --- a/src/com/jpexs/decompiler/graph/model/ForItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ForItem.java @@ -1,150 +1,149 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; - -public class ForItem extends LoopItem implements Block { - - public List firstCommands; - public GraphTargetItem expression; - public List finalCommands; - public List commands; - private boolean labelUsed; - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (firstCommands != null) { - ret.add(firstCommands); - } - if (commands != null) { - ret.add(commands); - } - if (finalCommands != null) { - ret.add(finalCommands); - } - return ret; - } - - public ForItem(GraphSourceItem src, Loop loop, List firstCommands, GraphTargetItem expression, List finalCommands, List commands) { - super(src, loop); - this.firstCommands = firstCommands; - this.expression = expression; - this.finalCommands = finalCommands; - this.commands = commands; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("for"); - if (writer.getFormatting().spaceBeforeParenthesesForParentheses) { - writer.append(" "); - } - writer.append("("); - int p = 0; - for (int i = 0; i < firstCommands.size(); i++) { - if (firstCommands.get(i).isEmpty()) { - continue; - } - - if (p > 0) { - writer.append(","); - } - firstCommands.get(i).toString(writer, localData); - p++; - } - writer.append(";"); - expression.toString(writer, localData); - writer.append(";"); - p = 0; - for (int i = 0; i < finalCommands.size(); i++) { - if (finalCommands.get(i).isEmpty()) { - continue; - } - if (p > 0) { - writer.append(","); - } - finalCommands.get(i).toString(writer, localData); - p++; - } - writer.append(")").startBlock(); - for (GraphTargetItem ti : commands) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - writer.endBlock(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : commands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; + +public class ForItem extends LoopItem implements Block { + + public List firstCommands; + public GraphTargetItem expression; + public List finalCommands; + public List commands; + private boolean labelUsed; + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (firstCommands != null) { + ret.add(firstCommands); + } + if (commands != null) { + ret.add(commands); + } + if (finalCommands != null) { + ret.add(finalCommands); + } + return ret; + } + + public ForItem(GraphSourceItem src, Loop loop, List firstCommands, GraphTargetItem expression, List finalCommands, List commands) { + super(src, loop); + this.firstCommands = firstCommands; + this.expression = expression; + this.finalCommands = finalCommands; + this.commands = commands; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("for"); + if (writer.getFormatting().spaceBeforeParenthesesForParentheses) { + writer.append(" "); + } + writer.append("("); + int p = 0; + for (int i = 0; i < firstCommands.size(); i++) { + if (firstCommands.get(i).isEmpty()) { + continue; + } + + if (p > 0) { + writer.append(","); + } + firstCommands.get(i).toString(writer, localData); + p++; + } + writer.append(";"); + expression.toString(writer, localData); + writer.append(";"); + p = 0; + for (int i = 0; i < finalCommands.size(); i++) { + if (finalCommands.get(i).isEmpty()) { + continue; + } + if (p > 0) { + writer.append(","); + } + finalCommands.get(i).toString(writer, localData); + p++; + } + writer.append(")").startBlock(); + for (GraphTargetItem ti : commands) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + writer.endBlock(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : commands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/IfItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java similarity index 84% rename from src/com/jpexs/decompiler/graph/model/IfItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java index bd6613f9a..419468e2a 100644 --- a/src/com/jpexs/decompiler/graph/model/IfItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IfItem.java @@ -1,164 +1,163 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -public class IfItem extends GraphTargetItem implements Block { - - public GraphTargetItem expression; - public List onTrue; - public List onFalse; - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(expression)) { - return false; - } - dependencies.add(expression); - return expression.isCompileTime(dependencies); - } - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (onTrue != null) { - ret.add(onTrue); - } - if (onFalse != null) { - ret.add(onFalse); - } - return ret; - } - - public IfItem(GraphSourceItem src, GraphTargetItem expression, List onTrue, List onFalse) { - super(src, NOPRECEDENCE); - this.expression = expression; - this.onTrue = onTrue; - this.onFalse = onFalse; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - GraphTargetItem expr = expression; - List ifBranch = onTrue; - List elseBranch = onFalse; - if (onTrue.isEmpty()) { - if (onFalse.isEmpty()) { - if (expr instanceof NotItem) { - expr = ((NotItem) expr).getOriginal(); - } - } else { - if (expr instanceof LogicalOpItem) { - expr = ((LogicalOpItem) expr).invert(); - } else { - expr = new NotItem(null, expr); - } - ifBranch = onFalse; - elseBranch = onTrue; - } - } - writer.append("if"); - if (writer.getFormatting().spaceBeforeParenthesesIfParentheses) { - writer.append(" "); - } - writer.append("("); - expr.toString(writer, localData); - writer.append(")").startBlock(); - for (GraphTargetItem ti : ifBranch) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - writer.endBlock(); - if (elseBranch.size() > 0) { - boolean elseIf = elseBranch.size() == 1 && (elseBranch.get(0) instanceof IfItem); - if (writer.getFormatting().beginBlockOnNewLine) { - writer.newLine(); - } else { - writer.append(" "); - } - writer.append("else"); - if (!elseIf) { - writer.startBlock(); - } else { - writer.append(" "); - } - for (GraphTargetItem ti : elseBranch) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - if (!elseIf) { - writer.endBlock(); - } - } - return writer; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : onTrue) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - for (GraphTargetItem ti : onFalse) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class IfItem extends GraphTargetItem implements Block { + + public GraphTargetItem expression; + public List onTrue; + public List onFalse; + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(expression)) { + return false; + } + dependencies.add(expression); + return expression.isCompileTime(dependencies); + } + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (onTrue != null) { + ret.add(onTrue); + } + if (onFalse != null) { + ret.add(onFalse); + } + return ret; + } + + public IfItem(GraphSourceItem src, GraphTargetItem expression, List onTrue, List onFalse) { + super(src, NOPRECEDENCE); + this.expression = expression; + this.onTrue = onTrue; + this.onFalse = onFalse; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + GraphTargetItem expr = expression; + List ifBranch = onTrue; + List elseBranch = onFalse; + if (onTrue.isEmpty()) { + if (onFalse.isEmpty()) { + if (expr instanceof NotItem) { + expr = ((NotItem) expr).getOriginal(); + } + } else { + if (expr instanceof LogicalOpItem) { + expr = ((LogicalOpItem) expr).invert(); + } else { + expr = new NotItem(null, expr); + } + ifBranch = onFalse; + elseBranch = onTrue; + } + } + writer.append("if"); + if (writer.getFormatting().spaceBeforeParenthesesIfParentheses) { + writer.append(" "); + } + writer.append("("); + expr.toString(writer, localData); + writer.append(")").startBlock(); + for (GraphTargetItem ti : ifBranch) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + writer.endBlock(); + if (elseBranch.size() > 0) { + boolean elseIf = elseBranch.size() == 1 && (elseBranch.get(0) instanceof IfItem); + if (writer.getFormatting().beginBlockOnNewLine) { + writer.newLine(); + } else { + writer.append(" "); + } + writer.append("else"); + if (!elseIf) { + writer.startBlock(); + } else { + writer.append(" "); + } + for (GraphTargetItem ti : elseBranch) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + if (!elseIf) { + writer.endBlock(); + } + } + return writer; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : onTrue) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + for (GraphTargetItem ti : onFalse) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java similarity index 58% rename from src/com/jpexs/decompiler/graph/model/IntegerValueItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java index a6965f386..9e0469723 100644 --- a/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java @@ -1,62 +1,61 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public class IntegerValueItem extends GraphTargetItem { - - private final int intValue; - - public IntegerValueItem(GraphSourceItem src, int value) { - super(src, PRECEDENCE_PRIMARY); - this.intValue = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("" + intValue); - } - - @Override - public boolean isCompileTime(Set dependencies) { - return true; - } - - @Override - public Object getResult() { - return Double.valueOf(intValue); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public class IntegerValueItem extends GraphTargetItem { + + private final int intValue; + + public IntegerValueItem(GraphSourceItem src, int value) { + super(src, PRECEDENCE_PRIMARY); + this.intValue = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("" + intValue); + } + + @Override + public boolean isCompileTime(Set dependencies) { + return true; + } + + @Override + public Object getResult() { + return Double.valueOf(intValue); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/LocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LocalData.java similarity index 59% rename from src/com/jpexs/decompiler/graph/model/LocalData.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LocalData.java index 99cfcecc2..f3ccde5b0 100644 --- a/src/com/jpexs/decompiler/graph/model/LocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LocalData.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.action.model.ConstantPool; -import java.util.HashMap; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class LocalData { - - public static LocalData empty = new LocalData(); - public ConstantPool constants; - public com.jpexs.decompiler.flash.abc.avm2.ConstantPool constantsAvm2; - public HashMap localRegNames; - public List fullyQualifiedNames; - - public static LocalData create(ConstantPool constants) { - LocalData localData = new LocalData(); - localData.constants = constants; - return localData; - } - - public static LocalData create(com.jpexs.decompiler.flash.abc.avm2.ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { - LocalData localData = new LocalData(); - localData.constantsAvm2 = constants; - localData.localRegNames = localRegNames; - localData.fullyQualifiedNames = fullyQualifiedNames; - return localData; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.action.model.ConstantPool; +import java.util.HashMap; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class LocalData { + + public static LocalData empty = new LocalData(); + public ConstantPool constants; + public com.jpexs.decompiler.flash.abc.avm2.ConstantPool constantsAvm2; + public HashMap localRegNames; + public List fullyQualifiedNames; + + public static LocalData create(ConstantPool constants) { + LocalData localData = new LocalData(); + localData.constants = constants; + return localData; + } + + public static LocalData create(com.jpexs.decompiler.flash.abc.avm2.ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { + LocalData localData = new LocalData(); + localData.constantsAvm2 = constants; + localData.localRegNames = localRegNames; + localData.fullyQualifiedNames = fullyQualifiedNames; + return localData; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java new file mode 100644 index 000000000..ee7eff16a --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public interface LogicalOpItem { + + public GraphTargetItem invert(); +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java new file mode 100644 index 000000000..de0307048 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/LoopItem.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; + +public abstract class LoopItem extends GraphTargetItem { + + public Loop loop; + + public LoopItem(GraphSourceItem src, Loop loop) { + super(src, NOPRECEDENCE); + this.loop = loop; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/NotItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java similarity index 70% rename from src/com/jpexs/decompiler/graph/model/NotItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java index 20a3b296f..e71266a59 100644 --- a/src/com/jpexs/decompiler/graph/model/NotItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/NotItem.java @@ -1,84 +1,83 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.action.model.operations.Inverted; -import com.jpexs.decompiler.flash.ecma.EcmaScript; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public class NotItem extends UnaryOpItem implements LogicalOpItem, Inverted { - - public NotItem(GraphSourceItem instruction, GraphTargetItem value) { - super(instruction, PRECEDENCE_UNARY, value, "!"); - } - - @Override - public Object getResult() { - Object ret = EcmaScript.toBoolean(value.getResult()); - if (ret == Boolean.TRUE) { - return Boolean.FALSE; - } - if (ret == Boolean.FALSE) { - return Boolean.TRUE; - } - return ret; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public GraphTargetItem invert() { - return value; - } - - public GraphTargetItem getOriginal() { - return value; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.action.model.operations.Inverted; +import com.jpexs.decompiler.flash.ecma.EcmaScript; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; +import java.util.Set; + +/** + * + * @author JPEXS + */ +public class NotItem extends UnaryOpItem implements LogicalOpItem, Inverted { + + public NotItem(GraphSourceItem instruction, GraphTargetItem value) { + super(instruction, PRECEDENCE_UNARY, value, "!"); + } + + @Override + public Object getResult() { + Object ret = EcmaScript.toBoolean(value.getResult()); + if (ret == Boolean.TRUE) { + return Boolean.FALSE; + } + if (ret == Boolean.FALSE) { + return Boolean.TRUE; + } + return ret; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public GraphTargetItem invert() { + return value; + } + + public GraphTargetItem getOriginal() { + return value; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/OrItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java similarity index 64% rename from src/com/jpexs/decompiler/graph/model/OrItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java index ceb993fe1..a225c7299 100644 --- a/src/com/jpexs/decompiler/graph/model/OrItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java @@ -1,58 +1,57 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.List; - -public class OrItem extends BinaryOpItem { - - public OrItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { - super(src, PRECEDENCE_LOGICALOR, leftSide, rightSide, "||"); - this.leftSide = leftSide; - this.rightSide = rightSide; - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(leftSide.getNeededSources()); - ret.addAll(rightSide.getNeededSources()); - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.List; + +public class OrItem extends BinaryOpItem { + + public OrItem(GraphSourceItem src, GraphTargetItem leftSide, GraphTargetItem rightSide) { + super(src, PRECEDENCE_LOGICALOR, leftSide, rightSide, "||"); + this.leftSide = leftSide; + this.rightSide = rightSide; + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(leftSide.getNeededSources()); + ret.addAll(rightSide.getNeededSources()); + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java similarity index 63% rename from src/com/jpexs/decompiler/graph/model/ParenthesisItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java index 1316161bf..e53034df0 100644 --- a/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ParenthesisItem.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ParenthesisItem extends GraphTargetItem { - - public ParenthesisItem(GraphSourceItem src, GraphTargetItem value) { - super(src, PRECEDENCE_PRIMARY); - this.value = value; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("("); - value.toString(writer, localData); - return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return value.toSource(localData, generator); - } - - @Override - public boolean hasReturnValue() { - return value.hasReturnValue(); - } - - @Override - public GraphTargetItem returnType() { - return value.returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class ParenthesisItem extends GraphTargetItem { + + public ParenthesisItem(GraphSourceItem src, GraphTargetItem value) { + super(src, PRECEDENCE_PRIMARY); + this.value = value; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("("); + value.toString(writer, localData); + return writer.append(")"); + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return value.toSource(localData, generator); + } + + @Override + public boolean hasReturnValue() { + return value.hasReturnValue(); + } + + @Override + public GraphTargetItem returnType() { + return value.returnType(); + } +} diff --git a/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java similarity index 53% rename from src/com/jpexs/decompiler/graph/model/ScriptEndItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java index 1ca9e3d92..33d2220d3 100644 --- a/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java @@ -1,57 +1,56 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; - -/** - * - * @author JPEXS - */ -public class ScriptEndItem extends GraphTargetItem implements ExitItem { - - public ScriptEndItem() { - super(null, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public boolean isEmpty() { - return true; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; + +/** + * + * @author JPEXS + */ +public class ScriptEndItem extends GraphTargetItem implements ExitItem { + + public ScriptEndItem() { + super(null, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public boolean isEmpty() { + return true; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/SwitchItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java similarity index 85% rename from src/com/jpexs/decompiler/graph/model/SwitchItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java index 96fa3f3c9..46d407da2 100644 --- a/src/com/jpexs/decompiler/graph/model/SwitchItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/SwitchItem.java @@ -1,159 +1,158 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; - -public class SwitchItem extends LoopItem implements Block { - - public GraphTargetItem switchedObject; - public List caseValues; - public List> caseCommands; - public List defaultCommands; - public List valuesMapping; - private boolean labelUsed; - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - ret.addAll(caseCommands); - if (defaultCommands != null) { - ret.add(defaultCommands); - } - return ret; - } - - public SwitchItem(GraphSourceItem instruction, Loop loop, GraphTargetItem switchedObject, List caseValues, List> caseCommands, List defaultCommands, List valuesMapping) { - super(instruction, loop); - this.switchedObject = switchedObject; - this.caseValues = caseValues; - this.caseCommands = caseCommands; - this.defaultCommands = defaultCommands; - this.valuesMapping = valuesMapping; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_SWITCH); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("switch"); - if (writer.getFormatting().spaceBeforeParenthesesSwitchParentheses) { - writer.append(" "); - } - writer.append("("); - switchedObject.toString(writer, localData); - writer.append(")").startBlock(); - for (int i = 0; i < caseCommands.size(); i++) { - for (int k = 0; k < valuesMapping.size(); k++) { - if (valuesMapping.get(k) == i) { - writer.append("case "); - caseValues.get(k).toString(writer, localData); - writer.append(":").newLine(); - } - } - writer.indent(); - for (int j = 0; j < caseCommands.get(i).size(); j++) { - if (!caseCommands.get(i).get(j).isEmpty()) { - caseCommands.get(i).get(j).toStringSemicoloned(writer, localData).newLine(); - } - } - writer.unindent(); - } - if (defaultCommands != null) { - if (defaultCommands.size() > 0) { - writer.append("default"); - writer.append(":").newLine(); - writer.indent(); - for (int j = 0; j < defaultCommands.size(); j++) { - if (!defaultCommands.get(j).isEmpty()) { - defaultCommands.get(j).toStringSemicoloned(writer, localData).newLine(); - } - } - writer.unindent(); - } - } - writer.endBlock(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - - for (List onecase : caseCommands) { - for (GraphTargetItem ti : onecase) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - } - if (defaultCommands != null) { - for (GraphTargetItem ti : defaultCommands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - } - return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; + +public class SwitchItem extends LoopItem implements Block { + + public GraphTargetItem switchedObject; + public List caseValues; + public List> caseCommands; + public List defaultCommands; + public List valuesMapping; + private boolean labelUsed; + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + ret.addAll(caseCommands); + if (defaultCommands != null) { + ret.add(defaultCommands); + } + return ret; + } + + public SwitchItem(GraphSourceItem instruction, Loop loop, GraphTargetItem switchedObject, List caseValues, List> caseCommands, List defaultCommands, List valuesMapping) { + super(instruction, loop); + this.switchedObject = switchedObject; + this.caseValues = caseValues; + this.caseCommands = caseCommands; + this.defaultCommands = defaultCommands; + this.valuesMapping = valuesMapping; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_SWITCH); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("switch"); + if (writer.getFormatting().spaceBeforeParenthesesSwitchParentheses) { + writer.append(" "); + } + writer.append("("); + switchedObject.toString(writer, localData); + writer.append(")").startBlock(); + for (int i = 0; i < caseCommands.size(); i++) { + for (int k = 0; k < valuesMapping.size(); k++) { + if (valuesMapping.get(k) == i) { + writer.append("case "); + caseValues.get(k).toString(writer, localData); + writer.append(":").newLine(); + } + } + writer.indent(); + for (int j = 0; j < caseCommands.get(i).size(); j++) { + if (!caseCommands.get(i).get(j).isEmpty()) { + caseCommands.get(i).get(j).toStringSemicoloned(writer, localData).newLine(); + } + } + writer.unindent(); + } + if (defaultCommands != null) { + if (defaultCommands.size() > 0) { + writer.append("default"); + writer.append(":").newLine(); + writer.indent(); + for (int j = 0; j < defaultCommands.size(); j++) { + if (!defaultCommands.get(j).isEmpty()) { + defaultCommands.get(j).toStringSemicoloned(writer, localData).newLine(); + } + } + writer.unindent(); + } + } + writer.endBlock(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + + for (List onecase : caseCommands) { + for (GraphTargetItem ti : onecase) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + } + if (defaultCommands != null) { + for (GraphTargetItem ti : defaultCommands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + } + return ret; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/TernarOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java similarity index 67% rename from src/com/jpexs/decompiler/graph/model/TernarOpItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java index 72b691da2..93cfff012 100644 --- a/src/com/jpexs/decompiler/graph/model/TernarOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java @@ -1,64 +1,63 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SourceGenerator; -import java.util.List; - -public class TernarOpItem extends GraphTargetItem { - - public GraphTargetItem expression; - public GraphTargetItem onTrue; - public GraphTargetItem onFalse; - - public TernarOpItem(GraphSourceItem src, GraphTargetItem expression, GraphTargetItem onTrue, GraphTargetItem onFalse) { - super(src, PRECEDENCE_CONDITIONAL); - this.expression = expression; - this.onTrue = onTrue; - this.onFalse = onFalse; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - expression.toString(writer, localData); - writer.append("?"); - onTrue.toString(writer, localData); - writer.append(":"); - onFalse.toString(writer, localData); - return writer; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return onTrue.returnType(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.SourceGenerator; +import java.util.List; + +public class TernarOpItem extends GraphTargetItem { + + public GraphTargetItem expression; + public GraphTargetItem onTrue; + public GraphTargetItem onFalse; + + public TernarOpItem(GraphSourceItem src, GraphTargetItem expression, GraphTargetItem onTrue, GraphTargetItem onFalse) { + super(src, PRECEDENCE_CONDITIONAL); + this.expression = expression; + this.onTrue = onTrue; + this.onFalse = onFalse; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + expression.toString(writer, localData); + writer.append("?"); + onTrue.toString(writer, localData); + writer.append(":"); + onFalse.toString(writer, localData); + return writer; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return onTrue.returnType(); + } +} diff --git a/src/com/jpexs/decompiler/graph/model/TrueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java similarity index 50% rename from src/com/jpexs/decompiler/graph/model/TrueItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java index d2f71a87c..f8f314f4f 100644 --- a/src/com/jpexs/decompiler/graph/model/TrueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java @@ -1,48 +1,47 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TypeItem; - -/** - * - * @author JPEXS - */ -public class TrueItem extends GraphTargetItem { - - public TrueItem(GraphSourceItem src) { - super(src, PRECEDENCE_PRIMARY); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("true"); - } - - @Override - public boolean hasReturnValue() { - return true; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.BOOLEAN; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TypeItem; + +/** + * + * @author JPEXS + */ +public class TrueItem extends GraphTargetItem { + + public TrueItem(GraphSourceItem src) { + super(src, PRECEDENCE_PRIMARY); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + return writer.append("true"); + } + + @Override + public boolean hasReturnValue() { + return true; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.BOOLEAN; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOp.java new file mode 100644 index 000000000..33904c691 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOp.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public interface UnaryOp { + + public GraphTargetItem getValue(); + + public int getPrecedence(); +} diff --git a/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java similarity index 73% rename from src/com/jpexs/decompiler/graph/model/UnaryOpItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java index edc825d92..3dede24b1 100644 --- a/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java @@ -1,94 +1,93 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphSourceItemPos; -import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.List; -import java.util.Set; - -public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp { - - public GraphTargetItem value; - public String operator; - - public UnaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem value, String operator) { - super(instruction, precedence); - this.value = value; - this.operator = operator; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append(operator); - if (value != null) { - if (value.getPrecedence() > precedence) { - writer.append("("); - value.toString(writer, localData); - writer.append(")"); - } else { - value.toString(writer, localData); - } - } else { - writer.append("null"); - } - return writer; - } - - @Override - public boolean isCompileTime(Set dependencies) { - if (dependencies.contains(value)) { - return false; - } - dependencies.add(value); - return value.isCompileTime(dependencies); - } - - @Override - public boolean isVariableComputed() { - return value.isVariableComputed(); - } - - @Override - public List getNeededSources() { - List ret = super.getNeededSources(); - ret.addAll(value.getNeededSources()); - return ret; - } - - @Override - public boolean hasSideEffect() { - return value.hasSideEffect(); - } - - @Override - public int getPrecedence() { - return precedence; - } - - @Override - public GraphTargetItem getValue() { - return value; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphSourceItemPos; +import com.jpexs.decompiler.graph.GraphTargetItem; +import java.util.List; +import java.util.Set; + +public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp { + + public GraphTargetItem value; + public String operator; + + public UnaryOpItem(GraphSourceItem instruction, int precedence, GraphTargetItem value, String operator) { + super(instruction, precedence); + this.value = value; + this.operator = operator; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append(operator); + if (value != null) { + if (value.getPrecedence() > precedence) { + writer.append("("); + value.toString(writer, localData); + writer.append(")"); + } else { + value.toString(writer, localData); + } + } else { + writer.append("null"); + } + return writer; + } + + @Override + public boolean isCompileTime(Set dependencies) { + if (dependencies.contains(value)) { + return false; + } + dependencies.add(value); + return value.isCompileTime(dependencies); + } + + @Override + public boolean isVariableComputed() { + return value.isVariableComputed(); + } + + @Override + public List getNeededSources() { + List ret = super.getNeededSources(); + ret.addAll(value.getNeededSources()); + return ret; + } + + @Override + public boolean hasSideEffect() { + return value.hasSideEffect(); + } + + @Override + public int getPrecedence() { + return precedence; + } + + @Override + public GraphTargetItem getValue() { + return value; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java similarity index 60% rename from src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java index fbc7adce8..ea2103c7e 100644 --- a/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnboundedTypeItem.java @@ -1,53 +1,52 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public class UnboundedTypeItem extends AVM2Item { - - public UnboundedTypeItem() { - super(null, NOPRECEDENCE); - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - writer.append("*"); - return writer; - } - - @Override - public GraphTargetItem returnType() { - return this; - } - - @Override - public String toString() { - return "*"; - } - - @Override - public boolean hasReturnValue() { - return true; - } -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.graph.GraphTargetItem; + +/** + * + * @author JPEXS + */ +public class UnboundedTypeItem extends AVM2Item { + + public UnboundedTypeItem() { + super(null, NOPRECEDENCE); + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + writer.append("*"); + return writer; + } + + @Override + public GraphTargetItem returnType() { + return this; + } + + @Override + public String toString() { + return "*"; + } + + @Override + public boolean hasReturnValue() { + return true; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java similarity index 76% rename from src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java index de29c804d..85af847d7 100644 --- a/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UniversalLoopItem.java @@ -1,106 +1,105 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class UniversalLoopItem extends LoopItem implements Block { - - public List commands; - private boolean labelUsed; - - public UniversalLoopItem(GraphSourceItem src, Loop loop) { - super(src, loop); - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("while"); - if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { - writer.append(" "); - } - writer.append("(true)").startBlock(); - for (GraphTargetItem ti : commands) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - writer.endBlock(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : commands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (commands != null) { - ret.add(commands); - } - return ret; - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class UniversalLoopItem extends LoopItem implements Block { + + public List commands; + private boolean labelUsed; + + public UniversalLoopItem(GraphSourceItem src, Loop loop) { + super(src, loop); + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("while"); + if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { + writer.append(" "); + } + writer.append("(true)").startBlock(); + for (GraphTargetItem ti : commands) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + writer.endBlock(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : commands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (commands != null) { + ret.add(commands); + } + return ret; + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/decompiler/graph/model/WhileItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java similarity index 80% rename from src/com/jpexs/decompiler/graph/model/WhileItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java index 66da324bd..a24df215d 100644 --- a/src/com/jpexs/decompiler/graph/model/WhileItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/WhileItem.java @@ -1,124 +1,123 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.flash.helpers.LoopWithType; -import com.jpexs.decompiler.flash.helpers.NulWriter; -import com.jpexs.decompiler.graph.Block; -import com.jpexs.decompiler.graph.CompilationException; -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; -import com.jpexs.decompiler.graph.SourceGenerator; -import com.jpexs.decompiler.graph.TypeItem; -import java.util.ArrayList; -import java.util.List; - -public class WhileItem extends LoopItem implements Block { - - public List expression; - public List commands; - private boolean labelUsed; - - @Override - public List> getSubs() { - List> ret = new ArrayList<>(); - if (commands != null) { - ret.add(commands); - } - return ret; - } - - public WhileItem(GraphSourceItem src, Loop loop, List expression, List commands) { - super(src, loop); - this.expression = expression; - this.commands = commands; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (writer instanceof NulWriter) { - ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); - } - if (labelUsed) { - writer.append("loop" + loop.id + ":").newLine(); - } - writer.append("while"); - if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { - writer.append(" "); - } - writer.append("("); - for (int i = 0; i < expression.size(); i++) { - if (expression.get(i).isEmpty()) { - continue; - } - if (i != 0) { - writer.append(", "); - } - expression.get(i).toString(writer, localData); - } - writer.append(")"); - writer.startBlock(); - for (GraphTargetItem ti : commands) { - if (!ti.isEmpty()) { - ti.toStringSemicoloned(writer, localData).newLine(); - } - } - writer.endBlock(); - if (writer instanceof NulWriter) { - LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); - labelUsed = loopOjb.used; - } - return writer; - } - - @Override - public List getContinues() { - List ret = new ArrayList<>(); - for (GraphTargetItem ti : commands) { - if (ti instanceof ContinueItem) { - ret.add((ContinueItem) ti); - } - if (ti instanceof Block) { - ret.addAll(((Block) ti).getContinues()); - } - } - return ret; - } - - @Override - public boolean needsSemicolon() { - return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return generator.generate(localData, this); - } - - @Override - public boolean hasReturnValue() { - return false; - } - - @Override - public GraphTargetItem returnType() { - return TypeItem.UNBOUNDED; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.graph.model; + +import com.jpexs.decompiler.flash.SourceGeneratorLocalData; +import com.jpexs.decompiler.flash.helpers.GraphTextWriter; +import com.jpexs.decompiler.flash.helpers.LoopWithType; +import com.jpexs.decompiler.flash.helpers.NulWriter; +import com.jpexs.decompiler.graph.Block; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.GraphSourceItem; +import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.Loop; +import com.jpexs.decompiler.graph.SourceGenerator; +import com.jpexs.decompiler.graph.TypeItem; +import java.util.ArrayList; +import java.util.List; + +public class WhileItem extends LoopItem implements Block { + + public List expression; + public List commands; + private boolean labelUsed; + + @Override + public List> getSubs() { + List> ret = new ArrayList<>(); + if (commands != null) { + ret.add(commands); + } + return ret; + } + + public WhileItem(GraphSourceItem src, Loop loop, List expression, List commands) { + super(src, loop); + this.expression = expression; + this.commands = commands; + } + + @Override + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + if (writer instanceof NulWriter) { + ((NulWriter) writer).startLoop(loop.id, LoopWithType.LOOP_TYPE_LOOP); + } + if (labelUsed) { + writer.append("loop" + loop.id + ":").newLine(); + } + writer.append("while"); + if (writer.getFormatting().spaceBeforeParenthesesWhileParentheses) { + writer.append(" "); + } + writer.append("("); + for (int i = 0; i < expression.size(); i++) { + if (expression.get(i).isEmpty()) { + continue; + } + if (i != 0) { + writer.append(", "); + } + expression.get(i).toString(writer, localData); + } + writer.append(")"); + writer.startBlock(); + for (GraphTargetItem ti : commands) { + if (!ti.isEmpty()) { + ti.toStringSemicoloned(writer, localData).newLine(); + } + } + writer.endBlock(); + if (writer instanceof NulWriter) { + LoopWithType loopOjb = ((NulWriter) writer).endLoop(loop.id); + labelUsed = loopOjb.used; + } + return writer; + } + + @Override + public List getContinues() { + List ret = new ArrayList<>(); + for (GraphTargetItem ti : commands) { + if (ti instanceof ContinueItem) { + ret.add((ContinueItem) ti); + } + if (ti instanceof Block) { + ret.addAll(((Block) ti).getContinues()); + } + } + return ret; + } + + @Override + public boolean needsSemicolon() { + return false; + } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return generator.generate(localData, this); + } + + @Override + public boolean hasReturnValue() { + return false; + } + + @Override + public GraphTargetItem returnType() { + return TypeItem.UNBOUNDED; + } +} diff --git a/src/com/jpexs/helpers/ByteArrayRange.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java similarity index 50% rename from src/com/jpexs/helpers/ByteArrayRange.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java index 4ca4d2870..dd9a9c9d0 100644 --- a/src/com/jpexs/helpers/ByteArrayRange.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; /** diff --git a/src/com/jpexs/helpers/Cache.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java similarity index 84% rename from src/com/jpexs/helpers/Cache.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java index 4e016af15..d16adc439 100644 --- a/src/com/jpexs/helpers/Cache.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Cache.java @@ -1,182 +1,181 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.WeakHashMap; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author JPEXS - * @param - */ -public class Cache { - - private final Map cacheFiles; - private final Map cacheMemory; - private static final List instances = new ArrayList<>(); - public static final int STORAGE_FILES = 1; - public static final int STORAGE_MEMORY = 2; - - public static Cache getInstance(boolean weak) { - Cache instance = new Cache<>(weak); - instances.add(instance); - return instance; - } - - private static int storageType = STORAGE_FILES; - - public static void clearAll() { - for (Cache c : instances) { - c.clear(); - } - } - - public static void setStorageType(int storageType) { - if (storageType == Cache.storageType) { - return; - } - switch (storageType) { - case STORAGE_FILES: - case STORAGE_MEMORY: - break; - default: - throw new IllegalArgumentException("storageType must be one of STORAGE_FILES or STORAGE_MEMORY"); - } - if (storageType != Cache.storageType) { - clearAll(); - } - Cache.storageType = storageType; - } - - public static int getStorageType() { - return storageType; - } - - private Cache(boolean weak) { - if (weak) { - cacheFiles = new WeakHashMap<>(); - cacheMemory = new WeakHashMap<>(); - } else { - cacheFiles = new HashMap<>(); - cacheMemory = new HashMap<>(); - } - } - - public boolean contains(Object key) { - if (storageType == STORAGE_FILES) { - return cacheFiles.containsKey(key); - } else if (storageType == STORAGE_MEMORY) { - return cacheMemory.containsKey(key); - } - return false; - } - - public void clear() { - cacheMemory.clear(); - for (File f : cacheFiles.values()) { - f.delete(); - } - cacheFiles.clear(); - } - - public void remove(Object key) { - if (storageType == STORAGE_FILES) { - if (cacheFiles.containsKey(key)) { - File f = cacheFiles.get(key); - f.delete(); - cacheFiles.remove(key); - } - } else if (storageType == STORAGE_MEMORY) { - if (cacheMemory.containsKey(key)) { - cacheMemory.remove(key); - } - } - - } - - public E get(Object key) { - if (storageType == STORAGE_FILES) { - if (!cacheFiles.containsKey(key)) { - return null; - } - File f = cacheFiles.get(key); - try (FileInputStream fis = new FileInputStream(f)) { - ObjectInputStream ois = new ObjectInputStream(fis); - @SuppressWarnings("unchecked") - E item = (E) ois.readObject(); - return item; - } catch (IOException | ClassNotFoundException ex) { - Logger.getLogger(Helper.class.getName()).log(Level.SEVERE, null, ex); - } - return null; - } else if (storageType == STORAGE_MEMORY) { - if (cacheMemory.containsKey(key)) { - return cacheMemory.get(key); - } - return null; - } - return null; - } - - public void put(Object key, E value) { - if (storageType == STORAGE_FILES) { - File temp = null; - try { - temp = File.createTempFile("ffdec_cache", ".tmp"); - } catch (IOException ex) { - Logger.getLogger(Cache.class - .getName()).log(Level.SEVERE, null, ex); - - return; - } - try { - temp.deleteOnExit(); - } catch (IllegalStateException iex) { - return; - } - try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(temp))) { - if (value instanceof Serializable) { - oos.writeObject(value); - } else { - // Object serialization not supported - return; - } - oos.flush(); - - cacheFiles.put(key, temp); - - } catch (IOException ex) { - //ignore - } - } else if (storageType == STORAGE_MEMORY) { - cacheMemory.put(key, value); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.WeakHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author JPEXS + * @param + */ +public class Cache { + + private final Map cacheFiles; + private final Map cacheMemory; + private static final List instances = new ArrayList<>(); + public static final int STORAGE_FILES = 1; + public static final int STORAGE_MEMORY = 2; + + public static Cache getInstance(boolean weak) { + Cache instance = new Cache<>(weak); + instances.add(instance); + return instance; + } + + private static int storageType = STORAGE_FILES; + + public static void clearAll() { + for (Cache c : instances) { + c.clear(); + } + } + + public static void setStorageType(int storageType) { + if (storageType == Cache.storageType) { + return; + } + switch (storageType) { + case STORAGE_FILES: + case STORAGE_MEMORY: + break; + default: + throw new IllegalArgumentException("storageType must be one of STORAGE_FILES or STORAGE_MEMORY"); + } + if (storageType != Cache.storageType) { + clearAll(); + } + Cache.storageType = storageType; + } + + public static int getStorageType() { + return storageType; + } + + private Cache(boolean weak) { + if (weak) { + cacheFiles = new WeakHashMap<>(); + cacheMemory = new WeakHashMap<>(); + } else { + cacheFiles = new HashMap<>(); + cacheMemory = new HashMap<>(); + } + } + + public boolean contains(Object key) { + if (storageType == STORAGE_FILES) { + return cacheFiles.containsKey(key); + } else if (storageType == STORAGE_MEMORY) { + return cacheMemory.containsKey(key); + } + return false; + } + + public void clear() { + cacheMemory.clear(); + for (File f : cacheFiles.values()) { + f.delete(); + } + cacheFiles.clear(); + } + + public void remove(Object key) { + if (storageType == STORAGE_FILES) { + if (cacheFiles.containsKey(key)) { + File f = cacheFiles.get(key); + f.delete(); + cacheFiles.remove(key); + } + } else if (storageType == STORAGE_MEMORY) { + if (cacheMemory.containsKey(key)) { + cacheMemory.remove(key); + } + } + + } + + public E get(Object key) { + if (storageType == STORAGE_FILES) { + if (!cacheFiles.containsKey(key)) { + return null; + } + File f = cacheFiles.get(key); + try (FileInputStream fis = new FileInputStream(f)) { + ObjectInputStream ois = new ObjectInputStream(fis); + @SuppressWarnings("unchecked") + E item = (E) ois.readObject(); + return item; + } catch (IOException | ClassNotFoundException ex) { + Logger.getLogger(Helper.class.getName()).log(Level.SEVERE, null, ex); + } + return null; + } else if (storageType == STORAGE_MEMORY) { + if (cacheMemory.containsKey(key)) { + return cacheMemory.get(key); + } + return null; + } + return null; + } + + public void put(Object key, E value) { + if (storageType == STORAGE_FILES) { + File temp = null; + try { + temp = File.createTempFile("ffdec_cache", ".tmp"); + } catch (IOException ex) { + Logger.getLogger(Cache.class + .getName()).log(Level.SEVERE, null, ex); + + return; + } + try { + temp.deleteOnExit(); + } catch (IllegalStateException iex) { + return; + } + try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(temp))) { + if (value instanceof Serializable) { + oos.writeObject(value); + } else { + // Object serialization not supported + return; + } + oos.flush(); + + cacheFiles.put(key, temp); + + } catch (IOException ex) { + //ignore + } + } else if (storageType == STORAGE_MEMORY) { + cacheMemory.put(key, value); + } + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Callback.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Callback.java new file mode 100644 index 000000000..7e13585ef --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Callback.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +/** + * Class with helper method + * + * @author JPEXS + * @param + */ +public abstract class Callback { + + public abstract void call(T arg1); +} diff --git a/src/com/jpexs/helpers/CancellableWorker.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java similarity index 78% rename from src/com/jpexs/helpers/CancellableWorker.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java index 955af410e..7cf7c21af 100644 --- a/src/com/jpexs/helpers/CancellableWorker.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/CancellableWorker.java @@ -1,129 +1,128 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.FutureTask; -import java.util.concurrent.RunnableFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -/** - * - * @author JPEXS - * @param - */ -public abstract class CancellableWorker implements RunnableFuture { - - private static final ExecutorService THREAD_POOL = Executors.newCachedThreadPool(); - private static List workers = Collections.synchronizedList(new ArrayList()); - private final FutureTask future; - - public CancellableWorker() { - super(); - Callable callable - = new Callable() { - @Override - public T call() throws Exception { - return doInBackground(); - } - }; - - future = new FutureTask(callable) { - @Override - protected void done() { - workerDone(); - } - }; - } - - protected abstract T doInBackground() throws Exception; - - @Override - public final void run() { - workers.add(this); - future.run(); - } - - protected void done() { - } - - public final void execute() { - THREAD_POOL.execute(this); - } - - @Override - public final boolean cancel(boolean mayInterruptIfRunning) { - return future.cancel(mayInterruptIfRunning); - } - - @Override - public final boolean isCancelled() { - return future.isCancelled(); - } - - @Override - public final boolean isDone() { - return future.isDone(); - } - - @Override - public final T get() throws InterruptedException, ExecutionException { - return future.get(); - } - - @Override - public final T get(long timeout, TimeUnit unit) throws InterruptedException, - ExecutionException, TimeoutException { - return future.get(timeout, unit); - } - - private void workerDone() { - workers.remove(this); - done(); - } - - public static T call(final Callable c, long timeout, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { - CancellableWorker worker = new CancellableWorker() { - - @Override - protected T doInBackground() throws Exception { - return c.call(); - } - }; - try { - worker.execute(); - return worker.get(timeout, timeUnit); - } finally { - worker.cancel(true); - } - } - - public static void cancelBackgroundThreads() { - List oldWorkers = workers; - workers = new ArrayList<>(); - for (CancellableWorker worker : oldWorkers) { - worker.cancel(true); - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.RunnableFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +/** + * + * @author JPEXS + * @param + */ +public abstract class CancellableWorker implements RunnableFuture { + + private static final ExecutorService THREAD_POOL = Executors.newCachedThreadPool(); + private static List workers = Collections.synchronizedList(new ArrayList()); + private final FutureTask future; + + public CancellableWorker() { + super(); + Callable callable + = new Callable() { + @Override + public T call() throws Exception { + return doInBackground(); + } + }; + + future = new FutureTask(callable) { + @Override + protected void done() { + workerDone(); + } + }; + } + + protected abstract T doInBackground() throws Exception; + + @Override + public final void run() { + workers.add(this); + future.run(); + } + + protected void done() { + } + + public final void execute() { + THREAD_POOL.execute(this); + } + + @Override + public final boolean cancel(boolean mayInterruptIfRunning) { + return future.cancel(mayInterruptIfRunning); + } + + @Override + public final boolean isCancelled() { + return future.isCancelled(); + } + + @Override + public final boolean isDone() { + return future.isDone(); + } + + @Override + public final T get() throws InterruptedException, ExecutionException { + return future.get(); + } + + @Override + public final T get(long timeout, TimeUnit unit) throws InterruptedException, + ExecutionException, TimeoutException { + return future.get(timeout, unit); + } + + private void workerDone() { + workers.remove(this); + done(); + } + + public static T call(final Callable c, long timeout, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { + CancellableWorker worker = new CancellableWorker() { + + @Override + protected T doInBackground() throws Exception { + return c.call(); + } + }; + try { + worker.execute(); + return worker.get(timeout, timeUnit); + } finally { + worker.cancel(true); + } + } + + public static void cancelBackgroundThreads() { + List oldWorkers = workers; + workers = new ArrayList<>(); + for (CancellableWorker worker : oldWorkers) { + worker.cancel(true); + } + } +} diff --git a/src/com/jpexs/helpers/Helper.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java similarity index 97% rename from src/com/jpexs/helpers/Helper.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java index 3bf91a610..ae87367bc 100644 --- a/src/com/jpexs/helpers/Helper.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import com.jpexs.decompiler.flash.AppStrings; diff --git a/src/com/jpexs/helpers/ImmediateFuture.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java similarity index 57% rename from src/com/jpexs/helpers/ImmediateFuture.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java index 35bd8123f..1649907f0 100644 --- a/src/com/jpexs/helpers/ImmediateFuture.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ImmediateFuture.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import java.util.concurrent.ExecutionException; diff --git a/src/com/jpexs/helpers/LimitedInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/LimitedInputStream.java similarity index 50% rename from src/com/jpexs/helpers/LimitedInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/LimitedInputStream.java index dedf0332c..850d826a6 100644 --- a/src/com/jpexs/helpers/LimitedInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/LimitedInputStream.java @@ -1,54 +1,53 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.IOException; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public class LimitedInputStream extends InputStream { - - private final InputStream is; - private long pos = 0; - private final long limit; - - public LimitedInputStream(InputStream is, long limit) { - this.is = is; - this.limit = limit; - } - - @Override - public int read() throws IOException { - if (pos >= limit) { - return -1; - } - pos++; - return is.read(); - } - - @Override - public int available() throws IOException { - int avail = is.available(); - if (pos + avail > limit) { - avail = (int) (limit - pos); - } - return avail; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public class LimitedInputStream extends InputStream { + + private final InputStream is; + private long pos = 0; + private final long limit; + + public LimitedInputStream(InputStream is, long limit) { + this.is = is; + this.limit = limit; + } + + @Override + public int read() throws IOException { + if (pos >= limit) { + return -1; + } + pos++; + return is.read(); + } + + @Override + public int available() throws IOException { + int avail = is.available(); + if (pos + avail > limit) { + avail = (int) (limit - pos); + } + return avail; + } +} diff --git a/src/com/jpexs/helpers/MemoryInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/MemoryInputStream.java similarity index 75% rename from src/com/jpexs/helpers/MemoryInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/MemoryInputStream.java index 9c3da11f7..4f78b6eb8 100644 --- a/src/com/jpexs/helpers/MemoryInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/MemoryInputStream.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import com.jpexs.helpers.streams.SeekableInputStream; diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/NulStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/NulStream.java new file mode 100644 index 000000000..e8ccc70ca --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/NulStream.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.OutputStream; + +/** + * + * @author JPEXS + */ +public class NulStream extends OutputStream { + + @Override + public void write(int i) { + } + +} diff --git a/src/com/jpexs/helpers/Path.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Path.java similarity index 63% rename from src/com/jpexs/helpers/Path.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/Path.java index 11729dace..ee045ca80 100644 --- a/src/com/jpexs/helpers/Path.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Path.java @@ -1,73 +1,72 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.File; - -/** - * - * @author JPEXS - */ -public class Path { - - public static String combine(String... paths) { - String result = ""; - String separator = File.separator; - for (String path : paths) { - if (path.startsWith(separator)) { - result = result.substring(separator.length()); - } - if (!result.endsWith(separator)) { - result += separator; - } - result += path; - } - return result; - } - - /* - * Get the extension of a file. - */ - public static String getExtension(String fileName) { - return getExtension(new File(fileName)); - } - - /* - * Get the extension of a file. - */ - public static String getExtension(File f) { - String ext = null; - String s = f.getName(); - int i = s.lastIndexOf('.'); - - if (i > 0 && i < s.length() - 1) { - ext = s.substring(i).toLowerCase(); - } - return ext; - } - - public static String getFileNameWithoutExtension(File f) { - String ext = null; - String s = f.getName(); - int i = s.lastIndexOf('.'); - - if (i > 0 && i < s.length() - 1) { - ext = s.substring(0, i).toLowerCase(); - } - return ext; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.File; + +/** + * + * @author JPEXS + */ +public class Path { + + public static String combine(String... paths) { + String result = ""; + String separator = File.separator; + for (String path : paths) { + if (path.startsWith(separator)) { + result = result.substring(separator.length()); + } + if (!result.endsWith(separator)) { + result += separator; + } + result += path; + } + return result; + } + + /* + * Get the extension of a file. + */ + public static String getExtension(String fileName) { + return getExtension(new File(fileName)); + } + + /* + * Get the extension of a file. + */ + public static String getExtension(File f) { + String ext = null; + String s = f.getName(); + int i = s.lastIndexOf('.'); + + if (i > 0 && i < s.length() - 1) { + ext = s.substring(i).toLowerCase(); + } + return ext; + } + + public static String getFileNameWithoutExtension(File f) { + String ext = null; + String s = f.getName(); + int i = s.lastIndexOf('.'); + + if (i > 0 && i < s.length() - 1) { + ext = s.substring(0, i).toLowerCase(); + } + return ext; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/PosMarkedInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/PosMarkedInputStream.java new file mode 100644 index 000000000..4a6a57d4c --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/PosMarkedInputStream.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public class PosMarkedInputStream extends InputStream { + + private long pos = 0; + private final InputStream is; + + public PosMarkedInputStream(InputStream is) { + this.is = is; + } + + @Override + public int read() throws IOException { + incPos(); + return is.read(); + } + + public long getPos() { + return pos; + } + + public void setPos(long pos) throws IOException { + this.pos = pos; + } + + public void incPos() { + this.pos++; + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/ProgressListener.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ProgressListener.java new file mode 100644 index 000000000..72a344650 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ProgressListener.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +/** + * + * @author JPEXS + */ +public interface ProgressListener { + + public void progress(int p); +} diff --git a/src/com/jpexs/helpers/ReReadableInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ReReadableInputStream.java similarity index 67% rename from src/com/jpexs/helpers/ReReadableInputStream.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/ReReadableInputStream.java index c8661c407..4954ced09 100644 --- a/src/com/jpexs/helpers/ReReadableInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ReReadableInputStream.java @@ -1,95 +1,94 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import com.jpexs.helpers.streams.SeekableInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public class ReReadableInputStream extends SeekableInputStream { - - InputStream is; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] converted; - long pos = 0; - int count = 0; - - public int getCount() { - return count; - } - - public byte[] getAllRead() { - return baos.toByteArray(); - } - - public long getPos() { - return pos; - } - - public ReReadableInputStream(InputStream is) { - this.is = is; - } - - @Override - public void seek(long pos) throws IOException { - if (pos > count) { - this.pos = count; - skip(pos - count); - } - this.pos = pos; - } - - @Override - public synchronized void reset() throws IOException { - seek(0); - } - - @Override - public int read() throws IOException { - if (pos < count) { - if (converted == null) { - converted = baos.toByteArray(); - } - int ret = converted[(int) pos] & 0xff; - pos++; - return ret; - } - int i = is.read(); - if (i > -1) { - baos.write(i); - count++; - } - pos++; - converted = null; - - return i; - } - - @Override - public int available() throws IOException { - return (count + is.available()) - (int) pos; - } - - public long length() throws IOException { - return count + is.available(); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import com.jpexs.helpers.streams.SeekableInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public class ReReadableInputStream extends SeekableInputStream { + + InputStream is; + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] converted; + long pos = 0; + int count = 0; + + public int getCount() { + return count; + } + + public byte[] getAllRead() { + return baos.toByteArray(); + } + + public long getPos() { + return pos; + } + + public ReReadableInputStream(InputStream is) { + this.is = is; + } + + @Override + public void seek(long pos) throws IOException { + if (pos > count) { + this.pos = count; + skip(pos - count); + } + this.pos = pos; + } + + @Override + public synchronized void reset() throws IOException { + seek(0); + } + + @Override + public int read() throws IOException { + if (pos < count) { + if (converted == null) { + converted = baos.toByteArray(); + } + int ret = converted[(int) pos] & 0xff; + pos++; + return ret; + } + int i = is.read(); + if (i > -1) { + baos.write(i); + count++; + } + pos++; + converted = null; + + return i; + } + + @Override + public int available() throws IOException { + return (count + is.available()) - (int) pos; + } + + public long length() throws IOException { + return count + is.available(); + } +} diff --git a/src/com/jpexs/helpers/Searchable.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java similarity index 54% rename from src/com/jpexs/helpers/Searchable.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java index 06712d2e4..d5f834fd3 100644 --- a/src/com/jpexs/helpers/Searchable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Searchable.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.InputStream; -import java.util.Map; - -/** - * - * @author JPEXS - */ -public interface Searchable { - - /** - * Searches for byte sequences - * - * @param data - * @return Map Position=>Input stream - */ - public Map search(byte[] - - ... data); - - /** - * Searches for byte sequences with progress listener - * @param progListener Listener - * @param data - * @return Map Position=>Input stream - */ - public Map search(ProgressListener progListener, byte[] - -... data); -} +/* + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.io.InputStream; +import java.util.Map; + +/** + * + * @author JPEXS + */ +public interface Searchable { + + /** + * Searches for byte sequences + * + * @param data + * @return Map Position=>Input stream + */ + public Map search(byte[] + + ... data); + + /** + * Searches for byte sequences with progress listener + * @param progListener Listener + * @param data + * @return Map Position=>Input stream + */ + public Map search(ProgressListener progListener, byte[] + +... data); +} diff --git a/src/com/jpexs/helpers/SerializableImage.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/SerializableImage.java similarity index 85% rename from src/com/jpexs/helpers/SerializableImage.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/SerializableImage.java index 5fba9b333..a774712d2 100644 --- a/src/com/jpexs/helpers/SerializableImage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/SerializableImage.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS + * Copyright (C) 2010-2014 JPEXS, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import java.awt.AlphaComposite; diff --git a/src/com/jpexs/helpers/SoundPlayer.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/SoundPlayer.java similarity index 79% rename from src/com/jpexs/helpers/SoundPlayer.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/SoundPlayer.java index 429550091..c158bc73d 100644 --- a/src/com/jpexs/helpers/SoundPlayer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/SoundPlayer.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import java.io.BufferedInputStream; diff --git a/src/com/jpexs/helpers/Stopwatch.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Stopwatch.java similarity index 54% rename from src/com/jpexs/helpers/Stopwatch.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/Stopwatch.java index d9e96dad5..87c52a950 100644 --- a/src/com/jpexs/helpers/Stopwatch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Stopwatch.java @@ -1,59 +1,58 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.util.Date; - -/** - * - * @author JPEXS - */ -public class Stopwatch { - - private long startTime, elapsedTime; - private boolean running; - public Date startDate, endDate; - - public static Stopwatch startNew() { - Stopwatch sw = new Stopwatch(); - sw.start(); - return sw; - } - - public void start() { - running = true; - startDate = new Date(); - startTime = System.nanoTime(); - } - - public void stop() { - elapsedTime = System.nanoTime() - startTime; - endDate = new Date(); - running = false; - } - - public long getElapsedNanoseconds() { - if (running) { - return System.nanoTime() - startTime; - } - return elapsedTime; - } - - public long getElapsedMilliseconds() { - return getElapsedNanoseconds() / 1000000; - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers; + +import java.util.Date; + +/** + * + * @author JPEXS + */ +public class Stopwatch { + + private long startTime, elapsedTime; + private boolean running; + public Date startDate, endDate; + + public static Stopwatch startNew() { + Stopwatch sw = new Stopwatch(); + sw.start(); + return sw; + } + + public void start() { + running = true; + startDate = new Date(); + startTime = System.nanoTime(); + } + + public void stop() { + elapsedTime = System.nanoTime() - startTime; + endDate = new Date(); + running = false; + } + + public long getElapsedNanoseconds() { + if (running) { + return System.nanoTime() - startTime; + } + return elapsedTime; + } + + public long getElapsedMilliseconds() { + return getElapsedNanoseconds() / 1000000; + } +} diff --git a/src/com/jpexs/helpers/StreamSearch.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java similarity index 83% rename from src/com/jpexs/helpers/StreamSearch.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java index 4912201aa..8f384270b 100644 --- a/src/com/jpexs/helpers/StreamSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/StreamSearch.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import java.io.IOException; diff --git a/src/com/jpexs/helpers/SwfHeaderStreamSearch.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java similarity index 78% rename from src/com/jpexs/helpers/SwfHeaderStreamSearch.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java index 41f2ad30f..40267165a 100644 --- a/src/com/jpexs/helpers/SwfHeaderStreamSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/SwfHeaderStreamSearch.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers; import java.io.IOException; diff --git a/src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java similarity index 63% rename from src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java index 66c61b725..5b3ce8698 100644 --- a/src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/CharSequenceJavaFileObject.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS, Miron Sadziak + * Copyright (C) 2010-2014 JPEXS, Miron Sadziak, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers.plugin; import java.net.URI; diff --git a/src/com/jpexs/helpers/plugin/ClassFileManager.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/ClassFileManager.java similarity index 75% rename from src/com/jpexs/helpers/plugin/ClassFileManager.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/ClassFileManager.java index 652fc57b6..00c63be84 100644 --- a/src/com/jpexs/helpers/plugin/ClassFileManager.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/ClassFileManager.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS, Miron Sadziak + * Copyright (C) 2010-2014 JPEXS, Miron Sadziak, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers.plugin; import java.io.IOException; diff --git a/src/com/jpexs/helpers/plugin/JavaClassObject.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/JavaClassObject.java similarity index 70% rename from src/com/jpexs/helpers/plugin/JavaClassObject.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/JavaClassObject.java index f993e9eee..83c832fb3 100644 --- a/src/com/jpexs/helpers/plugin/JavaClassObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/plugin/JavaClassObject.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS, Miron Sadziak + * Copyright (C) 2010-2014 JPEXS, Miron Sadziak, All rights reserved. * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.helpers.plugin; import java.io.ByteArrayOutputStream; diff --git a/src/com/jpexs/helpers/resource/Swf2Exe.bin b/libsrc/ffdec_lib/src/com/jpexs/helpers/resource/Swf2Exe.bin similarity index 100% rename from src/com/jpexs/helpers/resource/Swf2Exe.bin rename to libsrc/ffdec_lib/src/com/jpexs/helpers/resource/Swf2Exe.bin diff --git a/src/com/jpexs/helpers/resource/canvas.js b/libsrc/ffdec_lib/src/com/jpexs/helpers/resource/canvas.js similarity index 100% rename from src/com/jpexs/helpers/resource/canvas.js rename to libsrc/ffdec_lib/src/com/jpexs/helpers/resource/canvas.js diff --git a/src/com/jpexs/helpers/sound/SoundPlayer.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/sound/SoundPlayer.java similarity index 52% rename from src/com/jpexs/helpers/sound/SoundPlayer.java rename to libsrc/ffdec_lib/src/com/jpexs/helpers/sound/SoundPlayer.java index ee448903d..f59c4ed41 100644 --- a/src/com/jpexs/helpers/sound/SoundPlayer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/sound/SoundPlayer.java @@ -1,47 +1,46 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.sound; - -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public abstract class SoundPlayer { - - protected InputStream is; - - protected SoundPlayer(InputStream is) { - this.is = is; - } - - public abstract long samplesCount(); - - public abstract long getSamplePosition(); - - public abstract void play(); - - public abstract void stop(); - - public abstract void skip(long samples); - - public abstract boolean isPlaying(); - - public abstract long getFrameRate(); - -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.sound; + +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public abstract class SoundPlayer { + + protected InputStream is; + + protected SoundPlayer(InputStream is) { + this.is = is; + } + + public abstract long samplesCount(); + + public abstract long getSamplePosition(); + + public abstract void play(); + + public abstract void stop(); + + public abstract void skip(long samples); + + public abstract boolean isPlaying(); + + public abstract long getFrameRate(); + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/streams/SeekableInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/streams/SeekableInputStream.java new file mode 100644 index 000000000..3f0f01be7 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/streams/SeekableInputStream.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.streams; + +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author JPEXS + */ +public abstract class SeekableInputStream extends InputStream { + + public abstract void seek(long pos) throws IOException; +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8Helper.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8Helper.java new file mode 100644 index 000000000..3c9a7c821 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8Helper.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.utf8; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.nio.charset.Charset; + +/** + * + * @author JPEXS + */ +public class Utf8Helper { + + public static Charset charset = Charset.forName("UTF-8"); + + public static String urlDecode(String s) { + try { + return URLDecoder.decode(s, "UTF-8"); + } catch (UnsupportedEncodingException ex) { + throw new Error(ex); + } + } + + public static byte[] getBytes(String string) { + return string.getBytes(charset); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java new file mode 100644 index 000000000..005e1d822 --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.utf8; + +import java.io.InputStream; +import java.io.InputStreamReader; + +/** + * + * @author JPEXS + */ +public class Utf8InputStreamReader extends InputStreamReader { + + public Utf8InputStreamReader(InputStream in) { + super(in, Utf8Helper.charset); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java new file mode 100644 index 000000000..34434361e --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.utf8; + +import java.io.OutputStream; +import java.io.OutputStreamWriter; + +/** + * + * @author JPEXS + */ +public class Utf8OutputStreamWriter extends OutputStreamWriter { + + public Utf8OutputStreamWriter(OutputStream out) { + super(out, Utf8Helper.charset); + } +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java new file mode 100644 index 000000000..b2961e33f --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.helpers.utf8; + +import java.io.OutputStream; +import java.io.PrintWriter; + +/** + * + * @author JPEXS + */ +public class Utf8PrintWriter extends PrintWriter { + + public Utf8PrintWriter(OutputStream out) { + super(new Utf8OutputStreamWriter(out)); + } +} diff --git a/test/com/jpexs/decompiler/flash/ABCStreamTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java similarity index 66% rename from test/com/jpexs/decompiler/flash/ABCStreamTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java index 343a63b2a..bece77fff 100644 --- a/test/com/jpexs/decompiler/flash/ABCStreamTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ABCStreamTest.java @@ -1,24 +1,23 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABCInputStream; import com.jpexs.decompiler.flash.abc.ABCOutputStream; -import com.jpexs.decompiler.flash.gui.Main; +////import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.helpers.MemoryInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -35,7 +34,7 @@ public class ABCStreamTest { @BeforeClass public void init() { - Main.initLogging(false); + //Main.initLogging(false); } @Test diff --git a/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java similarity index 80% rename from test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java index 842c7bc98..282b1c830 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; @@ -21,7 +20,7 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.Main; +////import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -43,7 +42,7 @@ public class ActionScript2AssemblerTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { - Main.initLogging(false); + //Main.initLogging(false); Configuration.autoDeobfuscate.set(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java similarity index 81% rename from test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java index 83c699329..ac7791e96 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java @@ -1,26 +1,25 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -41,7 +40,7 @@ public class ActionScript2DeobfuscatorTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { - Main.initLogging(false); + //Main.initLogging(false); Configuration.autoDeobfuscate.set(true); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); } diff --git a/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java similarity index 94% rename from test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java index 703d4d5df..e22f8ab33 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ModificationTest.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; @@ -24,7 +23,7 @@ import com.jpexs.decompiler.flash.action.swf4.ActionJump; import com.jpexs.decompiler.flash.action.swf5.ActionGetMember; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -46,7 +45,7 @@ public class ActionScript2ModificationTest extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { - Main.initLogging(false); + //Main.initLogging(false); Configuration.autoDeobfuscate.set(false); Configuration.pluginPath.set(null); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); diff --git a/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java similarity index 77% rename from test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java index 2c0de63a2..4f3d4f3b6 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java @@ -1,102 +1,101 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import com.jpexs.decompiler.flash.action.parser.ParseException; -import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.gui.Main; -import com.jpexs.decompiler.flash.tags.DoActionTag; -import com.jpexs.decompiler.graph.CompilationException; -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import static org.testng.Assert.fail; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * - * @author JPEXS - */ -public class ActionScript2ParserTest extends ActionStript2TestBase { - - @BeforeClass - public void init() throws IOException, InterruptedException { - Main.initLogging(false); - Configuration.autoDeobfuscate.set(false); - swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); - } - - private void parseAS2(String script) { - DoActionTag asm = getFirstActionTag(); - try { - ActionScriptParser par = new ActionScriptParser(SWF.DEFAULT_VERSION); - asm.setActions(par.actionsFromString(script)); - } catch (IOException | CompilationException | ParseException ex) { - fail("Unable to parse: " + script); - } - } - - @Test - private void testAS2Parse1() { - parseAS2( - "var x = true;\n" - + "while(x) { }"); - } - - @Test - private void testAS2Parse2() { - parseAS2( - "function test(a, b, c)\n" - + "{\n" - + " return a != 0?b * 2:c;\n" - + "}"); - } - - @Test - private void testAS2Parse3() { - parseAS2( - "for(;i < 10;i++) { }"); - } - - @Test - private void testAS2Parse4() { - parseAS2( - "class cl1\n" - + "{\n" - + " function stop()\n" - + " {\n" - + " }\n" - + "}"); - } - - @Test - private void testAS2Parse5() { - parseAS2( - "if(!test.T1)\n" - + "{\n" - + " test.T1 = function()\n" - + " {\n" - + " super();\n" - + " }.Initialize = function(obj)\n" - + " {\n" - + " var x = 1;\n" - + " };\n" - + "}"); - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +import com.jpexs.decompiler.flash.action.parser.ParseException; +import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; +import com.jpexs.decompiler.flash.configuration.Configuration; +//import com.jpexs.decompiler.flash.gui.Main; +import com.jpexs.decompiler.flash.tags.DoActionTag; +import com.jpexs.decompiler.graph.CompilationException; +import java.io.BufferedInputStream; +import java.io.FileInputStream; +import java.io.IOException; +import static org.testng.Assert.fail; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * + * @author JPEXS + */ +public class ActionScript2ParserTest extends ActionStript2TestBase { + + @BeforeClass + public void init() throws IOException, InterruptedException { + //Main.initLogging(false); + Configuration.autoDeobfuscate.set(false); + swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); + } + + private void parseAS2(String script) { + DoActionTag asm = getFirstActionTag(); + try { + ActionScriptParser par = new ActionScriptParser(SWF.DEFAULT_VERSION); + asm.setActions(par.actionsFromString(script)); + } catch (IOException | CompilationException | ParseException ex) { + fail("Unable to parse: " + script); + } + } + + @Test + private void testAS2Parse1() { + parseAS2( + "var x = true;\n" + + "while(x) { }"); + } + + @Test + private void testAS2Parse2() { + parseAS2( + "function test(a, b, c)\n" + + "{\n" + + " return a != 0?b * 2:c;\n" + + "}"); + } + + @Test + private void testAS2Parse3() { + parseAS2( + "for(;i < 10;i++) { }"); + } + + @Test + private void testAS2Parse4() { + parseAS2( + "class cl1\n" + + "{\n" + + " function stop()\n" + + " {\n" + + " }\n" + + "}"); + } + + @Test + private void testAS2Parse5() { + parseAS2( + "if(!test.T1)\n" + + "{\n" + + " test.T1 = function()\n" + + " {\n" + + " super();\n" + + " }.Initialize = function(obj)\n" + + " {\n" + + " var x = 1;\n" + + " };\n" + + "}"); + } +} diff --git a/test/com/jpexs/decompiler/flash/ActionScript2Test.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java similarity index 97% rename from test/com/jpexs/decompiler/flash/ActionScript2Test.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java index 3b9149503..8817ca9ea 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript2Test.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2Test.java @@ -1,24 +1,23 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.tags.DoActionTag; @@ -41,7 +40,7 @@ public class ActionScript2Test extends ActionStript2TestBase { @BeforeClass public void init() throws IOException, InterruptedException { - Main.initLogging(false); + //Main.initLogging(false); Configuration.autoDeobfuscate.set(false); Configuration.decompile.set(true); Configuration.registerNameFormat.set("_loc%d_"); @@ -91,7 +90,7 @@ public class ActionScript2Test extends ActionStript2TestBase { @Test public void frame24_unicodeTest() { compareSrc(24, "trace(\"unicodeTest\");\r\n" - + "var k = \"היפופוטמי, או א\";\r\n" + + "var k = \"היפופו×�מי, ×�ו ×�\";\r\n" + "trace(k);\r\n" ); } diff --git a/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java similarity index 97% rename from test/com/jpexs/decompiler/flash/ActionScript3Test.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java index 9c5f96799..b2b22d920 100644 --- a/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -1,25 +1,24 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.NulWriter; @@ -49,7 +48,7 @@ public class ActionScript3Test extends ActionScriptTestBase { @BeforeClass public void init() throws IOException, InterruptedException { - Main.initLogging(false); + //Main.initLogging(false); swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as3/as3.swf")), false); DoABCDefineTag tag = null; for (Tag t : swf.tags) { diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java new file mode 100644 index 000000000..910bde81e --- /dev/null +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash; + +/** + * + * @author JPEXS + */ +public class ActionScriptTestBase { + + protected String cleanPCode(String pCode) { + pCode = pCode.replaceAll(" *[\r\n]+ *", "\n").trim(); + pCode = pCode.replaceAll(" +", " ").trim(); + return pCode; + } +} diff --git a/test/com/jpexs/decompiler/flash/ActionStript2TestBase.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionStript2TestBase.java similarity index 52% rename from test/com/jpexs/decompiler/flash/ActionStript2TestBase.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionStript2TestBase.java index 6bbcc220c..d1c1ce1ec 100644 --- a/test/com/jpexs/decompiler/flash/ActionStript2TestBase.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionStript2TestBase.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.tags.DoActionTag; diff --git a/test/com/jpexs/decompiler/flash/ExportTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java similarity index 83% rename from test/com/jpexs/decompiler/flash/ExportTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java index 2267dab34..6276ef2fd 100644 --- a/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ExportTest.java @@ -1,24 +1,23 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; @@ -39,7 +38,7 @@ public class ExportTest { @BeforeClass public void init() { - Main.initLogging(false); + //Main.initLogging(false); } public static final String TESTDATADIR = "testdata/decompile"; diff --git a/test/com/jpexs/decompiler/flash/RecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java similarity index 92% rename from test/com/jpexs/decompiler/flash/RecompileTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java index b153ffa26..06f9b7ea2 100644 --- a/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.ABC; @@ -25,7 +24,7 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.helpers.CodeFormatting; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.collections.MyEntry; @@ -58,7 +57,7 @@ public class RecompileTest { @BeforeClass public void init() { - Main.initLogging(false); + //Main.initLogging(false); } public static final String TESTDATADIR = "testdata/recompile"; diff --git a/test/com/jpexs/decompiler/flash/SWFStreamTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java similarity index 90% rename from test/com/jpexs/decompiler/flash/SWFStreamTest.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java index 33e4e5a16..877d8ad0c 100644 --- a/test/com/jpexs/decompiler/flash/SWFStreamTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java @@ -1,22 +1,21 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash; -import com.jpexs.decompiler.flash.gui.Main; +//import com.jpexs.decompiler.flash.gui.Main; import com.jpexs.decompiler.flash.types.RECT; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -33,7 +32,7 @@ public class SWFStreamTest { @BeforeClass public void init() { - Main.initLogging(false); + //Main.initLogging(false); } @Test diff --git a/test/com/jpexs/decompiler/flash/generators/AS2Generator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2Generator.java similarity index 83% rename from test/com/jpexs/decompiler/flash/generators/AS2Generator.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2Generator.java index ad260acdf..16c968476 100644 --- a/test/com/jpexs/decompiler/flash/generators/AS2Generator.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2Generator.java @@ -1,102 +1,101 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.generators; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.helpers.CodeFormatting; -import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; -import com.jpexs.decompiler.flash.tags.DoABCDefineTag; -import com.jpexs.decompiler.flash.tags.DoActionTag; -import com.jpexs.decompiler.flash.tags.ShowFrameTag; -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.helpers.utf8.Utf8Helper; -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.io.FileOutputStream; - -/** - * - * Generates stub for ActionScript2Test - * - * @author JPEXS - */ -public class AS2Generator { - - public static void main(String[] args) throws Exception { - Configuration.autoDeobfuscate.set(false); - SWF swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); - DoABCDefineTag tag = null; - DoActionTag doa = null; - int frame = 0; - StringBuilder s = new StringBuilder(); - for (Tag t : swf.tags) { - if (t instanceof DoActionTag) { - doa = (DoActionTag) t; - } - if (t instanceof ShowFrameTag) { - frame++; - if (doa == null) { - continue; - } - HilightedTextWriter writer = new HilightedTextWriter(new CodeFormatting(), false); - Action.actionsToSource(doa, doa.getActions(), "", writer); - String src = writer.toString(); - if (src.trim().isEmpty()) { - doa = null; - continue; - } - - String[] srcs = src.split("[\r\n]+"); - String testName = "frame" + frame + "_Test"; - String pref = "trace(\""; - for (String p : srcs) { - if (p.trim().matches("trace\\(\"(.*)Test\"\\);")) { - testName = "frame" + frame + "_" + p.substring(pref.length(), p.length() - 3/* "); */); - } - } - - s.append("@Test\r\npublic void "); - s.append(testName); - s.append("(){\r\ncompareSrc("); - s.append(frame); - s.append(","); - - for (int i = 0; i < srcs.length; i++) { - String ss = srcs[i]; - s.append("\""); - s.append(ss.trim().replace("\\", "\\\\").replace("\"", "\\\"")); - s.append("\\r\\n\""); - if (i < srcs.length - 1) { - s.append("+"); - } - s.append("\r\n"); - } - s.append(");"); - s.append("}"); - doa = null; - } - /*try (PrintWriter pw = new PrintWriter("as2_teststub.java")) { - pw.println(s.toString()); - }*/ - try (FileOutputStream fos = new FileOutputStream("as2_teststub.java")) { - fos.write(Utf8Helper.getBytes(s.toString())); - } - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ +package com.jpexs.decompiler.flash.generators; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.action.Action; +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.helpers.CodeFormatting; +import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; +import com.jpexs.decompiler.flash.tags.DoABCDefineTag; +import com.jpexs.decompiler.flash.tags.DoActionTag; +import com.jpexs.decompiler.flash.tags.ShowFrameTag; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.helpers.utf8.Utf8Helper; +import java.io.BufferedInputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; + +/** + * + * Generates stub for ActionScript2Test + * + * @author JPEXS + */ +public class AS2Generator { + + public static void main(String[] args) throws Exception { + Configuration.autoDeobfuscate.set(false); + SWF swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false); + DoABCDefineTag tag = null; + DoActionTag doa = null; + int frame = 0; + StringBuilder s = new StringBuilder(); + for (Tag t : swf.tags) { + if (t instanceof DoActionTag) { + doa = (DoActionTag) t; + } + if (t instanceof ShowFrameTag) { + frame++; + if (doa == null) { + continue; + } + HilightedTextWriter writer = new HilightedTextWriter(new CodeFormatting(), false); + Action.actionsToSource(doa, doa.getActions(), "", writer); + String src = writer.toString(); + if (src.trim().isEmpty()) { + doa = null; + continue; + } + + String[] srcs = src.split("[\r\n]+"); + String testName = "frame" + frame + "_Test"; + String pref = "trace(\""; + for (String p : srcs) { + if (p.trim().matches("trace\\(\"(.*)Test\"\\);")) { + testName = "frame" + frame + "_" + p.substring(pref.length(), p.length() - 3/* "); */); + } + } + + s.append("@Test\r\npublic void "); + s.append(testName); + s.append("(){\r\ncompareSrc("); + s.append(frame); + s.append(","); + + for (int i = 0; i < srcs.length; i++) { + String ss = srcs[i]; + s.append("\""); + s.append(ss.trim().replace("\\", "\\\\").replace("\"", "\\\"")); + s.append("\\r\\n\""); + if (i < srcs.length - 1) { + s.append("+"); + } + s.append("\r\n"); + } + s.append(");"); + s.append("}"); + doa = null; + } + /*try (PrintWriter pw = new PrintWriter("as2_teststub.java")) { + pw.println(s.toString()); + }*/ + try (FileOutputStream fos = new FileOutputStream("as2_teststub.java")) { + fos.write(Utf8Helper.getBytes(s.toString())); + } + } + } +} diff --git a/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java similarity index 86% rename from test/com/jpexs/decompiler/flash/generators/AS3Generator.java rename to libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index d775afec3..f3ff29894 100644 --- a/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * Copyright (C) 2010-2014 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. */ package com.jpexs.decompiler.flash.generators; import com.jpexs.decompiler.flash.SWF; diff --git a/testdata/as2/Box.as b/libsrc/ffdec_lib/testdata/as2/Box.as similarity index 95% rename from testdata/as2/Box.as rename to libsrc/ffdec_lib/testdata/as2/Box.as index 3a8f2503a..8d03ae55a 100644 --- a/testdata/as2/Box.as +++ b/libsrc/ffdec_lib/testdata/as2/Box.as @@ -1,17 +1,17 @@ -class Box extends MovieClip{ - // declare class members - var box_mc:MovieClip; - // Constructor that takes mc as argument - public function Box(passed_mc:MovieClip){ - // assign passed mc to our class member - box_mc = passed_mc; - } - // Methods - public function moveUp(){ - box_mc._y -= 1; - } - - public function moveDown(){ - box_mc._y += 20; - } +class Box extends MovieClip{ + // declare class members + var box_mc:MovieClip; + // Constructor that takes mc as argument + public function Box(passed_mc:MovieClip){ + // assign passed mc to our class member + box_mc = passed_mc; + } + // Methods + public function moveUp(){ + box_mc._y -= 1; + } + + public function moveDown(){ + box_mc._y += 20; + } } \ No newline at end of file diff --git a/testdata/as2/Cox.as b/libsrc/ffdec_lib/testdata/as2/Cox.as similarity index 94% rename from testdata/as2/Cox.as rename to libsrc/ffdec_lib/testdata/as2/Cox.as index 9789fe979..562fb6530 100644 --- a/testdata/as2/Cox.as +++ b/libsrc/ffdec_lib/testdata/as2/Cox.as @@ -1,12 +1,12 @@ -class Cox extends Box{ - public function Cox(passed_mc:MovieClip){ - super(passed_mc); - } - // Methods - public function testPublic(){ - trace("pub"); - } - private function testPrivate(){ - trace("priv"); - } +class Cox extends Box{ + public function Cox(passed_mc:MovieClip){ + super(passed_mc); + } + // Methods + public function testPublic(){ + trace("pub"); + } + private function testPrivate(){ + trace("priv"); + } } \ No newline at end of file diff --git a/testdata/as2/Enemy.as b/libsrc/ffdec_lib/testdata/as2/Enemy.as similarity index 94% rename from testdata/as2/Enemy.as rename to libsrc/ffdec_lib/testdata/as2/Enemy.as index 3cec08539..47f71d0d9 100644 --- a/testdata/as2/Enemy.as +++ b/libsrc/ffdec_lib/testdata/as2/Enemy.as @@ -1,36 +1,36 @@ -class Enemy implements Moving { - var x:Number; - var tst:Number = 5; - var tst2:Number; - static var stat_tst:Number=6; - - - static function sfunc(){ - trace("hu"); - } - - // constructor - function Enemy(px:Number) { - var k=57; - k=k*27; - var c=k; - x = px+c; - } - function moveLeft(lx:Number) { - x -= lx; - tst=7; - //hovno="bagr"; - trace("moveLeft = " + x); - } - function moveRight(rx:Number) { - x += rx; - trace("moveRight = " + x); - } - function moveUp(uy:Number) { - // leave it empty , dont need it - // but must implement it. - } - function moveDown(dy:Number) { - - } +class Enemy implements Moving { + var x:Number; + var tst:Number = 5; + var tst2:Number; + static var stat_tst:Number=6; + + + static function sfunc(){ + trace("hu"); + } + + // constructor + function Enemy(px:Number) { + var k=57; + k=k*27; + var c=k; + x = px+c; + } + function moveLeft(lx:Number) { + x -= lx; + tst=7; + //hovno="bagr"; + trace("moveLeft = " + x); + } + function moveRight(rx:Number) { + x += rx; + trace("moveRight = " + x); + } + function moveUp(uy:Number) { + // leave it empty , dont need it + // but must implement it. + } + function moveDown(dy:Number) { + + } } \ No newline at end of file diff --git a/testdata/as2/Moving.as b/libsrc/ffdec_lib/testdata/as2/Moving.as similarity index 96% rename from testdata/as2/Moving.as rename to libsrc/ffdec_lib/testdata/as2/Moving.as index 8ba439d06..9142330c7 100644 --- a/testdata/as2/Moving.as +++ b/libsrc/ffdec_lib/testdata/as2/Moving.as @@ -1,6 +1,6 @@ -interface Moving extends Moving2{ - function moveUp(py:Number); - function moveDown(py:Number); - function moveLeft(px:Number); - function moveRight(px:Number); +interface Moving extends Moving2{ + function moveUp(py:Number); + function moveDown(py:Number); + function moveLeft(px:Number); + function moveRight(px:Number); } \ No newline at end of file diff --git a/testdata/as2/Moving2.as b/libsrc/ffdec_lib/testdata/as2/Moving2.as similarity index 95% rename from testdata/as2/Moving2.as rename to libsrc/ffdec_lib/testdata/as2/Moving2.as index 54ec960df..43515330f 100644 --- a/testdata/as2/Moving2.as +++ b/libsrc/ffdec_lib/testdata/as2/Moving2.as @@ -1,6 +1,6 @@ -interface Moving2 -{ - function moveUp(py:Number); - function moveDown(py:Number); - function moveLeft(px:Number); +interface Moving2 +{ + function moveUp(py:Number); + function moveDown(py:Number); + function moveLeft(px:Number); } \ No newline at end of file diff --git a/testdata/as2/Ship.as b/libsrc/ffdec_lib/testdata/as2/Ship.as similarity index 93% rename from testdata/as2/Ship.as rename to libsrc/ffdec_lib/testdata/as2/Ship.as index 1509c4fe7..c6d1b9144 100644 --- a/testdata/as2/Ship.as +++ b/libsrc/ffdec_lib/testdata/as2/Ship.as @@ -1,28 +1,28 @@ -class Ship implements Moving{ - var y; - var a; - var b; - var c; - private var d=5; - // constructor - function Ship(py:Number){ - y = py; - } - function moveUp(uy:Number){ - y *= uy; - trace("moveUp = "+y); - } - function moveDown(dy:Number){ - y *= dy; - trace("moveDown = "+y); - } - function moveLeft(lx:Number){ - // empty - b = 6; - } - function moveRight(rx:Number){ - // empty - trace(a); - trace(d); - } +class Ship implements Moving{ + var y; + var a; + var b; + var c; + private var d=5; + // constructor + function Ship(py:Number){ + y = py; + } + function moveUp(uy:Number){ + y *= uy; + trace("moveUp = "+y); + } + function moveDown(dy:Number){ + y *= dy; + trace("moveDown = "+y); + } + function moveLeft(lx:Number){ + // empty + b = 6; + } + function moveRight(rx:Number){ + // empty + trace(a); + trace(d); + } } \ No newline at end of file diff --git a/testdata/as2/as2.fla b/libsrc/ffdec_lib/testdata/as2/as2.fla similarity index 100% rename from testdata/as2/as2.fla rename to libsrc/ffdec_lib/testdata/as2/as2.fla diff --git a/testdata/as2/as2.html b/libsrc/ffdec_lib/testdata/as2/as2.html similarity index 97% rename from testdata/as2/as2.html rename to libsrc/ffdec_lib/testdata/as2/as2.html index ba2439c56..352ceec59 100644 --- a/testdata/as2/as2.html +++ b/libsrc/ffdec_lib/testdata/as2/as2.html @@ -1,49 +1,49 @@ - - - - as2 - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Get Adobe Flash player - - - - - -
- - + + + + as2 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Get Adobe Flash player + + + + + +
+ + diff --git a/testdata/as2/as2.swf b/libsrc/ffdec_lib/testdata/as2/as2.swf similarity index 100% rename from testdata/as2/as2.swf rename to libsrc/ffdec_lib/testdata/as2/as2.swf diff --git a/testdata/as2/com/jpexs/MyTest.as b/libsrc/ffdec_lib/testdata/as2/com/jpexs/MyTest.as similarity index 93% rename from testdata/as2/com/jpexs/MyTest.as rename to libsrc/ffdec_lib/testdata/as2/com/jpexs/MyTest.as index 632460b74..15b7784fd 100644 --- a/testdata/as2/com/jpexs/MyTest.as +++ b/libsrc/ffdec_lib/testdata/as2/com/jpexs/MyTest.as @@ -1,15 +1,15 @@ -class com.jpexs.MyTest { - private var i:Number=5; - static var k:Number=27; - - function test():Number - { - trace("hello"); - return 5; - } - static function testS():Number - { - trace("hi"); - return 88; - } +class com.jpexs.MyTest { + private var i:Number=5; + static var k:Number=27; + + function test():Number + { + trace("hello"); + return 5; + } + static function testS():Number + { + trace("hi"); + return 88; + } } \ No newline at end of file diff --git a/testdata/as3/TestMovie.as b/libsrc/ffdec_lib/testdata/as3/TestMovie.as similarity index 95% rename from testdata/as3/TestMovie.as rename to libsrc/ffdec_lib/testdata/as3/TestMovie.as index 6fadd8040..4ff0bbbf4 100644 --- a/testdata/as3/TestMovie.as +++ b/libsrc/ffdec_lib/testdata/as3/TestMovie.as @@ -1,42 +1,42 @@ -package -{ - import flash.display.Sprite; - import flash.text.TextField; - import classes.Test; - - public class TestMovie extends Sprite - { - public static const instance:TestMovie = new TestMovie(); - public static var k = {a:6,b:7,c:9}; - public function TestMovie() - { - var display_txt:TextField = new TextField(); - display_txt.text = "Hello World!"; - addChild(display_txt); - var t:Test = new Test(); - t.testHello(); - testObj({a:5,b:6,c:7}); - } - - public function testObj(o:Object){ - trace(o); - } - - public static var staticVariable:int = 5; - public static var staticVariable2:int = 5; - - public function testStatic2():int - { - return TestMovie.staticVariable + TestMovie.staticVariable2; - } - - public function testStatic():void - { - var testFunction:Function = function(name:String):* - { - return TestMovie[name]; - }; - trace(testFunction("staticVariable")); - } - } +package +{ + import flash.display.Sprite; + import flash.text.TextField; + import classes.Test; + + public class TestMovie extends Sprite + { + public static const instance:TestMovie = new TestMovie(); + public static var k = {a:6,b:7,c:9}; + public function TestMovie() + { + var display_txt:TextField = new TextField(); + display_txt.text = "Hello World!"; + addChild(display_txt); + var t:Test = new Test(); + t.testHello(); + testObj({a:5,b:6,c:7}); + } + + public function testObj(o:Object){ + trace(o); + } + + public static var staticVariable:int = 5; + public static var staticVariable2:int = 5; + + public function testStatic2():int + { + return TestMovie.staticVariable + TestMovie.staticVariable2; + } + + public function testStatic():void + { + var testFunction:Function = function(name:String):* + { + return TestMovie[name]; + }; + trace(testFunction("staticVariable")); + } + } } \ No newline at end of file diff --git a/testdata/as3/as3.fla b/libsrc/ffdec_lib/testdata/as3/as3.fla similarity index 100% rename from testdata/as3/as3.fla rename to libsrc/ffdec_lib/testdata/as3/as3.fla diff --git a/testdata/as3/as3.html b/libsrc/ffdec_lib/testdata/as3/as3.html similarity index 97% rename from testdata/as3/as3.html rename to libsrc/ffdec_lib/testdata/as3/as3.html index 2cb16b28d..8b3feba2a 100644 --- a/testdata/as3/as3.html +++ b/libsrc/ffdec_lib/testdata/as3/as3.html @@ -1,49 +1,49 @@ - - - - as3 - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Get Adobe Flash player - - - - - -
- - + + + + as3 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Get Adobe Flash player + + + + + +
+ + diff --git a/testdata/as3/as3.swf b/libsrc/ffdec_lib/testdata/as3/as3.swf similarity index 100% rename from testdata/as3/as3.swf rename to libsrc/ffdec_lib/testdata/as3/as3.swf diff --git a/testdata/as3/build.bat b/libsrc/ffdec_lib/testdata/as3/build.bat similarity index 100% rename from testdata/as3/build.bat rename to libsrc/ffdec_lib/testdata/as3/build.bat diff --git a/libsrc/ffdec_lib/testdata/as3/build_debug.bat b/libsrc/ffdec_lib/testdata/as3/build_debug.bat new file mode 100644 index 000000000..aa8e4c7cc --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3/build_debug.bat @@ -0,0 +1,2 @@ +@echo off +build.bat debug \ No newline at end of file diff --git a/testdata/as3/classes/Test.as b/libsrc/ffdec_lib/testdata/as3/classes/Test.as similarity index 94% rename from testdata/as3/classes/Test.as rename to libsrc/ffdec_lib/testdata/as3/classes/Test.as index 8a37a3546..7652c8364 100644 --- a/testdata/as3/classes/Test.as +++ b/libsrc/ffdec_lib/testdata/as3/classes/Test.as @@ -1,891 +1,891 @@ -package classes -{ - - import flash.utils.Dictionary; - import classes.myInternal; - import flash.errors.EOFError; - import flash.events.Event; - public class Test - { - private var testPriv:int=5; - protected var testProt:int=9; - public var t3:TestClass3; - public static const p:int=8; - private namespace n="nazdar"; - - public function testHello() - { - trace("hello"); - } - - public function testIncDec() - { - var a=5; - var b=0; - trace("++var"); - b=++a; - trace("var++"); - b=a++; - trace("--var"); - b=--a; - trace("var--"); - b=a--; - var c=[1, 2, 3, 4, 5]; - trace("++arr"); - b=++c[2]; - trace("arr++"); - b=c[2]++; - trace("--arr"); - b=--c[2]; - trace("arr--"); - b=c[2]--; - - var d=new TestClass1(); - trace("++property"); - trace(++d.attrib); - trace("property++"); - trace(d.attrib++); - trace("--property"); - trace(--d.attrib); - trace("property--"); - trace(d.attrib--); - - trace("arr[e++]"); - - var chars:Array=new Array(36); - var index:uint=0; - - chars[index++]=5; - - trace("arr[++e]"); - chars[++index]=5; - return; - } - - public function testDoWhile() - { - var a=8; - do - { - trace("a=" + a); - a++; - } while (a < 20); - return; - } - - public function testInnerTry() - { - try - { - try - { - trace("try body 1"); - } - catch (e:DefinitionError) - { - trace("catched DefinitionError"); - } - trace("after try 1"); - } - catch (e:Error) - { - trace("catched Error"); - } - finally - { - trace("finally block"); - } - } - - public function testWhileContinue() - { - var a=5; - while (true) - { - if (a == 9) - { - if (a == 8) - { - continue; - } - if (a == 9) - { - break; - } - trace("hello 1"); - } - trace("hello2"); - } - return; - } - - public function testPrecedence() - { - var a=0; - a=(5 + 6) * 7; - a=5 * (2 + 3); - a=5 + 6 * 7; - a=5 * 2 + 2; - a=5 * (25 % 3); - a=5 % (24 * 307); - a=1 / (2 / 3); - a=1 / (2 * 3); - a=1 * 2 * 3; - a=1 * 2 / 3; - trace("a=" + a); - return; - } - - public function testStrings() - { - trace("hello"); - trace("quotes:\"hello!\""); - trace("backslash: \\ "); - trace("single quotes: \'hello!\'"); - trace("new line \r\n hello!"); - } - - public function testContinueLevels() - { - var a=5; - loop123: switch (a) - { - case 57 * a: - trace("fiftyseven multiply a"); - var b=0; - while (b < 50) - { - if (b == 10) - { - break; - } - if (b == 15) - { - break loop123; - } - b=b + 1; - } - break; - case 13: - trace("thirteen"); - case 14: - trace("fourteen"); - break; - case 89: - trace("eightynine"); - break; - default: - trace("default clause"); - } - - loop182: for (var c=0; c < 8; c=c + 1) - { - - loop165: for (var d=0; d < 25; d++) - { - - for (var e=0; e < 50; e++) - { - if (e == 9) - { - break loop165; - } - if (e == 20) - { - continue loop182; - } - if (e == 8) - { - break; - } - break loop182; - } - } - trace("hello"); - } - } - - public function testSwitchDefault() - { - var a=5; - switch (a) - { - case 57 * a: - trace("fiftyseven multiply a"); - break; - case 13: - trace("thirteen"); - case 14: - trace("fourteen"); - break; - case 89: - trace("eightynine"); - break; - default: - trace("default clause"); - } - } - - public function testMultipleCondition() - { - var a=5; - var b=8; - var c=9; - if ((a <= 4 || b <= 8) && c == 7) - { - trace("onTrue"); - } - else - { - trace("onFalse"); - } - } - - public function testForBreak() - { - for (var a=0; a < 10; a++) - { - if (a == 5) - { - break; - } - trace("hello:" + a); - } - } - - public function testIf() - { - var a=5; - if (a == 7) - { - trace("onTrue"); - } - } - - public function testIfElse() - { - var a=5; - if (a == 7) - { - trace("onTrue"); - } - else - { - trace("onFalse"); - } - } - - public function testFor() - { - for (var a=0; a < 10; a++) - { - trace("a=" + a); - } - } - - public function testForContinue() - { - for (var a=0; a < 10; a=a + 1) - { - if (a == 9) - { - if (a == 5) - { - trace("part1"); - continue; - } - trace("a=" + a); - if (a == 7) - { - trace("part2"); - continue; - } - trace("part3"); - } - else - { - trace("part4"); - } - trace("part5"); - } - } - - public function testTry() - { - var i:int; - i=7; - try - { - trace("try body"); - } - catch (e:DefinitionError) - { - trace("catched DefinitionError"); - } - catch (e:Error) - { - trace("Error message:" + e.message); - trace("Stacktrace:" + e.getStackTrace()); - } - finally - { - trace("Finally part"); - } - trace("end"); - } - - public function testSwitch() - { - var a=5; - switch (a) - { - case 57 * a: - trace("fiftyseven multiply a"); - break; - case 13: - trace("thirteen"); - case 14: - trace("fourteen"); - break; - case 89: - trace("eightynine"); - break; - } - } - - public function testTernarOperator() - { - var a=5; - var b=4; - var c=4; - var d=78; - var e=(a == b) ? ((c == d) ? 1 : 7) : 3; - trace("e=" + e); - } - - public function testInnerIf() - { - var a=5; - var b=4; - if (a == 5) - { - if (b == 6) - { - trace("b==6"); - } - else - { - trace("b!=6"); - } - } - else - { - if (b == 7) - { - trace("b==7"); - } - else - { - trace("b!=7"); - } - } - trace("end"); - } - - public function testVector() - { - var v:Vector.=new Vector.(); - v.push("hello"); - v[0]="hi"; - v[5 * 8 - 39]="hi2"; - trace(v[0]); - } - - public function testProperty() - { - var d=new TestClass1(); - var k=7 + 8; - if (k == 15) - { - d.method(d.attrib * 5); - } - } - - public function testRest(firstp:int, ... restval):int - { - trace("firstRest:" + restval[0]); - return firstp; - } - - public function testParamNames(firstp:int, secondp:int, thirdp:int):int - { - return firstp + secondp + thirdp; - } - - public function testForEach() - { - var list:Array; - list=new Array(); - list[0]="first"; - list[1]="second"; - list[2]="third"; - for each (var item in list) - { - trace("item #" + item); - } - } - - public function testForEachObjectArray() - { - var list:Array; - list=new Array(); - list[0]="first"; - list[1]="second"; - list[2]="third"; - var test:Array; - test=new Array(); - test[0]=0; - for each (test[0] in list) - { - trace("item #" + test[0]); - } - } - - public function testForEachObjectAttribute() - { - var list:Array; - list=new Array(); - list[0]="first"; - list[1]="second"; - list[2]="third"; - for each (testPriv in list) - { - trace("item #" + testPriv); - } - } - - public function testParamsCount(firstp:int, secondp:int, thirdp:int):int - { - return firstp; - } - - public function testInlineFunctions() - { - var first:String="value1"; - var traceParameter:Function=function(aParam:String):String - { - var second:String="value2"; - second=second + "cc"; - var traceParam2:Function=function(bParam:String):String - { - trace(bParam + "," + aParam); - return first + second + aParam + bParam; - } - trace(second); - traceParam2(aParam); - return first; - }; - traceParameter("hello"); - } - - public function testMissingDefault() - { - var jj:int=1; - switch (jj) - { - case 1: - jj=1; - break; - case 2: - jj=2; - break; - default: - jj=3; - } - } - - private function traceIt(s:String) - { - trace(s); - } - - private static var counter:int; - - private function getCounter():int - { - counter++; - return counter; - } - - public function testChainedAssignments() - { - var a:int; - var b:int; - var c:int; - var d:int; - d=c=b=a=5; - var e:TestClass2=TestClass2.createMe("test"); - e.attrib1=e.attrib2=e.attrib3=getCounter(); - traceIt(e.toString()); - } - - private function testFinallyZeroJump(param1:String):String - { - var str:String=param1; - try - { - return str; - } - catch (e:Error) - { - trace("error is :" + e.message); - } - finally - { - trace("hi "); - if (5 == 4) - { - return str; - } - else - { - return "hu" + str; - } - } - } - - public function testInnerFunctions(a:String) - { - var k:int=5; - if (k == 6) - { - var s:int=8; - } - function innerFunc(b:String) - { - trace(b); - } - innerFunc(a); - } - - public function testDeclarations() - { - var vall:*; - var vstr:String; - var vint:int; - var vuint:uint; - var vclass:TestClass1; - var vnumber:Number; - var vobject:Object; - - vall=6; - vstr="hello"; - vuint=7; - vint=-4; - vclass=new TestClass1(); - vnumber=0.5; - vnumber=6; - vobject=vclass; - } - - public function testForIn() - { - var dic:Dictionary; - var item:Object; - for (item in dic) - { - trace(item); - } - for each (item in dic) - { - trace(item); - } - } - - myInternal function namespacedFunc() - { - trace("hello"); - } - - function unnamespacedFunc() - { - trace("hello2"); - } - - function getNamespace():Namespace - { - return myInternal; - } - - function getName():String - { - return "unnamespacedFunc"; - } - - function testNames() - { - var ns=getNamespace(); - var name=getName(); - var a=ns::unnamespacedFunc(); - var b=ns::[name]; - trace(b.c); - var c=myInternal::neco; - } - - function testComplexExpressions() - { - var i:int; - var j:int; - j=(i=i + (i+=i++)); - } - - function testExpressions() - { - var i:int=5; - var j:int=5; - var arr:Array; - - if ((i=i/=2) == 1 || i == 2) - { - arguments.concat(i); - } - else if (i == 0) - { - i=j++; - } - else - { - arr[0](); - } - - return i == 0; - } - - public function testArguments(a:int):String - { - return arguments[0]; - } - - public function println(str:String):void - { - trace(arguments.callee == this.println); - trace(arguments.length); - trace(arguments[0]); - trace(str); - } - - public function testLogicalComputing() - { - var i=5; - var j=7; - if (i > j) - { - j=9; - var b:Boolean=true; - } - b=(i == 0 || i == 1) && j == 0; - } - - private function getInt():int - { - return counter++; - } - - public function testInc2() - { - var a=[1]; - a[getInt()]++; - var d=a[getInt()]++; - - var e=++a[getInt()]; - var b=1; - b++; - var c=1; - b=c++; - } - - protected function testDecl2() - { - var i:int=5; - i+=7; - if (i == 5) - { - if (i < 8) - { - var k:int=6; - } - } - k=7; - } - - public function testChain2() - { - var g:Array; - var h:Boolean; - var r:int=7; - var t:int=0; - t=this.getInt(); - var extraLine:Boolean; - if (t + 1 < g.length) - { - t++; - h=true; - } - if (t >= 0) - { - trace("ch"); - } - - } - - public function textXML() - { - var name="ahoj"; - var myXML:XML= - - {name} - - ; - - var k=myXML.@id; - var all=myXML.@*.toXMLString(); - k=myXML.book; - k=myXML.book.(@isbn="12345"); - - var g:XML=new XML(""); - } - - public function testDoWhile2():int - { - var k:int=5; - do - { - k++; - if (k == 7) - { - k=5 * k; - } - else - { - k=5 - k; - } - k-- - } while (k < 9); - return 2; - } - - public function testWhileAnd() - { - var a:int=5; - var b:int=10; - while ((a < 10) && (b > 1)) - { - a++; - b--; - } - a=7; - b=9; - } - - public function testNamedAnonFunctions() - { - var test=new function testFunc(param1:*, param2:int, param3:Array):Boolean - { - return (param1 as TestClass2).attrib1==5; - } - } - - public function testStringConcat() - { - var k:int=8; - traceIt("hello" + 5 * 6); - traceIt("hello" + (k - 1)); - traceIt("hello" + 5 + 6); - } - - public function testWhileTry() - { - while (true) - { - try - { - while (true) - { - trace("a") - } - } - catch (e:EOFError) - { - continue; - } - catch (e:Error) - { - continue; - } - } - } - - public function testWhileTry2() - { - for (var i=0; i < 100; i++) - { - try - { - for (var j=0; j < 20; j++) - { - trace("a") - } - } - catch (e:EOFError) - { - continue; - } - catch (e:Error) - { - continue; - } - trace("after_try"); - } - trace("end"); - } - - public function testTryReturn():int - { - try - { - var i:int=0; - var b:Boolean=true; - if (i > 0) - { - while (testDoWhile2()) - { - if (b) - { - return 5; - } - } - } - i++; - return 2; - } - catch (e:Error) - { - } - finally - { - } - return 4; - - } - - public function testOptionalParameters(p1:Event=null, p2:Number=1, p3:Number=-1, p4:Number=-1.1, p5:Number=-1.1, p6:String="a") - { - } - - public function testVector2() - { - var a:Vector.> = new Vector.>(); - var b:Vector. = new [10,20,30]; - } - } -} +package classes +{ + + import flash.utils.Dictionary; + import classes.myInternal; + import flash.errors.EOFError; + import flash.events.Event; + public class Test + { + private var testPriv:int=5; + protected var testProt:int=9; + public var t3:TestClass3; + public static const p:int=8; + private namespace n="nazdar"; + + public function testHello() + { + trace("hello"); + } + + public function testIncDec() + { + var a=5; + var b=0; + trace("++var"); + b=++a; + trace("var++"); + b=a++; + trace("--var"); + b=--a; + trace("var--"); + b=a--; + var c=[1, 2, 3, 4, 5]; + trace("++arr"); + b=++c[2]; + trace("arr++"); + b=c[2]++; + trace("--arr"); + b=--c[2]; + trace("arr--"); + b=c[2]--; + + var d=new TestClass1(); + trace("++property"); + trace(++d.attrib); + trace("property++"); + trace(d.attrib++); + trace("--property"); + trace(--d.attrib); + trace("property--"); + trace(d.attrib--); + + trace("arr[e++]"); + + var chars:Array=new Array(36); + var index:uint=0; + + chars[index++]=5; + + trace("arr[++e]"); + chars[++index]=5; + return; + } + + public function testDoWhile() + { + var a=8; + do + { + trace("a=" + a); + a++; + } while (a < 20); + return; + } + + public function testInnerTry() + { + try + { + try + { + trace("try body 1"); + } + catch (e:DefinitionError) + { + trace("catched DefinitionError"); + } + trace("after try 1"); + } + catch (e:Error) + { + trace("catched Error"); + } + finally + { + trace("finally block"); + } + } + + public function testWhileContinue() + { + var a=5; + while (true) + { + if (a == 9) + { + if (a == 8) + { + continue; + } + if (a == 9) + { + break; + } + trace("hello 1"); + } + trace("hello2"); + } + return; + } + + public function testPrecedence() + { + var a=0; + a=(5 + 6) * 7; + a=5 * (2 + 3); + a=5 + 6 * 7; + a=5 * 2 + 2; + a=5 * (25 % 3); + a=5 % (24 * 307); + a=1 / (2 / 3); + a=1 / (2 * 3); + a=1 * 2 * 3; + a=1 * 2 / 3; + trace("a=" + a); + return; + } + + public function testStrings() + { + trace("hello"); + trace("quotes:\"hello!\""); + trace("backslash: \\ "); + trace("single quotes: \'hello!\'"); + trace("new line \r\n hello!"); + } + + public function testContinueLevels() + { + var a=5; + loop123: switch (a) + { + case 57 * a: + trace("fiftyseven multiply a"); + var b=0; + while (b < 50) + { + if (b == 10) + { + break; + } + if (b == 15) + { + break loop123; + } + b=b + 1; + } + break; + case 13: + trace("thirteen"); + case 14: + trace("fourteen"); + break; + case 89: + trace("eightynine"); + break; + default: + trace("default clause"); + } + + loop182: for (var c=0; c < 8; c=c + 1) + { + + loop165: for (var d=0; d < 25; d++) + { + + for (var e=0; e < 50; e++) + { + if (e == 9) + { + break loop165; + } + if (e == 20) + { + continue loop182; + } + if (e == 8) + { + break; + } + break loop182; + } + } + trace("hello"); + } + } + + public function testSwitchDefault() + { + var a=5; + switch (a) + { + case 57 * a: + trace("fiftyseven multiply a"); + break; + case 13: + trace("thirteen"); + case 14: + trace("fourteen"); + break; + case 89: + trace("eightynine"); + break; + default: + trace("default clause"); + } + } + + public function testMultipleCondition() + { + var a=5; + var b=8; + var c=9; + if ((a <= 4 || b <= 8) && c == 7) + { + trace("onTrue"); + } + else + { + trace("onFalse"); + } + } + + public function testForBreak() + { + for (var a=0; a < 10; a++) + { + if (a == 5) + { + break; + } + trace("hello:" + a); + } + } + + public function testIf() + { + var a=5; + if (a == 7) + { + trace("onTrue"); + } + } + + public function testIfElse() + { + var a=5; + if (a == 7) + { + trace("onTrue"); + } + else + { + trace("onFalse"); + } + } + + public function testFor() + { + for (var a=0; a < 10; a++) + { + trace("a=" + a); + } + } + + public function testForContinue() + { + for (var a=0; a < 10; a=a + 1) + { + if (a == 9) + { + if (a == 5) + { + trace("part1"); + continue; + } + trace("a=" + a); + if (a == 7) + { + trace("part2"); + continue; + } + trace("part3"); + } + else + { + trace("part4"); + } + trace("part5"); + } + } + + public function testTry() + { + var i:int; + i=7; + try + { + trace("try body"); + } + catch (e:DefinitionError) + { + trace("catched DefinitionError"); + } + catch (e:Error) + { + trace("Error message:" + e.message); + trace("Stacktrace:" + e.getStackTrace()); + } + finally + { + trace("Finally part"); + } + trace("end"); + } + + public function testSwitch() + { + var a=5; + switch (a) + { + case 57 * a: + trace("fiftyseven multiply a"); + break; + case 13: + trace("thirteen"); + case 14: + trace("fourteen"); + break; + case 89: + trace("eightynine"); + break; + } + } + + public function testTernarOperator() + { + var a=5; + var b=4; + var c=4; + var d=78; + var e=(a == b) ? ((c == d) ? 1 : 7) : 3; + trace("e=" + e); + } + + public function testInnerIf() + { + var a=5; + var b=4; + if (a == 5) + { + if (b == 6) + { + trace("b==6"); + } + else + { + trace("b!=6"); + } + } + else + { + if (b == 7) + { + trace("b==7"); + } + else + { + trace("b!=7"); + } + } + trace("end"); + } + + public function testVector() + { + var v:Vector.=new Vector.(); + v.push("hello"); + v[0]="hi"; + v[5 * 8 - 39]="hi2"; + trace(v[0]); + } + + public function testProperty() + { + var d=new TestClass1(); + var k=7 + 8; + if (k == 15) + { + d.method(d.attrib * 5); + } + } + + public function testRest(firstp:int, ... restval):int + { + trace("firstRest:" + restval[0]); + return firstp; + } + + public function testParamNames(firstp:int, secondp:int, thirdp:int):int + { + return firstp + secondp + thirdp; + } + + public function testForEach() + { + var list:Array; + list=new Array(); + list[0]="first"; + list[1]="second"; + list[2]="third"; + for each (var item in list) + { + trace("item #" + item); + } + } + + public function testForEachObjectArray() + { + var list:Array; + list=new Array(); + list[0]="first"; + list[1]="second"; + list[2]="third"; + var test:Array; + test=new Array(); + test[0]=0; + for each (test[0] in list) + { + trace("item #" + test[0]); + } + } + + public function testForEachObjectAttribute() + { + var list:Array; + list=new Array(); + list[0]="first"; + list[1]="second"; + list[2]="third"; + for each (testPriv in list) + { + trace("item #" + testPriv); + } + } + + public function testParamsCount(firstp:int, secondp:int, thirdp:int):int + { + return firstp; + } + + public function testInlineFunctions() + { + var first:String="value1"; + var traceParameter:Function=function(aParam:String):String + { + var second:String="value2"; + second=second + "cc"; + var traceParam2:Function=function(bParam:String):String + { + trace(bParam + "," + aParam); + return first + second + aParam + bParam; + } + trace(second); + traceParam2(aParam); + return first; + }; + traceParameter("hello"); + } + + public function testMissingDefault() + { + var jj:int=1; + switch (jj) + { + case 1: + jj=1; + break; + case 2: + jj=2; + break; + default: + jj=3; + } + } + + private function traceIt(s:String) + { + trace(s); + } + + private static var counter:int; + + private function getCounter():int + { + counter++; + return counter; + } + + public function testChainedAssignments() + { + var a:int; + var b:int; + var c:int; + var d:int; + d=c=b=a=5; + var e:TestClass2=TestClass2.createMe("test"); + e.attrib1=e.attrib2=e.attrib3=getCounter(); + traceIt(e.toString()); + } + + private function testFinallyZeroJump(param1:String):String + { + var str:String=param1; + try + { + return str; + } + catch (e:Error) + { + trace("error is :" + e.message); + } + finally + { + trace("hi "); + if (5 == 4) + { + return str; + } + else + { + return "hu" + str; + } + } + } + + public function testInnerFunctions(a:String) + { + var k:int=5; + if (k == 6) + { + var s:int=8; + } + function innerFunc(b:String) + { + trace(b); + } + innerFunc(a); + } + + public function testDeclarations() + { + var vall:*; + var vstr:String; + var vint:int; + var vuint:uint; + var vclass:TestClass1; + var vnumber:Number; + var vobject:Object; + + vall=6; + vstr="hello"; + vuint=7; + vint=-4; + vclass=new TestClass1(); + vnumber=0.5; + vnumber=6; + vobject=vclass; + } + + public function testForIn() + { + var dic:Dictionary; + var item:Object; + for (item in dic) + { + trace(item); + } + for each (item in dic) + { + trace(item); + } + } + + myInternal function namespacedFunc() + { + trace("hello"); + } + + function unnamespacedFunc() + { + trace("hello2"); + } + + function getNamespace():Namespace + { + return myInternal; + } + + function getName():String + { + return "unnamespacedFunc"; + } + + function testNames() + { + var ns=getNamespace(); + var name=getName(); + var a=ns::unnamespacedFunc(); + var b=ns::[name]; + trace(b.c); + var c=myInternal::neco; + } + + function testComplexExpressions() + { + var i:int; + var j:int; + j=(i=i + (i+=i++)); + } + + function testExpressions() + { + var i:int=5; + var j:int=5; + var arr:Array; + + if ((i=i/=2) == 1 || i == 2) + { + arguments.concat(i); + } + else if (i == 0) + { + i=j++; + } + else + { + arr[0](); + } + + return i == 0; + } + + public function testArguments(a:int):String + { + return arguments[0]; + } + + public function println(str:String):void + { + trace(arguments.callee == this.println); + trace(arguments.length); + trace(arguments[0]); + trace(str); + } + + public function testLogicalComputing() + { + var i=5; + var j=7; + if (i > j) + { + j=9; + var b:Boolean=true; + } + b=(i == 0 || i == 1) && j == 0; + } + + private function getInt():int + { + return counter++; + } + + public function testInc2() + { + var a=[1]; + a[getInt()]++; + var d=a[getInt()]++; + + var e=++a[getInt()]; + var b=1; + b++; + var c=1; + b=c++; + } + + protected function testDecl2() + { + var i:int=5; + i+=7; + if (i == 5) + { + if (i < 8) + { + var k:int=6; + } + } + k=7; + } + + public function testChain2() + { + var g:Array; + var h:Boolean; + var r:int=7; + var t:int=0; + t=this.getInt(); + var extraLine:Boolean; + if (t + 1 < g.length) + { + t++; + h=true; + } + if (t >= 0) + { + trace("ch"); + } + + } + + public function textXML() + { + var name="ahoj"; + var myXML:XML= + + {name} + + ; + + var k=myXML.@id; + var all=myXML.@*.toXMLString(); + k=myXML.book; + k=myXML.book.(@isbn="12345"); + + var g:XML=new XML(""); + } + + public function testDoWhile2():int + { + var k:int=5; + do + { + k++; + if (k == 7) + { + k=5 * k; + } + else + { + k=5 - k; + } + k-- + } while (k < 9); + return 2; + } + + public function testWhileAnd() + { + var a:int=5; + var b:int=10; + while ((a < 10) && (b > 1)) + { + a++; + b--; + } + a=7; + b=9; + } + + public function testNamedAnonFunctions() + { + var test=new function testFunc(param1:*, param2:int, param3:Array):Boolean + { + return (param1 as TestClass2).attrib1==5; + } + } + + public function testStringConcat() + { + var k:int=8; + traceIt("hello" + 5 * 6); + traceIt("hello" + (k - 1)); + traceIt("hello" + 5 + 6); + } + + public function testWhileTry() + { + while (true) + { + try + { + while (true) + { + trace("a") + } + } + catch (e:EOFError) + { + continue; + } + catch (e:Error) + { + continue; + } + } + } + + public function testWhileTry2() + { + for (var i=0; i < 100; i++) + { + try + { + for (var j=0; j < 20; j++) + { + trace("a") + } + } + catch (e:EOFError) + { + continue; + } + catch (e:Error) + { + continue; + } + trace("after_try"); + } + trace("end"); + } + + public function testTryReturn():int + { + try + { + var i:int=0; + var b:Boolean=true; + if (i > 0) + { + while (testDoWhile2()) + { + if (b) + { + return 5; + } + } + } + i++; + return 2; + } + catch (e:Error) + { + } + finally + { + } + return 4; + + } + + public function testOptionalParameters(p1:Event=null, p2:Number=1, p3:Number=-1, p4:Number=-1.1, p5:Number=-1.1, p6:String="a") + { + } + + public function testVector2() + { + var a:Vector.> = new Vector.>(); + var b:Vector. = new [10,20,30]; + } + } +} diff --git a/testdata/as3/classes/TestClass1.as b/libsrc/ffdec_lib/testdata/as3/classes/TestClass1.as similarity index 92% rename from testdata/as3/classes/TestClass1.as rename to libsrc/ffdec_lib/testdata/as3/classes/TestClass1.as index 870ea7c4f..fd36bbdee 100644 --- a/testdata/as3/classes/TestClass1.as +++ b/libsrc/ffdec_lib/testdata/as3/classes/TestClass1.as @@ -1,20 +1,20 @@ -package classes -{ - - public dynamic class TestClass1 - { - public var attrib:int = 5; - public var sons:Array; - - public function testHello() - { - trace("hello2"); - } - - public function method(i:int):int - { - trace("method"); - return 7; - } - } +package classes +{ + + public dynamic class TestClass1 + { + public var attrib:int = 5; + public var sons:Array; + + public function testHello() + { + trace("hello2"); + } + + public function method(i:int):int + { + trace("method"); + return 7; + } + } } \ No newline at end of file diff --git a/testdata/as3/classes/TestClass2.as b/libsrc/ffdec_lib/testdata/as3/classes/TestClass2.as similarity index 94% rename from testdata/as3/classes/TestClass2.as rename to libsrc/ffdec_lib/testdata/as3/classes/TestClass2.as index 0fd41c0b7..5473a4f59 100644 --- a/testdata/as3/classes/TestClass2.as +++ b/libsrc/ffdec_lib/testdata/as3/classes/TestClass2.as @@ -1,20 +1,20 @@ -package classes -{ - - public dynamic class TestClass2 - { - public var attrib1:int; - public var attrib2:int; - public var attrib3:int; - - public function TestClass2(a1:String) - { - trace("Class2 construct"); - } - - public static function createMe(a1:String):TestClass2 - { - return new TestClass2(a1); - } - } -} +package classes +{ + + public dynamic class TestClass2 + { + public var attrib1:int; + public var attrib2:int; + public var attrib3:int; + + public function TestClass2(a1:String) + { + trace("Class2 construct"); + } + + public static function createMe(a1:String):TestClass2 + { + return new TestClass2(a1); + } + } +} diff --git a/testdata/as3/classes/TestClass3.as b/libsrc/ffdec_lib/testdata/as3/classes/TestClass3.as similarity index 96% rename from testdata/as3/classes/TestClass3.as rename to libsrc/ffdec_lib/testdata/as3/classes/TestClass3.as index 67af618de..475eb6269 100644 --- a/testdata/as3/classes/TestClass3.as +++ b/libsrc/ffdec_lib/testdata/as3/classes/TestClass3.as @@ -1,47 +1,47 @@ -package classes -{ - import flash.utils.ByteArray; - - public class TestClass3 - { - /*[Embed(source="image.png", - mimeType="image/png")] - private static var pngImg:Class; - - [Embed(source="image.jpg", - mimeType="image/jpeg")] - private static var jpegImg:Class; - - [Embed(source="image.gif", - mimeType="image/gif")] - private static var gifImg:Class; - - [Embed(source = "malgun.ttf", fontName="Malgun", mimeType = 'application/x-font', embedAsCFF = "false")] - public static const fnt:Class; - - [Embed(source = "malgun.ttf", fontName="Malgun", mimeType = 'application/x-font-truetype', embedAsCFF = "false")] - public static const fntttf:Class; - - [Embed(source="as2.swf", - mimeType="application/x-shockwave-flash")] - private static var swf:Class; - - [Embed(source="audio.mp3", - mimeType="audio/mpeg")] - private static var mpg:Class; - - [Embed(source="image.svg", - mimeType="image/svg")] - private static var svg:Class; - - [Embed(source="image.svg", - mimeType="image/svg-xml")] - private static var svgxml:Class; - - [Embed(source="text.txt", - mimeType="application/octet-stream")] - private static var txt:Class;*/ - - - } -} +package classes +{ + import flash.utils.ByteArray; + + public class TestClass3 + { + /*[Embed(source="image.png", + mimeType="image/png")] + private static var pngImg:Class; + + [Embed(source="image.jpg", + mimeType="image/jpeg")] + private static var jpegImg:Class; + + [Embed(source="image.gif", + mimeType="image/gif")] + private static var gifImg:Class; + + [Embed(source = "malgun.ttf", fontName="Malgun", mimeType = 'application/x-font', embedAsCFF = "false")] + public static const fnt:Class; + + [Embed(source = "malgun.ttf", fontName="Malgun", mimeType = 'application/x-font-truetype', embedAsCFF = "false")] + public static const fntttf:Class; + + [Embed(source="as2.swf", + mimeType="application/x-shockwave-flash")] + private static var swf:Class; + + [Embed(source="audio.mp3", + mimeType="audio/mpeg")] + private static var mpg:Class; + + [Embed(source="image.svg", + mimeType="image/svg")] + private static var svg:Class; + + [Embed(source="image.svg", + mimeType="image/svg-xml")] + private static var svgxml:Class; + + [Embed(source="text.txt", + mimeType="application/octet-stream")] + private static var txt:Class;*/ + + + } +} diff --git a/testdata/as3/classes/myInternal.as b/libsrc/ffdec_lib/testdata/as3/classes/myInternal.as similarity index 96% rename from testdata/as3/classes/myInternal.as rename to libsrc/ffdec_lib/testdata/as3/classes/myInternal.as index 65ab4e45f..a9d27c01d 100644 --- a/testdata/as3/classes/myInternal.as +++ b/libsrc/ffdec_lib/testdata/as3/classes/myInternal.as @@ -1,4 +1,4 @@ -package classes { - public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples"; -} +package classes { + public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples"; +} \ No newline at end of file diff --git a/libsrc/ffdec_lib/testlib/emma.jar b/libsrc/ffdec_lib/testlib/emma.jar new file mode 100644 index 000000000..27629deef Binary files /dev/null and b/libsrc/ffdec_lib/testlib/emma.jar differ diff --git a/libsrc/ffdec_lib/testlib/emma_ant.jar b/libsrc/ffdec_lib/testlib/emma_ant.jar new file mode 100644 index 000000000..3f28c2c66 Binary files /dev/null and b/libsrc/ffdec_lib/testlib/emma_ant.jar differ diff --git a/libsrc/ffdec_lib/testlib/testng-6.8.jar b/libsrc/ffdec_lib/testlib/testng-6.8.jar new file mode 100644 index 000000000..dd6c8bbf3 Binary files /dev/null and b/libsrc/ffdec_lib/testlib/testng-6.8.jar differ diff --git a/libsrc/licen/build.xml b/libsrc/licen/build.xml new file mode 100644 index 000000000..c819c22fc --- /dev/null +++ b/libsrc/licen/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project licen. + + + diff --git a/libsrc/licen/manifest.mf b/libsrc/licen/manifest.mf new file mode 100644 index 000000000..328e8e5bc --- /dev/null +++ b/libsrc/licen/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/libsrc/licen/nbproject/build-impl.xml b/libsrc/licen/nbproject/build-impl.xml new file mode 100644 index 000000000..adf57080a --- /dev/null +++ b/libsrc/licen/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libsrc/licen/nbproject/genfiles.properties b/libsrc/licen/nbproject/genfiles.properties new file mode 100644 index 000000000..72980984e --- /dev/null +++ b/libsrc/licen/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=07435404 +build.xml.script.CRC32=47724449 +build.xml.stylesheet.CRC32=8064a381@1.74.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=07435404 +nbproject/build-impl.xml.script.CRC32=49954610 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48 diff --git a/libsrc/licen/nbproject/project.properties b/libsrc/licen/nbproject/project.properties new file mode 100644 index 000000000..466428942 --- /dev/null +++ b/libsrc/licen/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/licen.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=LicenseUpdater +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/libsrc/licen/nbproject/project.xml b/libsrc/licen/nbproject/project.xml new file mode 100644 index 000000000..3430b4cee --- /dev/null +++ b/libsrc/licen/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + licen + + + + + + + + + diff --git a/libsrc/licen/src/licen/LicenseUpdater.java b/libsrc/licen/src/licen/LicenseUpdater.java new file mode 100644 index 000000000..e4f3453a7 --- /dev/null +++ b/libsrc/licen/src/licen/LicenseUpdater.java @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2010-2014 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * + * @author JPEXS + */ +public class LicenseUpdater { + + public static void main(String[] args) { + updateLicenseInDir(new File("d:\\Dropbox\\Programovani\\JavaSE\\FFDec\\libsrc\\ffdec_lib\\src\\"),true); + updateLicenseInDir(new File("d:\\Dropbox\\Programovani\\JavaSE\\FFDec\\libsrc\\ffdec_lib\\test\\"),true); + } + + public static void updateLicense() { + updateLicenseInDir(new File(".\\src\\"),false); + updateLicenseInDir(new File(".\\test\\"),false); + + } + + /** + * Script for updating license header in java files :-) + * + * @param dir Star directory (e.g. "src/") + */ + public static void updateLicenseInDir(File dir, boolean lgpl) { + + + /* + Copyright (c) ${year}, ${owner}, All rights reserved. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 3.0 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library. + + + */ + + int defaultStartYear = 2010; + int defaultFinalYear = 2014; + String defaultAuthor = "JPEXS"; + String defaultYearStr = "" + defaultStartYear; + if (defaultFinalYear != defaultStartYear) { + defaultYearStr += "-" + defaultFinalYear; + } + String gplLicense = "/*\r\n * Copyright (C) {year} {author}\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 3 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program. If not, see .\r\n */"; + + + String lgplLicense = "/*\r\n * Copyright (C) {year} {author}, All rights reserved.\r\n * \r\n" + + " * This library is free software; you can redistribute it and/or\r\n" + +" * modify it under the terms of the GNU Lesser General Public\r\n" + +" * License as published by the Free Software Foundation; either\r\n" + +" * version 3.0 of the License, or (at your option) any later version.\r\n" + +" * \r\n" + +" * This library is distributed in the hope that it will be useful,\r\n" + +" * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n" + +" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n" + +" * Lesser General Public License for more details.\r\n" + +" * \r\n" + +" * You should have received a copy of the GNU Lesser General Public\r\n" + +" * License along with this library.\r"+ +" */"; + String license = lgpl?lgplLicense:gplLicense; + + File[] files = dir.listFiles(); + for (File f : files) { + if (f.isDirectory()) { + updateLicenseInDir(f,lgpl); + } else { + if (f.getName().endsWith(".java")) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + PrintWriter pw = new PrintWriter(baos); + try { + try (BufferedReader br = new BufferedReader(new FileReader(f))) { + String s; + boolean packageFound = false; + String author = defaultAuthor; + String yearStr = defaultYearStr; + while ((s = br.readLine()) != null) { + if (!packageFound) { + if (s.trim().startsWith("package")) { + packageFound = true; + pw.println(license.replace("{year}", yearStr).replace("{author}", author)); + } else { + Matcher mAuthor = Pattern.compile(lgpl?"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*), All rights reserved.*":"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*)$").matcher(s); + if (mAuthor.matches()) { + author = mAuthor.group(3).trim(); + int startYear = Integer.parseInt(mAuthor.group(1).trim()); + if (startYear == defaultFinalYear) { + yearStr = "" + startYear; + } else { + yearStr = "" + startYear + "-" + defaultFinalYear; + } + if (!author.equals(defaultAuthor)) { + System.out.println("Detected nodefault author:" + author + " in " + f.getAbsolutePath()); + } + } + } + } + if (packageFound) { + pw.println(s); + } + } + } + pw.close(); + } catch (IOException ex) { + } + + FileOutputStream fos; + try { + fos = new FileOutputStream(f); + fos.write(baos.toByteArray()); + fos.close(); + } catch (IOException ex) { + } + } + } + } + } +} diff --git a/nbproject/project.xml b/nbproject/project.xml index c0b1e84ff..8c5e0d017 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -1,175 +1,175 @@ - - - org.netbeans.modules.ant.freeform - - - ffdec - - - - ffdec - - - - - . - UTF-8 - - - - java - src - UTF-8 - - - - java - test - UTF-8 - - - - - build - - - clean - - - javadoc - - - run - - - test - - - clean - build - - - - profile-nb - - - - debug-nb - - - - run-selected-file-in-src - - run.class - src - \.java$ - java-name - - - - - - - - run-selected-file-in-test - - run.class - test - \.java$ - java-name - - - - - - - - debug-selected-file-in-test - - debug.class - test - \.java$ - java-name - - - - - - - - folder - build - build - - - folder - javadoc - build - - - folder - reports - build - - - folder - locales - build - - - folder - build/test - build - - - - - - src - - - - test - - - build.xml - - - - - - - - - - - - - - nightly - - - - - gpl30 - - - - src - lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/jsyntaxpane-0.9.5.jar;lib/trident-6.2.jar;lib/substance-flamingo-6.2.jar;lib/flamingo-6.2.jar;lib/substance-6.2.jar;lib/jl1.0.1.jar;lib/nellymoser.jar;lib/gif.jar;lib/avi.jar;lib/ttf.jar;lib/jpacker.jar;lib/sfntly.jar;lib/gnujpdf.jar - build - javadoc - reports - locales - 1.7 - - - test - - lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/jsyntaxpane-0.9.5.jar;src;testlib/emma.jar;testlib/emma_ant.jar;testlib/junit-4.8.2.jar;testlib/testng-6.8.jar - build/test - 1.7 - - - - + + + org.netbeans.modules.ant.freeform + + + ffdec + + + + ffdec + + + + + . + UTF-8 + + + + java + src + UTF-8 + + + + java + test + UTF-8 + + + + + build + + + clean + + + javadoc + + + run + + + test + + + clean + build + + + + profile-nb + + + + debug-nb + + + + run-selected-file-in-src + + run.class + src + \.java$ + java-name + + + + + + + + run-selected-file-in-test + + run.class + test + \.java$ + java-name + + + + + + + + debug-selected-file-in-test + + debug.class + test + \.java$ + java-name + + + + + + + + folder + build + build + + + folder + javadoc + build + + + folder + reports + build + + + folder + locales + build + + + folder + build/test + build + + + + + + src + + + + test + + + build.xml + + + + + + + + + + + + + + nightly + + + + + gpl30 + + + + src + lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/jsyntaxpane-0.9.5.jar;lib/trident-6.2.jar;lib/substance-flamingo-6.2.jar;lib/flamingo-6.2.jar;lib/substance-6.2.jar;lib/jl1.0.1.jar;lib/nellymoser.jar;lib/gif.jar;lib/avi.jar;lib/ttf.jar;lib/jpacker.jar;lib/sfntly.jar;lib/gnujpdf.jar;lib/ffdec_lib.jar + build + javadoc + reports + locales + 1.7 + + + test + + lib/LZMA.jar;lib/jna-3.5.1.jar;lib/jpproxy.jar;lib/jsyntaxpane-0.9.5.jar;src;testlib/emma.jar;testlib/emma_ant.jar;testlib/junit-4.8.2.jar;testlib/testng-6.8.jar;lib/ffdec_lib.jar + build/test + 1.7 + + + + diff --git a/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java b/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java deleted file mode 100644 index 586b0e57c..000000000 --- a/src/com/jpexs/decompiler/flash/AbortRetryIgnoreHandler.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public interface AbortRetryIgnoreHandler { - - public static int UNDEFINED = -1; - public static int ABORT = 0; - public static int RETRY = 1; - public static int IGNORE = 2; - - public int handle(Throwable thrown); - - public AbortRetryIgnoreHandler getNewInstance(); -} diff --git a/src/com/jpexs/decompiler/flash/BaseLocalData.java b/src/com/jpexs/decompiler/flash/BaseLocalData.java deleted file mode 100644 index 2a7405a41..000000000 --- a/src/com/jpexs/decompiler/flash/BaseLocalData.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public abstract class BaseLocalData { - -} diff --git a/src/com/jpexs/decompiler/flash/DisassemblyListener.java b/src/com/jpexs/decompiler/flash/DisassemblyListener.java deleted file mode 100644 index 59221ad8d..000000000 --- a/src/com/jpexs/decompiler/flash/DisassemblyListener.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public interface DisassemblyListener { - - public void progress(String phase, long pos, long total); -} diff --git a/src/com/jpexs/decompiler/flash/EndOfStreamException.java b/src/com/jpexs/decompiler/flash/EndOfStreamException.java deleted file mode 100644 index 3aef8891b..000000000 --- a/src/com/jpexs/decompiler/flash/EndOfStreamException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public class EndOfStreamException extends RuntimeException { - - public EndOfStreamException() { - super("Premature end of the stream reached"); - } -} diff --git a/src/com/jpexs/decompiler/flash/EventListener.java b/src/com/jpexs/decompiler/flash/EventListener.java deleted file mode 100644 index c70a35574..000000000 --- a/src/com/jpexs/decompiler/flash/EventListener.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public interface EventListener { - - public void handleEvent(String event, Object data); -} diff --git a/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java b/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java deleted file mode 100644 index 54ba07234..000000000 --- a/src/com/jpexs/decompiler/flash/FinalProcessLocalData.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.util.HashSet; - -/** - * - * @author JPEXS - */ -public class FinalProcessLocalData { - - public final HashSet temporaryRegisters; - - public FinalProcessLocalData() { - temporaryRegisters = new HashSet<>(); - } -} diff --git a/src/com/jpexs/decompiler/flash/RunnableIOEx.java b/src/com/jpexs/decompiler/flash/RunnableIOEx.java deleted file mode 100644 index d3bf42a33..000000000 --- a/src/com/jpexs/decompiler/flash/RunnableIOEx.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public interface RunnableIOEx { - - public void run() throws IOException; -} diff --git a/src/com/jpexs/decompiler/flash/RunnableIOExResult.java b/src/com/jpexs/decompiler/flash/RunnableIOExResult.java deleted file mode 100644 index c650cb1c3..000000000 --- a/src/com/jpexs/decompiler/flash/RunnableIOExResult.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @param - * @author JPEXS - */ -public abstract class RunnableIOExResult implements RunnableIOEx { - - public T result; -} diff --git a/src/com/jpexs/decompiler/flash/SWFCompression.java b/src/com/jpexs/decompiler/flash/SWFCompression.java deleted file mode 100644 index 96f625fa7..000000000 --- a/src/com/jpexs/decompiler/flash/SWFCompression.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public enum SWFCompression { - - NONE, ZLIB, LZMA -} diff --git a/src/com/jpexs/decompiler/flash/SWFHeader.java b/src/com/jpexs/decompiler/flash/SWFHeader.java deleted file mode 100644 index 4c7b12a69..000000000 --- a/src/com/jpexs/decompiler/flash/SWFHeader.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public class SWFHeader { - - /** - * Version of SWF - */ - public int version; - - /** - * Uncompressed size of the file - */ - public long fileSize; - - /** - * Used compression mode - */ - public SWFCompression compression = SWFCompression.NONE; - - /** - * LZMA properties - */ - public byte[] lzmaProperties; - - /** - * ScaleForm GFx - */ - public boolean gfx = false; - -} diff --git a/src/com/jpexs/decompiler/flash/SearchMode.java b/src/com/jpexs/decompiler/flash/SearchMode.java deleted file mode 100644 index 87783b929..000000000 --- a/src/com/jpexs/decompiler/flash/SearchMode.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public enum SearchMode { - - ALL, BIGGEST, SMALLEST, FIRST, LAST -} diff --git a/src/com/jpexs/decompiler/flash/Version.java b/src/com/jpexs/decompiler/flash/Version.java deleted file mode 100644 index 0c0c56e8e..000000000 --- a/src/com/jpexs/decompiler/flash/Version.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * @author JPEXS - */ -public class Version { - - public int versionId; - public String revision; - public String versionName; - public String longVersionName; - public String releaseDate; - public String appName; - public String appFullName; - public String updateLink; - public boolean nightly; - public Map> changes = new HashMap<>(); -} diff --git a/src/com/jpexs/decompiler/flash/abc/NotSameException.java b/src/com/jpexs/decompiler/flash/abc/NotSameException.java deleted file mode 100644 index f43b261e5..000000000 --- a/src/com/jpexs/decompiler/flash/abc/NotSameException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -import com.jpexs.helpers.Helper; - -public class NotSameException extends RuntimeException { - - public NotSameException(long pos) { - super("Streams are not the same at pos " + Helper.formatHex((int) pos, 8)); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/RenameType.java b/src/com/jpexs/decompiler/flash/abc/RenameType.java deleted file mode 100644 index dc793058b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/RenameType.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc; - -/** - * - * @author JPEXS - */ -public enum RenameType { - - TYPENUMBER, - RANDOMWORD -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java b/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java deleted file mode 100644 index 421bd6085..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/ConvertException.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -public class ConvertException extends RuntimeException { - - public int line; - - public ConvertException(String s, int line) { - super(s + " on line " + line); - this.line = line; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java b/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java deleted file mode 100644 index 4495dd548..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/ConvertOutput.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TranslateStack; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ConvertOutput { - - public TranslateStack stack; - public List output; - - public ConvertOutput(TranslateStack stack, List output) { - this.stack = stack; - this.output = output; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java b/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java deleted file mode 100644 index 1639269e5..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/InstructionStats.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -/** - * - * @author JPEXS - */ -public class InstructionStats { - - public boolean seen = false; - public int stackpos = 0; - public int scopepos = 0; - public int stackpos_after = 0; - public int scopepos_after = 0; - public AVM2Instruction ins; - - public InstructionStats(AVM2Instruction ins) { - this.ins = ins; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java b/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java deleted file mode 100644 index 462fa8994..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/InvalidInstructionArguments.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -public class InvalidInstructionArguments extends RuntimeException { - - public InvalidInstructionArguments() { - super("Invalid method arguments"); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java b/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java deleted file mode 100644 index 128784c1e..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/LocalDataArea.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import java.util.HashMap; -import java.util.Stack; - -public class LocalDataArea { - - public Stack operandStack = new Stack<>(); - public Stack scopeStack = new Stack<>(); - public HashMap localRegisters = new HashMap<>(); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java b/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java deleted file mode 100644 index ffcc534d4..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/UnknownInstructionCode.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -public class UnknownInstructionCode extends RuntimeException { - - public int code; - - public UnknownInstructionCode(int code) { - super("Unknown instruction code: 0x" + Integer.toHexString(code)); - this.code = code; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java b/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java deleted file mode 100644 index e830a176b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/UnknownJumpException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2; - -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TranslateStack; -import java.util.List; - -public class UnknownJumpException extends RuntimeException { - - public TranslateStack stack; - public int ip; - public List output; - - public UnknownJumpException(TranslateStack stack, int ip, List output) { - this.stack = stack; - this.ip = ip; - this.output = output; - } - - @Override - public String toString() { - return "Unknown jump to " + ip; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java deleted file mode 100644 index ee03e164b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/DeobfuscatePopIns.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns; - -/** - * - * @author JPEXS - */ -public class DeobfuscatePopIns extends PopIns { - - public DeobfuscatePopIns() { - instructionName = "ffdec_deobfuscatepop"; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java deleted file mode 100644 index 944e81a0b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions; - -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.TranslateStack; -import java.util.HashMap; - -public interface IfTypeIns { - - public abstract void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java deleted file mode 100644 index 6b214f627..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; -import com.jpexs.decompiler.flash.abc.types.MethodBody; -import java.util.HashMap; -import java.util.List; -import java.util.Stack; - -public interface SetTypeIns { - - public abstract String getObject(Stack stack, ABC abc, AVM2Instruction ins, List output, MethodBody body, HashMap localRegNames, List fullyQualifiedNames) throws InterruptedException; -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java deleted file mode 100644 index 247ef3049..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/TagInstruction.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions; - -/** - * - * @author JPEXS - */ -public class TagInstruction extends InstructionDefinition { - - public static final long serialVersionUID = 1L; - - public TagInstruction(String tagName) { - super(-1, tagName, new int[0]); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java deleted file mode 100644 index c861c39d2..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugFileIns.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -public class DebugFileIns extends InstructionDefinition { - - public DebugFileIns() { - super(0xf1, "debugfile", new int[]{AVM2Code.DAT_STRING_INDEX}); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java deleted file mode 100644 index ff2833833..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugIns.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -public class DebugIns extends InstructionDefinition { - - public DebugIns() { - super(0xef, "debug", new int[]{AVM2Code.DAT_DEBUG_TYPE, AVM2Code.DAT_STRING_INDEX, AVM2Code.DAT_REGISTER_INDEX, AVM2Code.OPT_U30}); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java deleted file mode 100644 index 05b537c40..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/debug/DebugLineIns.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.debug; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -public class DebugLineIns extends InstructionDefinition { - - public DebugLineIns() { - super(0xf0, "debugline", new int[]{AVM2Code.DAT_LINENUM}); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java deleted file mode 100644 index 6bf60788c..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal1Ins.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import java.util.List; - -public class GetLocal1Ins extends GetLocalTypeIns { - - public GetLocal1Ins() { - super(0xd1, "getlocal_1", new int[]{}); - } - - @Override - public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { - lda.operandStack.push(lda.localRegisters.get(1)); - } - - @Override - public int getRegisterId(AVM2Instruction par0) { - return 1; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java deleted file mode 100644 index 702f71711..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal2Ins.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import java.util.List; - -public class GetLocal2Ins extends GetLocalTypeIns { - - public GetLocal2Ins() { - super(0xd2, "getlocal_2", new int[]{}); - } - - @Override - public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { - lda.operandStack.push(lda.localRegisters.get(2)); - } - - @Override - public int getRegisterId(AVM2Instruction par0) { - return 2; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java deleted file mode 100644 index 1caf2db3f..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocal3Ins.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import java.util.List; - -public class GetLocal3Ins extends GetLocalTypeIns { - - public GetLocal3Ins() { - super(0xd3, "getlocal_3", new int[]{}); - } - - @Override - public void execute(LocalDataArea lda, ConstantPool constants, List arguments) { - lda.operandStack.push(lda.localRegisters.get(3)); - } - - @Override - public int getRegisterId(AVM2Instruction par0) { - return 3; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java deleted file mode 100644 index 5fedc763b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal0Ins.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public class SetLocal0Ins extends SetLocalTypeIns { - - public SetLocal0Ins() { - super(0xd4, "setlocal_0", new int[]{}); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return 0; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java deleted file mode 100644 index cf894c37c..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal1Ins.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public class SetLocal1Ins extends SetLocalTypeIns { - - public SetLocal1Ins() { - super(0xd5, "setlocal_1", new int[]{}); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return 1; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java deleted file mode 100644 index e211b4ddc..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal2Ins.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public class SetLocal2Ins extends SetLocalTypeIns { - - public SetLocal2Ins() { - super(0xd6, "setlocal_2", new int[]{}); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return 2; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java deleted file mode 100644 index 2c83f2649..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocal3Ins.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public class SetLocal3Ins extends SetLocalTypeIns { - - public SetLocal3Ins() { - super(0xd7, "setlocal_3", new int[]{}); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return 3; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java deleted file mode 100644 index d2d46d010..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/SetLocalIns.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.localregs; - -import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public class SetLocalIns extends SetLocalTypeIns { - - public SetLocalIns() { - super(0x63, "setlocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}); - } - - @Override - public int getRegisterId(AVM2Instruction ins) { - return ins.operands[0]; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java deleted file mode 100644 index ca5c8fed5..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.other; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -public class LabelIns extends InstructionDefinition { -//this can be target of branch - - public LabelIns() { - super(0x09, "label", new int[]{}); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java deleted file mode 100644 index feaf62688..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/NopIns.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.other; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; - -public class NopIns extends InstructionDefinition { - - public NopIns() { - super(0x02, "nop", new int[]{}); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java deleted file mode 100644 index 66a21265e..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushIntegerTypeIns.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.stack; - -/** - * - * @author JPEXS - */ -public interface PushIntegerTypeIns { -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java deleted file mode 100644 index 61d155e82..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceOrConvertTypeIns.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.instructions.types; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public interface CoerceOrConvertTypeIns { - - public GraphTargetItem getTargetType(ConstantPool constants, AVM2Instruction ins, List fullyQualifiedNames); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java b/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java deleted file mode 100644 index 4ac751619..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; - -public abstract class NumberValueAVM2Item extends AVM2Item { - - public NumberValueAVM2Item(AVM2Instruction instruction) { - super(instruction, PRECEDENCE_PRIMARY); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java b/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java deleted file mode 100644 index c420f1f57..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/SetTypeAVM2Item.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model; - -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public interface SetTypeAVM2Item { - - public GraphTargetItem getObject(); - - public GraphTargetItem getValue(); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java b/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java deleted file mode 100644 index 5dbdb831f..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/AssignmentAVM2Item.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2012-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.clauses; - -/** - * - * @author JPEXS - */ -public interface AssignmentAVM2Item { -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java b/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java deleted file mode 100644 index c33bd239f..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/IfCondition.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.model.operations; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.graph.model.BinaryOp; - -/** - * - * @author JPEXS - */ -public interface IfCondition extends BinaryOp { - - public InstructionDefinition getIfDefinition(); - - public InstructionDefinition getIfNotDefinition(); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java deleted file mode 100644 index 1ff8c4fbb..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/ParseException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser; - -public class ParseException extends Exception { - - public long line; - public String text; - - public ParseException(String text, long line) { - super("ParseException:" + text + " on line " + line); - this.line = line; - this.text = text; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java deleted file mode 100644 index 64393df71..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/MissingSymbolHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.pcode; - -public interface MissingSymbolHandler { - - public boolean missingString(String value); - - public boolean missingInt(long value); - - public boolean missingUInt(long value); - - public boolean missingDouble(double value); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java deleted file mode 100644 index 60619a4d0..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/BreakJumpIns.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; - -/** - * - * @author JPEXS - */ -public class BreakJumpIns extends JumpIns { - - private final long loopId; - - public BreakJumpIns(long loopId) { - this.loopId = loopId; - } - - public long getLoopId() { - return loopId; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java deleted file mode 100644 index d38555821..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ContinueJumpIns.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; - -/** - * - * @author JPEXS - */ -public class ContinueJumpIns extends JumpIns { - - private final long loopId; - - public ContinueJumpIns(long loopId) { - this.loopId = loopId; - } - - public long getLoopId() { - return loopId; - } - -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java deleted file mode 100644 index 4650f224b..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexBufferer.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class LexBufferer implements LexListener { - - private final List items = new ArrayList<>(); - - @Override - public void onLex(ParsedSymbol s) { - items.add(s); - } - - @Override - public void onPushBack(ParsedSymbol s) { - if (items.get(items.size() - 1) == s) { - items.remove(items.size() - 1); - } - } - - public void pushAllBack(ActionScriptLexer lexer) { - for (int i = items.size() - 1; i >= 0; i--) { - lexer.pushback(items.get(i)); - } - items.clear(); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java deleted file mode 100644 index e272011a4..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/LexListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -/** - * - * @author JPEXS - */ -public interface LexListener { - - public void onLex(ParsedSymbol s); - - public void onPushBack(ParsedSymbol s); -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java deleted file mode 100644 index d1f134dcc..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/Reference.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -/** - * - * @author JPEXS - * @param - */ -public class Reference { - - private T val; - - public Reference(T val) { - this.val = val; - } - - public T getVal() { - return val; - } - - public void setVal(T val) { - this.val = val; - } - - @Override - public String toString() { - return val.toString(); - } - -} diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java b/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java deleted file mode 100644 index 87d7674fc..000000000 --- a/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolGroup.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.parser.script; - -/** - * - * @author JPEXS - */ -public enum SymbolGroup { - - OPERATOR, - KEYWORD, - STRING, - COMMENT, - XML, - IDENTIFIER, - INTEGER, - DOUBLE, - TYPENAME, - EOF, - //GLOBALFUNC, - GLOBALCONST -} diff --git a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java b/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java deleted file mode 100644 index 4026cacc1..000000000 --- a/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParseException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; - -public class ParseException extends Exception { - - public long line; - public String text; - - public ParseException(String text, long line) { - super("ParseException:" + text + " on line " + line); - this.line = line; - this.text = text; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java b/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java deleted file mode 100644 index 5d807bfd9..000000000 --- a/src/com/jpexs/decompiler/flash/abc/types/ClassInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.types.traits.Traits; -import java.util.List; - -public class ClassInfo { - - public int cinit_index; //MethodInfo - static initializer - public Traits static_traits = new Traits(); - - public boolean deleted; - - @Override - public String toString() { - return "method_index=" + cinit_index + "\r\n" + static_traits.toString(); - } - - public String toString(ABC abc, List fullyQualifiedNames) { - return "method_index=" + cinit_index + "\r\n" + static_traits.toString(abc, fullyQualifiedNames); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/types/Decimal.java b/src/com/jpexs/decompiler/flash/abc/types/Decimal.java deleted file mode 100644 index 7d0c4323f..000000000 --- a/src/com/jpexs/decompiler/flash/abc/types/Decimal.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -/** - * - * @author JPEXS - */ -public class Decimal { - - public byte[] data; - - public Decimal(byte[] data) { - this.data = data; - } - - @Override - public String toString() { - return new String(data); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java b/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java deleted file mode 100644 index 506ef93d4..000000000 --- a/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; - -public class NamespaceSet { - - public boolean deleted; - public int[] namespaces; - - public NamespaceSet() { - } - - public NamespaceSet(int[] namespaces) { - this.namespaces = namespaces; - } - - public String toString(ConstantPool constants) { - String s = ""; - for (int i = 0; i < this.namespaces.length; i++) { - if (i > 0) { - s += ", "; - } - s += constants.getNamespace(namespaces[i]).getNameWithKind(constants); - } - return s; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java b/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java deleted file mode 100644 index d155d807d..000000000 --- a/src/com/jpexs/decompiler/flash/abc/types/traits/TraitWithSlot.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.types.traits; - -/** - * - * @author JPEXS - */ -public interface TraitWithSlot { - - public int getSlotIndex(); -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java deleted file mode 100644 index 308b228c7..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ClassNameMultinameUsage extends InsideClassMultinameUsage implements DefinitionUsage { - - public ClassNameMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { - super(abcTags, abc, multinameIndex, classIndex); - } - - @Override - public String toString() { - return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants); - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java deleted file mode 100644 index 52c525326..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/DefinitionUsage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -/** - * - * @author JPEXS - */ -public interface DefinitionUsage { - -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java deleted file mode 100644 index 5e18097d4..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/ExtendsMultinameUsage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ExtendsMultinameUsage extends InsideClassMultinameUsage { - - public ExtendsMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { - super(abcTags, abc, multinameIndex, classIndex); - } - - @Override - public String toString() { - return super.toString() + " extends"; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java deleted file mode 100644 index d2f364255..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/ImplementsMultinameUsage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class ImplementsMultinameUsage extends InsideClassMultinameUsage { - - public ImplementsMultinameUsage(List abcTags, ABC abc, int multinameIndex, int classIndex) { - super(abcTags, abc, multinameIndex, classIndex); - } - - @Override - public String toString() { - return super.toString() + " implements"; - } -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java deleted file mode 100644 index f6ded4225..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/MultinameUsage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import java.util.List; - -/** - * - * @author JPEXS - */ -public abstract class MultinameUsage { - - public List abcTags; - public ABC abc; - - public MultinameUsage(List abcTags, ABC abc) { - this.abcTags = abcTags; - this.abc = abc; - } - -} diff --git a/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java b/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java deleted file mode 100644 index 138ba7e33..000000000 --- a/src/com/jpexs/decompiler/flash/abc/usages/TypeNameMultinameUsage.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.usages; - -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.tags.ABCContainerTag; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class TypeNameMultinameUsage extends MultinameUsage { - - public int typename_index; - - public TypeNameMultinameUsage(List abcTags, ABC abc, int typename_index) { - super(abcTags, abc); - this.typename_index = typename_index; - } - - @Override - public String toString() { - return "TypeName " + abc.constants.getMultiname(typename_index).toString(abc.constants, new ArrayList()); - } -} diff --git a/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java b/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java deleted file mode 100644 index b2a277653..000000000 --- a/src/com/jpexs/decompiler/flash/action/StoreTypeAction.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action; - -import com.jpexs.decompiler.flash.action.model.ConstantPool; -import com.jpexs.decompiler.graph.TranslateStack; - -/** - * - * @author JPEXS - */ -public interface StoreTypeAction { - - public String getVariableName(TranslateStack stack, ConstantPool cpool); -} diff --git a/src/com/jpexs/decompiler/flash/action/UnknownActionException.java b/src/com/jpexs/decompiler/flash/action/UnknownActionException.java deleted file mode 100644 index f6c0d4bbe..000000000 --- a/src/com/jpexs/decompiler/flash/action/UnknownActionException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action; - -/** - * - * @author JPEXS - */ -public class UnknownActionException extends RuntimeException { - - public int opCode; - - public UnknownActionException(int opCode) { - super("Unknown opCode: 0x" + Integer.toHexString(opCode)); - this.opCode = opCode; - } -} diff --git a/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java b/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java deleted file mode 100644 index 7861f15bf..000000000 --- a/src/com/jpexs/decompiler/flash/action/model/ConstantPool.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import java.util.ArrayList; -import java.util.List; - -public class ConstantPool { - - public List constants = new ArrayList<>(); - - public ConstantPool() { - } - - public ConstantPool(List constants) { - this.constants = constants; - } - - public void setNew(List constants) { - this.constants = constants; - } - - @Override - public String toString() { - return "x " + constants.toString(); - } - - public boolean isEmpty() { - return constants.isEmpty(); - } -} diff --git a/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java b/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java deleted file mode 100644 index 8a436bd9d..000000000 --- a/src/com/jpexs/decompiler/flash/action/model/SetTypeActionItem.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public interface SetTypeActionItem { - - public GraphTargetItem getObject(); - - public GraphTargetItem getValue(); - - public void setTempRegister(int regIndex); - - public int getTempRegister(); - - public void setValue(GraphTargetItem value); -} diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java b/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java deleted file mode 100644 index 2d84bc78b..000000000 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/LoopActionItem.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.clauses; - -import com.jpexs.decompiler.flash.action.Action; -import com.jpexs.decompiler.flash.action.model.ActionItem; -import com.jpexs.decompiler.graph.Loop; - -public abstract class LoopActionItem extends ActionItem { - - public Loop loop; - - public LoopActionItem(Action instruction, Loop loop) { - super(instruction, NOPRECEDENCE); - this.loop = loop; - } -} diff --git a/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java b/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java deleted file mode 100644 index 29b0d6f60..000000000 --- a/src/com/jpexs/decompiler/flash/action/model/operations/Inverted.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.model.operations; - -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public interface Inverted { - - public GraphTargetItem invert(); -} diff --git a/src/com/jpexs/decompiler/flash/action/parser/ParseException.java b/src/com/jpexs/decompiler/flash/action/parser/ParseException.java deleted file mode 100644 index ed3796393..000000000 --- a/src/com/jpexs/decompiler/flash/action/parser/ParseException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser; - -public class ParseException extends Exception { - - public long line; - public String text; - - public ParseException(String text, long line) { - super("ParseException:" + text + " on line " + line); - this.line = line; - this.text = text; - } -} diff --git a/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java b/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java deleted file mode 100644 index 6c4bbebc6..000000000 --- a/src/com/jpexs/decompiler/flash/action/parser/pcode/Label.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.pcode; - -public class Label { - - public String name; - public long address; - - public Label(String name, long address) { - this.name = name; - this.address = address; - } -} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java b/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java deleted file mode 100644 index d208f217a..000000000 --- a/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class LexBufferer implements LexListener { - - private final List items = new ArrayList<>(); - - @Override - public void onLex(ParsedSymbol s) { - items.add(s); - } - - @Override - public void onPushBack(ParsedSymbol s) { - if (items.get(items.size() - 1) == s) { - items.remove(items.size() - 1); - } - } - - public void pushAllBack(ActionScriptLexer lexer) { - for (int i = items.size() - 1; i >= 0; i--) { - lexer.pushback(items.get(i)); - } - items.clear(); - } -} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java b/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java deleted file mode 100644 index b2e8ea9ef..000000000 --- a/src/com/jpexs/decompiler/flash/action/parser/script/LexListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -/** - * - * @author JPEXS - */ -public interface LexListener { - - public void onLex(ParsedSymbol s); - - public void onPushBack(ParsedSymbol s); -} diff --git a/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java b/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java deleted file mode 100644 index 070db0cbe..000000000 --- a/src/com/jpexs/decompiler/flash/action/parser/script/SymbolGroup.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.parser.script; - -/** - * - * @author JPEXS - */ -public enum SymbolGroup { - - OPERATOR, - KEYWORD, - STRING, - COMMENT, - XML, - IDENTIFIER, - INTEGER, - DOUBLE, - TYPENAME, - EOF, - GLOBALFUNC, - GLOBALCONST -} diff --git a/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java b/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java deleted file mode 100644 index 181f1d1e1..000000000 --- a/src/com/jpexs/decompiler/flash/action/special/ActionDeobfuscateJump.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.special; - -import com.jpexs.decompiler.flash.action.parser.ParseException; -import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; -import com.jpexs.decompiler.flash.action.swf4.ActionJump; -import java.io.IOException; - -/** - * - * @author JPEXS - */ -public class ActionDeobfuscateJump extends ActionJump { - - public ActionDeobfuscateJump(int offset) { - super(2); - } - - public ActionDeobfuscateJump(FlasmLexer lexer) throws IOException, ParseException { - super(lexer); - } - - @Override - public String toString() { - return "FFDec_DeobfuscateJump " + getJumpOffset(); - } - -} diff --git a/src/com/jpexs/decompiler/flash/action/special/ActionStore.java b/src/com/jpexs/decompiler/flash/action/special/ActionStore.java deleted file mode 100644 index 5d066ac17..000000000 --- a/src/com/jpexs/decompiler/flash/action/special/ActionStore.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.action.special; - -import com.jpexs.decompiler.flash.action.Action; -import java.util.List; - -/** - * - * @author JPEXS - */ -public interface ActionStore { - - public int getStoreSize(); - - public void setStore(List store); -} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java b/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java deleted file mode 100644 index 1e7809e66..000000000 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationCategory.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigurationCategory { - - String value(); - -} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java b/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java deleted file mode 100644 index d7b186fe0..000000000 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultBoolean.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigurationDefaultBoolean { - - boolean value(); - -} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java b/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java deleted file mode 100644 index e5d60b59f..000000000 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultInt.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigurationDefaultInt { - - int value(); - -} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java b/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java deleted file mode 100644 index a67128bbb..000000000 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationDefaultString.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigurationDefaultString { - - String value(); - -} diff --git a/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java b/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java deleted file mode 100644 index ed9cb7efd..000000000 --- a/src/com/jpexs/decompiler/flash/configuration/ConfigurationName.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.configuration; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigurationName { - - String value(); - -} diff --git a/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java b/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java deleted file mode 100644 index 722695533..000000000 --- a/src/com/jpexs/decompiler/flash/dumpview/DumpInfoSwfNode.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.dumpview; - -import com.jpexs.decompiler.flash.SWF; - -/** - * - * @author JPEXS - */ -public class DumpInfoSwfNode extends DumpInfo { - - private final SWF swf; - - public DumpInfoSwfNode(SWF swf, String name, String type, Object value, long startByte, long lengthBytes) { - super(name, type, value, startByte, lengthBytes); - this.swf = swf; - } - - public SWF getSwf() { - return swf; - } - - public static DumpInfoSwfNode getSwfNode(DumpInfo dumpInfo) { - while (!(dumpInfo instanceof DumpInfoSwfNode)) { - dumpInfo = dumpInfo.parent; - } - return (DumpInfoSwfNode) dumpInfo; - } -} diff --git a/src/com/jpexs/decompiler/flash/ecma/EcmaType.java b/src/com/jpexs/decompiler/flash/ecma/EcmaType.java deleted file mode 100644 index df7222f40..000000000 --- a/src/com/jpexs/decompiler/flash/ecma/EcmaType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.ecma; - -/** - * - * @author JPEXS - */ -public enum EcmaType { - - NULL, - STRING, - NUMBER, - UNDEFINED, - OBJECT, - BOOLEAN -} diff --git a/src/com/jpexs/decompiler/flash/ecma/Null.java b/src/com/jpexs/decompiler/flash/ecma/Null.java deleted file mode 100644 index 1d470a09f..000000000 --- a/src/com/jpexs/decompiler/flash/ecma/Null.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.ecma; - -import java.io.Serializable; - -public class Null implements Serializable { - - @Override - public String toString() { - return "null"; - } -} diff --git a/src/com/jpexs/decompiler/flash/ecma/Undefined.java b/src/com/jpexs/decompiler/flash/ecma/Undefined.java deleted file mode 100644 index 106d43050..000000000 --- a/src/com/jpexs/decompiler/flash/ecma/Undefined.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.ecma; - -import java.io.Serializable; - -public class Undefined implements Serializable { - - @Override - public String toString() { - return "undefined"; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java b/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java deleted file mode 100644 index 9d984708c..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/commonshape/Point.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.commonshape; - -/** - * - * @author JPEXS - */ -public class Point { - - public double x; - public double y; - - public Point(double x, double y) { - this.x = x; - this.y = y; - } - - @Override - public int hashCode() { - long bits = Double.doubleToLongBits(x); - bits ^= Double.doubleToLongBits(y) * 31; - return (((int) bits) ^ ((int) (bits >> 32))); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof Point) { - Point pt = (Point) obj; - return (x == pt.x) && (y == pt.y); - } - return super.equals(obj); - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java b/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java deleted file mode 100644 index 5972cc0e7..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.commonshape; - -/** - * - * @author JPEXS - */ -public class PointInt { - - public int x; - public int y; - - public PointInt(int x, int y) { - this.x = x; - this.y = y; - } - - @Override - public int hashCode() { - long bits = Double.doubleToLongBits(x); - bits ^= Double.doubleToLongBits(y) * 31; - return (((int) bits) ^ ((int) (bits >> 32))); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof PointInt) { - PointInt pt = (PointInt) obj; - return (x == pt.x) && (y == pt.y); - } - return super.equals(obj); - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java deleted file mode 100644 index 65725b573..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/FontExportMode.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum FontExportMode { - - TTF, - WOFF -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java deleted file mode 100644 index aa9ededb5..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/FramesExportMode.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum FramesExportMode { - - PNG, - GIF, - AVI, - SVG, - CANVAS, - PDF -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java deleted file mode 100644 index 00a1ee824..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/ImageExportMode.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum ImageExportMode { - - PNG_JPEG, PNG, JPEG -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java deleted file mode 100644 index 9f2eb7ab0..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/MorphShapeExportMode.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum MorphShapeExportMode { - - //TODO: implement other morphshape export modes - SVG, - CANVAS - //PNG, - //GIF, - //AVI -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java deleted file mode 100644 index a9a009ee5..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/MovieExportMode.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum MovieExportMode { - - FLV -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java deleted file mode 100644 index f011c9710..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/ScriptExportMode.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum ScriptExportMode { - - AS, PCODE, PCODE_HEX, HEX; -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java deleted file mode 100644 index b34a24510..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/ShapeExportMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum ShapeExportMode { - - SVG, - PNG, - CANVAS -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java b/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java deleted file mode 100644 index fc84a3750..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/modes/TextExportMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum TextExportMode { - - PLAIN, - FORMATTED, - SVG -} diff --git a/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java b/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java deleted file mode 100644 index e50c64307..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/morphshape/IMorphEdge.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.morphshape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public interface IMorphEdge { - - public PointInt getFrom(); - - public PointInt getTo(); - - public PointInt getFromEnd(); - - public PointInt getToEnd(); - - public int getLineStyleIdx(); - - public int getFillStyleIdx(); - - public IMorphEdge reverseWithNewFillStyle(int newFillStyleIdx); -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java deleted file mode 100644 index 341a7092e..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/BinaryDataExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode; - -/** - * - * @author JPEXS - */ -public class BinaryDataExportSettings { - - public BinaryDataExportMode mode; - - public BinaryDataExportSettings(BinaryDataExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java deleted file mode 100644 index b371d7158..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/FontExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; - -/** - * - * @author JPEXS - */ -public class FontExportSettings { - - public FontExportMode mode; - - public FontExportSettings(FontExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java deleted file mode 100644 index 8e5c13749..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/FramesExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.FramesExportMode; - -/** - * - * @author JPEXS - */ -public class FramesExportSettings { - - public FramesExportMode mode; - - public FramesExportSettings(FramesExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java deleted file mode 100644 index 373d3b0f4..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/ImageExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.ImageExportMode; - -/** - * - * @author JPEXS - */ -public class ImageExportSettings { - - public ImageExportMode mode; - - public ImageExportSettings(ImageExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java deleted file mode 100644 index 221891aea..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/MorphShapeExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.MorphShapeExportMode; - -/** - * - * @author JPEXS - */ -public class MorphShapeExportSettings { - - public MorphShapeExportMode mode; - - public MorphShapeExportSettings(MorphShapeExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java deleted file mode 100644 index 40fbe1002..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/MovieExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.MovieExportMode; - -/** - * - * @author JPEXS - */ -public class MovieExportSettings { - - public MovieExportMode mode; - - public MovieExportSettings(MovieExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java deleted file mode 100644 index c61a0f997..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/ScriptExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; - -/** - * - * @author JPEXS - */ -public class ScriptExportSettings { - - public ScriptExportMode mode; - - public ScriptExportSettings(ScriptExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java deleted file mode 100644 index e5cba35e4..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/ShapeExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.ShapeExportMode; - -/** - * - * @author JPEXS - */ -public class ShapeExportSettings { - - public ShapeExportMode mode; - - public ShapeExportSettings(ShapeExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java deleted file mode 100644 index 40d037e96..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/SoundExportSettings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.SoundExportMode; - -/** - * - * @author JPEXS - */ -public class SoundExportSettings { - - public SoundExportMode mode; - - public SoundExportSettings(SoundExportMode mode) { - this.mode = mode; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java b/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java deleted file mode 100644 index 3f6a243df..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/settings/TextExportSettings.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.settings; - -import com.jpexs.decompiler.flash.exporters.modes.TextExportMode; - -/** - * - * @author JPEXS - */ -public class TextExportSettings { - - public TextExportMode mode; - public boolean singleFile; - - public TextExportSettings(TextExportMode mode, boolean singleFile) { - this.mode = mode; - this.singleFile = singleFile; - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java b/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java deleted file mode 100644 index 4fdb7fff8..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/shape/CurvedEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public class CurvedEdge extends StraightEdge implements IEdge { - - private final PointInt control; - - CurvedEdge(PointInt from, PointInt control, PointInt to, int lineStyleIdx, int fillStyleIdx) { - super(from, to, lineStyleIdx, fillStyleIdx); - this.control = control; - } - - public PointInt getControl() { - return control; - } - - @Override - public IEdge reverseWithNewFillStyle(int newFillStyleIdx) { - return new CurvedEdge(to, control, from, lineStyleIdx, newFillStyleIdx); - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java b/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java deleted file mode 100644 index 368033c77..000000000 --- a/src/com/jpexs/decompiler/flash/exporters/shape/IEdge.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.shape; - -import com.jpexs.decompiler.flash.exporters.commonshape.PointInt; - -/** - * - * @author JPEXS - */ -public interface IEdge { - - public PointInt getFrom(); - - public PointInt getTo(); - - public int getLineStyleIdx(); - - public int getFillStyleIdx(); - - public IEdge reverseWithNewFillStyle(int newFillStyleIdx); -} diff --git a/src/com/jpexs/decompiler/flash/flv/DATA.java b/src/com/jpexs/decompiler/flash/flv/DATA.java deleted file mode 100644 index 4b858bc3e..000000000 --- a/src/com/jpexs/decompiler/flash/flv/DATA.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public abstract class DATA { - - public abstract byte[] getBytes(); -} diff --git a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java b/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java deleted file mode 100644 index e7e72844a..000000000 --- a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATADATE.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public class SCRIPTDATADATE { - - public double dateTime; - public int localDateTimeOffset; - - public SCRIPTDATADATE(double dateTime, int localDateTimeOffset) { - this.dateTime = dateTime; - this.localDateTimeOffset = localDateTimeOffset; - } -} diff --git a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java b/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java deleted file mode 100644 index 4508affd4..000000000 --- a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAOBJECT.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public class SCRIPTDATAOBJECT { - - public String objectName; - public SCRIPTDATAVALUE objectData; - - public SCRIPTDATAOBJECT(String objectName, SCRIPTDATAVALUE objectData) { - this.objectName = objectName; - this.objectData = objectData; - } -} diff --git a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java b/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java deleted file mode 100644 index a937e9eac..000000000 --- a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVALUE.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public class SCRIPTDATAVALUE { - - public int type; - public Object value; - - public SCRIPTDATAVALUE(int type, Object value) { - this.type = type; - this.value = value; - } - - public SCRIPTDATAVALUE(boolean b) { - this.value = (Boolean) b; - type = 1; - } - - public SCRIPTDATAVALUE(double d) { - this.value = (Double) d; - type = 0; - } -} diff --git a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java b/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java deleted file mode 100644 index 167938e35..000000000 --- a/src/com/jpexs/decompiler/flash/flv/SCRIPTDATAVARIABLE.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.flv; - -/** - * - * @author JPEXS - */ -public class SCRIPTDATAVARIABLE { - - public String variableName; - public SCRIPTDATAVALUE variableData; - - public SCRIPTDATAVARIABLE(String variableName, SCRIPTDATAVALUE variableData) { - this.variableName = variableName; - this.variableData = variableData; - } -} diff --git a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java index f28c418ae..29ce3022f 100644 --- a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java +++ b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java @@ -1,110 +1,151 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.gui; - -import com.jpexs.helpers.utf8.Utf8PrintWriter; -import java.io.BufferedReader; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * - * @author JPEXS - */ -public class LicenseUpdater { - - public static void updateLicense() { - updateLicenseInDir(new File(".\\src\\")); - } - - /** - * Script for updating license header in java files :-) - * - * @param dir Star directory (e.g. "src/") - */ - public static void updateLicenseInDir(File dir) { - int defaultStartYear = 2010; - int defaultFinalYear = 2013; - String defaultAuthor = "JPEXS"; - String defaultYearStr = "" + defaultStartYear; - if (defaultFinalYear != defaultStartYear) { - defaultYearStr += "-" + defaultFinalYear; - } - String license = "/*\r\n * Copyright (C) {year} {author}\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 3 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program. If not, see .\r\n */"; - - File[] files = dir.listFiles(); - for (File f : files) { - if (f.isDirectory()) { - updateLicenseInDir(f); - } else { - if (f.getName().endsWith(".java")) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintWriter pw = new Utf8PrintWriter(baos); - try { - try (BufferedReader br = new BufferedReader(new FileReader(f))) { - String s; - boolean packageFound = false; - String author = defaultAuthor; - String yearStr = defaultYearStr; - while ((s = br.readLine()) != null) { - if (!packageFound) { - if (s.trim().startsWith("package")) { - packageFound = true; - pw.println(license.replace("{year}", yearStr).replace("{author}", author)); - } else { - Matcher mAuthor = Pattern.compile("^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*)$").matcher(s); - if (mAuthor.matches()) { - author = mAuthor.group(3).trim(); - int startYear = Integer.parseInt(mAuthor.group(1).trim()); - if (startYear == defaultFinalYear) { - yearStr = "" + startYear; - } else { - yearStr = "" + startYear + "-" + defaultFinalYear; - } - if (!author.equals(defaultAuthor)) { - System.out.println("Detected nodefault author:" + author + " in " + f.getAbsolutePath()); - } - } - } - } - if (packageFound) { - pw.println(s); - } - } - } - pw.close(); - } catch (IOException ex) { - } - - FileOutputStream fos; - try { - fos = new FileOutputStream(f); - fos.write(baos.toByteArray()); - fos.close(); - } catch (IOException ex) { - } - } - } - } - } -} +/* + * Copyright (C) 2010-2014 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.jpexs.decompiler.flash.gui; + +import com.jpexs.helpers.utf8.Utf8PrintWriter; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * + * @author JPEXS + */ +public class LicenseUpdater { + + public static void updateLicense() { + updateLicenseInDir(new File(".\\src\\"),false); + updateLicenseInDir(new File(".\\test\\"),false); + updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\src\\"),true); + updateLicenseInDir(new File(".\\libsrc\\ffdec_lib\\test\\"),true); + } + + /** + * Script for updating license header in java files :-) + * + * @param dir Star directory (e.g. "src/") + */ + public static void updateLicenseInDir(File dir, boolean lgpl) { + + + /* + Copyright (c) ${year}, ${owner}, All rights reserved. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 3.0 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library. + + + */ + + int defaultStartYear = 2010; + int defaultFinalYear = 2014; + String defaultAuthor = "JPEXS"; + String defaultYearStr = "" + defaultStartYear; + if (defaultFinalYear != defaultStartYear) { + defaultYearStr += "-" + defaultFinalYear; + } + String gplLicense = "/*\r\n * Copyright (C) {year} {author}\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 3 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program. If not, see .\r\n */"; + + + String lgplLicense = "/*\r\n * Copyright (C) {year} {author}, All rights reserved.\r\n * \r\n" + + " * This library is free software; you can redistribute it and/or\r\n" + +" * modify it under the terms of the GNU Lesser General Public\r\n" + +" * License as published by the Free Software Foundation; either\r\n" + +" * version 3.0 of the License, or (at your option) any later version.\r\n" + +" * \r\n" + +" * This library is distributed in the hope that it will be useful,\r\n" + +" * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n" + +" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n" + +" * Lesser General Public License for more details.\r\n" + +" * \r\n" + +" * You should have received a copy of the GNU Lesser General Public\r\n" + +" * License along with this library.\r"+ +" */"; + String license = lgpl?lgplLicense:gplLicense; + + File[] files = dir.listFiles(); + for (File f : files) { + if (f.isDirectory()) { + updateLicenseInDir(f,lgpl); + } else { + if (f.getName().endsWith(".java")) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + PrintWriter pw = new Utf8PrintWriter(baos); + try { + try (BufferedReader br = new BufferedReader(new FileReader(f))) { + String s; + boolean packageFound = false; + String author = defaultAuthor; + String yearStr = defaultYearStr; + while ((s = br.readLine()) != null) { + if (!packageFound) { + if (s.trim().startsWith("package")) { + packageFound = true; + pw.println(license.replace("{year}", yearStr).replace("{author}", author)); + } else { + Matcher mAuthor = Pattern.compile(lgpl?"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*), All rights reserved.*":"^.*Copyright \\(C\\) ([0-9]+)(-[0-9]+)? (.*)$").matcher(s); + if (mAuthor.matches()) { + author = mAuthor.group(3).trim(); + int startYear = Integer.parseInt(mAuthor.group(1).trim()); + if (startYear == defaultFinalYear) { + yearStr = "" + startYear; + } else { + yearStr = "" + startYear + "-" + defaultFinalYear; + } + if (!author.equals(defaultAuthor)) { + System.out.println("Detected nodefault author:" + author + " in " + f.getAbsolutePath()); + } + } + } + } + if (packageFound) { + pw.println(s); + } + } + } + pw.close(); + } catch (IOException ex) { + } + + FileOutputStream fos; + try { + fos = new FileOutputStream(f); + fos.write(baos.toByteArray()); + fos.close(); + } catch (IOException ex) { + } + } + } + } + } +} diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index 3c4c455aa..a04ea85cd 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -878,7 +878,7 @@ public class Main { * @throws IOException */ public static void main(String[] args) throws IOException { - + String pluginPath = Configuration.pluginPath.get(); if (pluginPath != null && !pluginPath.isEmpty()) { try { diff --git a/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java b/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java deleted file mode 100644 index 128a397b5..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/EmptySWFDecompilerListener.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.action.ActionList; - -/** - * - * @author JPEXS - */ -public class EmptySWFDecompilerListener implements SWFDecompilerListener { - - @Override - public void actionListParsed(ActionList actions, SWF swf) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - -} diff --git a/src/com/jpexs/decompiler/flash/helpers/Freed.java b/src/com/jpexs/decompiler/flash/helpers/Freed.java deleted file mode 100644 index ab88f99f2..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/Freed.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -/** - * - * @author JPEXS - */ -public interface Freed { - - public boolean isFreeing(); - - public void free(); -} diff --git a/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java b/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java deleted file mode 100644 index 84374e402..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.graph.GraphSourceItem; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class GraphSourceItemPosition { - - public GraphSourceItem graphSourceItem; - public int position; - -} diff --git a/src/com/jpexs/decompiler/flash/helpers/HilightType.java b/src/com/jpexs/decompiler/flash/helpers/HilightType.java deleted file mode 100644 index 280a8a4b3..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/HilightType.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public enum HilightType { - - TRAIT, CLASS, METHOD, OFFSET, SPECIAL - -} diff --git a/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java b/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java deleted file mode 100644 index 213afe283..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/LoopWithType.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -/** - * Provides methods for highlighting positions of instructions in the text. - * - * @author JPEXS - */ -public class LoopWithType { - - public static int LOOP_TYPE_LOOP = 0; - public static int LOOP_TYPE_SWITCH = 1; - - public long loopId; - public int type; - public boolean used; - -} diff --git a/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java b/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java deleted file mode 100644 index aae9d27fa..000000000 --- a/src/com/jpexs/decompiler/flash/helpers/SWFDecompilerListener.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.helpers; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.action.ActionList; - -/** - * - * @author JPEXS - */ -public interface SWFDecompilerListener { - - void actionListParsed(ActionList actions, SWF swf); -} diff --git a/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java b/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java deleted file mode 100644 index 8a2d4a176..000000000 --- a/src/com/jpexs/decompiler/flash/tags/ABCContainerTag.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags; - -import com.jpexs.decompiler.flash.abc.ABC; - -/** - * - * @author JPEXS - */ -public interface ABCContainerTag extends Comparable { - - public ABC getABC(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/UnknownTag.java b/src/com/jpexs/decompiler/flash/tags/UnknownTag.java deleted file mode 100644 index acc4f58dc..000000000 --- a/src/com/jpexs/decompiler/flash/tags/UnknownTag.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags; - -import com.jpexs.decompiler.flash.SWF; -import com.jpexs.helpers.ByteArrayRange; - -/** - * - * @author JPEXS - */ -public class UnknownTag extends Tag { - - public UnknownTag(SWF swf, int id, ByteArrayRange data) { - super(swf, id, "Unknown", data); - } - - /** - * Gets data bytes - * - * @return Bytes of data - */ - @Override - public byte[] getData() { - return getOriginalRange().getRangeData(); - } - - @Override - public String toString() { - return super.toString() + " (ID=" + id + ")"; - } -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java b/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java deleted file mode 100644 index 4cd7d5b6f..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/AloneTag.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -/** - * - * @author JPEXS - */ -public interface AloneTag { -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java b/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java deleted file mode 100644 index c67199f68..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/BoundedTag.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.types.RECT; -import java.util.Set; - -/** - * - * @author JPEXS - */ -public interface BoundedTag { - - public RECT getRect(Set added); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/Container.java b/src/com/jpexs/decompiler/flash/tags/base/Container.java deleted file mode 100644 index 2d41065e0..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/Container.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.treeitems.TreeItem; -import java.util.List; - -/** - * Object which contains other objects - * - * @author JPEXS - */ -public interface Container extends TreeItem { - - /** - * Returns all sub-items - * - * @return List of sub-items - */ - public List getSubItems(); - - /** - * Returns number of sub-items - * - * @return Number of sub-items - */ - public int getItemCount(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java b/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java deleted file mode 100644 index ddf1ac2c9..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/ContainerItem.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.treeitems.TreeItem; - -/** - * Object which contains other objects - * - * @author JPEXS - */ -public interface ContainerItem extends TreeItem { - -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/Exportable.java b/src/com/jpexs/decompiler/flash/tags/base/Exportable.java deleted file mode 100644 index 818f0a47d..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/Exportable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -/** - * - * @author JPEXS - */ -public interface Exportable { - - public String getExportFileName(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java b/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java deleted file mode 100644 index 0a4d1f8a2..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/ImportTag.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import java.util.Map; - -/** - * - * @author JPEXS - */ -public interface ImportTag { - - public String getUrl(); - - public Map getAssets(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java b/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java deleted file mode 100644 index ab16703f2..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/MissingCharacterHandler.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import java.awt.Font; - -/** - * - * @author JPEXS - */ -public class MissingCharacterHandler { - - public boolean handle(FontTag font, char character) { - String fontName = font.getFontName(); - if (!FontTag.fontNames.contains(fontName)) { - return false; - } - Font f = new Font(fontName, font.getFontStyle(), 18); - if (!f.canDisplay(character)) { - return false; - } - font.addCharacter(character, fontName); - return true; - } -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java b/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java deleted file mode 100644 index 123e28453..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/NeedsCharacters.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import java.util.Set; - -/** - * - * @author JPEXS - */ -public interface NeedsCharacters { - - public void getNeededCharacters(Set needed); - - public boolean removeCharacter(int characterId); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java b/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java deleted file mode 100644 index 31139f13d..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/RemoveTag.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -/** - * - * @author JPEXS - */ -public interface RemoveTag { - - public int getDepth(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java b/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java deleted file mode 100644 index 539d8870f..000000000 --- a/src/com/jpexs/decompiler/flash/tags/base/SoundStreamHeadTypeTag.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.base; - -import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag; -import java.util.List; - -/** - * - * @author JPEXS - */ -public interface SoundStreamHeadTypeTag extends SoundTag { - - @Override - public boolean getSoundSize(); - - public long getSoundSampleCount(); - - public void setVirtualCharacterId(int ch); - - public int getCharacterId(); - - public List getBlocks(); -} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java b/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java deleted file mode 100644 index 1bca1b1e6..000000000 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/CharacterWithStyle.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -/** - * - * - * @author JPEXS - */ -public class CharacterWithStyle { - - public char character; - - public TextStyle style; -} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java b/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java deleted file mode 100644 index 89f7f32bb..000000000 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/GlyphCharacter.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import com.jpexs.decompiler.flash.types.GLYPHENTRY; - -/** - * - * - * @author JPEXS - */ -public class GlyphCharacter { - - public GLYPHENTRY glyphEntry; - - public char character; - - public GlyphCharacter(char character, GLYPHENTRY glyphEntry) { - - this.character = character; - this.glyphEntry = glyphEntry; - } -} diff --git a/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java b/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java deleted file mode 100644 index 4cb21caae..000000000 --- a/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.dynamictext; - -import java.util.ArrayList; -import java.util.List; - -/** - * - * - * @author JPEXS - */ -public class SameStyleTextRecord { - - public TextStyle style; - - public int xOffset; - - public int width; - - public List glyphEntries = new ArrayList<>(); - - public int calculateTexWidths() { - - int width = 0; - for (GlyphCharacter gc : glyphEntries) { - width += gc.glyphEntry.glyphAdvance; - } - this.width = width; - return width; - } -} diff --git a/src/com/jpexs/decompiler/flash/tags/text/ParseException.java b/src/com/jpexs/decompiler/flash/tags/text/ParseException.java deleted file mode 100644 index 524c7f561..000000000 --- a/src/com/jpexs/decompiler/flash/tags/text/ParseException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.text; - -public class ParseException extends Exception { - - public long line; - public String text; - - public ParseException(String text, long line) { - super("ParseException:" + text + " on line " + line); - this.line = line; - this.text = text; - } -} diff --git a/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java b/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java deleted file mode 100644 index 0a5e358bb..000000000 --- a/src/com/jpexs/decompiler/flash/tags/text/SymbolType.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.tags.text; - -/** - * - * @author JPEXS - */ -public enum SymbolType { - - TEXT, - PARAMETER -} diff --git a/src/com/jpexs/decompiler/flash/timeline/Clip.java b/src/com/jpexs/decompiler/flash/timeline/Clip.java deleted file mode 100644 index 8c284dc24..000000000 --- a/src/com/jpexs/decompiler/flash/timeline/Clip.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.timeline; - -import java.awt.Shape; - -/** - * - * @author JPEXS - */ -public class Clip { - - public Shape shape; - public int depth; - - public Clip(Shape shape, int depth) { - this.shape = shape; - this.depth = depth; - } -} diff --git a/src/com/jpexs/decompiler/flash/timeline/SvgClip.java b/src/com/jpexs/decompiler/flash/timeline/SvgClip.java deleted file mode 100644 index b5b090c00..000000000 --- a/src/com/jpexs/decompiler/flash/timeline/SvgClip.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.timeline; - -/** - * - * @author JPEXS - */ -public class SvgClip { - - public String shape; - public int depth; - - public SvgClip(String shape, int depth) { - this.shape = shape; - this.depth = depth; - } -} diff --git a/src/com/jpexs/decompiler/flash/timeline/Timelined.java b/src/com/jpexs/decompiler/flash/timeline/Timelined.java deleted file mode 100644 index 8b341182d..000000000 --- a/src/com/jpexs/decompiler/flash/timeline/Timelined.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.timeline; - -import com.jpexs.decompiler.flash.tags.base.BoundedTag; - -/** - * - * @author JPEXS - */ -public interface Timelined extends BoundedTag { - - public Timeline getTimeline(); - - public void resetTimeline(); -} diff --git a/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java b/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java deleted file mode 100644 index c8c8fe561..000000000 --- a/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -import com.jpexs.decompiler.flash.SWF; - -/** - * - * @author JPEXS - */ -public class AS2PackageNodeItem implements TreeItem { - - private final SWF swf; - public String packageName; - - public AS2PackageNodeItem(String packageName, SWF swf) { - this.swf = swf; - this.packageName = packageName; - } - - @Override - public SWF getSwf() { - return swf; - } - - @Override - public String toString() { - return packageName; - } -} diff --git a/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java b/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java deleted file mode 100644 index e640f30b4..000000000 --- a/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -import com.jpexs.decompiler.flash.SWF; - -/** - * - * @author JPEXS - */ -public class AS3PackageNodeItem implements TreeElementItem { - - private final SWF swf; - public String packageName; - - public AS3PackageNodeItem(String packageName, SWF swf) { - this.swf = swf; - this.packageName = packageName; - } - - @Override - public SWF getSwf() { - return swf; - } - - @Override - public String toString() { - return packageName; - } -} diff --git a/src/com/jpexs/decompiler/flash/treeitems/StringItem.java b/src/com/jpexs/decompiler/flash/treeitems/StringItem.java deleted file mode 100644 index 0d5ae8382..000000000 --- a/src/com/jpexs/decompiler/flash/treeitems/StringItem.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -import com.jpexs.decompiler.flash.SWF; - -/** - * - * @author JPEXS - */ -public class StringItem implements TreeItem { - - public SWF swf; - private final String str; - private final String name; - - public StringItem(String str, String name, SWF swf) { - this.swf = swf; - this.str = str; - this.name = name; - } - - public String getName() { - return name; - } - - @Override - public SWF getSwf() { - return swf; - } - - @Override - public String toString() { - return str; - } -} diff --git a/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java b/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java deleted file mode 100644 index 3e555b3c4..000000000 --- a/src/com/jpexs/decompiler/flash/treeitems/TreeElementItem.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -/** - * - * @author JPEXS - */ -public interface TreeElementItem extends TreeItem { - -} diff --git a/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java b/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java deleted file mode 100644 index b59b22bb6..000000000 --- a/src/com/jpexs/decompiler/flash/treeitems/TreeItem.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treeitems; - -import com.jpexs.decompiler.flash.SWF; - -/** - * - * @author JPEXS - */ -public interface TreeItem { - - public SWF getSwf(); -} diff --git a/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java b/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java deleted file mode 100644 index cd625cbd2..000000000 --- a/src/com/jpexs/decompiler/flash/treenodes/AS2PackageNode.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treenodes; - -import com.jpexs.decompiler.flash.treeitems.AS2PackageNodeItem; - -/** - * - * @author JPEXS - */ -public class AS2PackageNode extends TreeNode { - - public AS2PackageNode(AS2PackageNodeItem item) { - super(item); - } - - @Override - public AS2PackageNodeItem getItem() { - return (AS2PackageNodeItem) item; - } - -} diff --git a/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java b/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java deleted file mode 100644 index 791cc45fd..000000000 --- a/src/com/jpexs/decompiler/flash/treenodes/ContainerNode.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treenodes; - -import com.jpexs.decompiler.flash.tags.base.ContainerItem; - -/** - * - * @author JPEXS - */ -public class ContainerNode extends TreeNode { - - public ContainerNode(ContainerItem item) { - super(item); - } - - @Override - public ContainerItem getItem() { - return (ContainerItem) item; - } - -} diff --git a/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java b/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java deleted file mode 100644 index d6ac8a90c..000000000 --- a/src/com/jpexs/decompiler/flash/treenodes/FrameNode.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treenodes; - -import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.treeitems.FrameNodeItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class FrameNode extends TreeNode { - - public boolean scriptsNode = false; - - public FrameNode(FrameNodeItem item, List innerTags, boolean scriptsNode) { - super(item); - this.scriptsNode = scriptsNode; - if (innerTags != null) { - for (Tag tag : innerTags) { - subNodes.add(new TagNode(tag)); - } - } - } - - @Override - public FrameNodeItem getItem() { - return (FrameNodeItem) item; - } - -} diff --git a/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java b/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java deleted file mode 100644 index 7aa895340..000000000 --- a/src/com/jpexs/decompiler/flash/treenodes/HeaderNode.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.treenodes; - -import com.jpexs.decompiler.flash.treeitems.HeaderItem; - -/** - * - * @author JPEXS - */ -public class HeaderNode extends TreeNode { - - public HeaderNode(HeaderItem item) { - super(item); - } - - @Override - public HeaderItem getItem() { - return (HeaderItem) item; - } - -} diff --git a/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java b/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java deleted file mode 100644 index c6c1c3aff..000000000 --- a/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class ALPHABITMAPDATA implements Serializable { - - public ARGB[] bitmapPixelData = new ARGB[0]; -} diff --git a/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java b/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java deleted file mode 100644 index da2a7aab2..000000000 --- a/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class ALPHACOLORMAPDATA implements Serializable { - - public RGBA[] colorTableRGB; - public byte[] colorMapPixelData; -} diff --git a/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java b/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java deleted file mode 100644 index 76dc72409..000000000 --- a/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class BITMAPDATA implements Serializable { - - public PIX15[] bitmapPixelDataPix15 = new PIX15[0]; - public PIX24[] bitmapPixelDataPix24 = new PIX24[0]; -} diff --git a/src/com/jpexs/decompiler/flash/types/BasicType.java b/src/com/jpexs/decompiler/flash/types/BasicType.java deleted file mode 100644 index ec441c89c..000000000 --- a/src/com/jpexs/decompiler/flash/types/BasicType.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -/** - * - * @author JPEXS - */ -public enum BasicType { - - UI8, - UI16, - UI32, - EncodedU32, - SI8, - SI16, - SI32, - UB, - SB, - FB, - FLOAT, - FLOAT16, - FIXED, - FIXED8, - NONE, - OTHER -} diff --git a/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java b/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java deleted file mode 100644 index fb1bcdf4d..000000000 --- a/src/com/jpexs/decompiler/flash/types/CLIPACTIONS.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Reserved; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * Define event handlers for a sprite character - * - * @author JPEXS - */ -public class CLIPACTIONS implements Serializable { - - @Reserved - @SWFType(BasicType.UI16) - public int reserved; - /** - * All events used in these clip actions - */ - public CLIPEVENTFLAGS allEventFlags; - /** - * Individual event handlers - */ - public List clipActionRecords = new ArrayList<>(); -} diff --git a/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java b/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java deleted file mode 100644 index cb70f4b13..000000000 --- a/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import java.io.Serializable; - -/** - * @author JPEXS - */ -public class COLORMAPDATA implements Serializable { - - public RGB[] colorTableRGB; - public byte[] colorMapPixelData; -} diff --git a/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java b/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java deleted file mode 100644 index 8f7767591..000000000 --- a/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class FOCALGRADIENT extends GRADIENT implements Serializable { - - @SWFType(BasicType.FIXED8) - public float focalPoint; -} diff --git a/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java b/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java deleted file mode 100644 index 7c79fc0ec..000000000 --- a/src/com/jpexs/decompiler/flash/types/GLYPHENTRY.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class GLYPHENTRY implements Serializable { - - @SWFType(value = BasicType.UB, countField = "+glyphBits") - public int glyphIndex; - @SWFType(value = BasicType.SB, countField = "advanceBits") - public int glyphAdvance; - - @Override - public String toString() { - return "[GLYPHENTRY index=" + glyphIndex + ", advance=" + glyphAdvance + "]"; - } -} diff --git a/src/com/jpexs/decompiler/flash/types/GRADRECORD.java b/src/com/jpexs/decompiler/flash/types/GRADRECORD.java deleted file mode 100644 index 74e1fe9f3..000000000 --- a/src/com/jpexs/decompiler/flash/types/GRADRECORD.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.Internal; -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class GRADRECORD implements Serializable { - - @SWFType(BasicType.UI8) - public int ratio; - - @Internal - public boolean inShape3; - public RGB color; - - public float getRatioFloat() { - return ((float) ratio) / 255.0f; - } -} diff --git a/src/com/jpexs/decompiler/flash/types/LANGCODE.java b/src/com/jpexs/decompiler/flash/types/LANGCODE.java deleted file mode 100644 index 04815a2d9..000000000 --- a/src/com/jpexs/decompiler/flash/types/LANGCODE.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class LANGCODE implements Serializable { - - @SWFType(BasicType.UI8) - public int languageCode; - - public LANGCODE() { - } - - public LANGCODE(int languageCode) { - this.languageCode = languageCode; - } - - @Override - public String toString() { - return "[LANGCODE:" + languageCode + "]"; - } - -} diff --git a/src/com/jpexs/decompiler/flash/types/PIX15.java b/src/com/jpexs/decompiler/flash/types/PIX15.java deleted file mode 100644 index 73e1901a3..000000000 --- a/src/com/jpexs/decompiler/flash/types/PIX15.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Represents 15-bit red, green and blue value - * - * @author JPEXS - */ -public class PIX15 implements Serializable { - - /** - * Red color value - */ - @SWFType(value = BasicType.UB, count = 5) - public int red; - /** - * Green color value - */ - @SWFType(value = BasicType.UB, count = 5) - public int green; - /** - * Blue color value - */ - @SWFType(value = BasicType.UB, count = 5) - public int blue; -} diff --git a/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java b/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java deleted file mode 100644 index ec7de58d4..000000000 --- a/src/com/jpexs/decompiler/flash/types/SOUNDENVELOPE.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class SOUNDENVELOPE implements Serializable { - - @SWFType(BasicType.UI32) - public long pos44; - @SWFType(BasicType.UI16) - public int leftLevel; - @SWFType(BasicType.UI16) - public int rightLevel; -} diff --git a/src/com/jpexs/decompiler/flash/types/ZONEDATA.java b/src/com/jpexs/decompiler/flash/types/ZONEDATA.java deleted file mode 100644 index 39b93be6d..000000000 --- a/src/com/jpexs/decompiler/flash/types/ZONEDATA.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types; - -import com.jpexs.decompiler.flash.types.annotations.SWFType; -import java.io.Serializable; - -/** - * Represents 32-bit alpha, red, green and blue value - * - * @author JPEXS - */ -public class ZONEDATA implements Serializable { - - @SWFType(BasicType.FLOAT16) - public int alignmentCoordinate; - @SWFType(BasicType.FLOAT16) - public int range; - - @Override - public String toString() { - return "[ZONEDATA alignmentCoordinate=" + alignmentCoordinate + ", range=" + range + "]"; - } -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java b/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java deleted file mode 100644 index 4f4e3be94..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/Calculated.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Field is internal - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Calculated { - -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Internal.java b/src/com/jpexs/decompiler/flash/types/annotations/Internal.java deleted file mode 100644 index f4ab225de..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/Internal.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Field is internal - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Internal { - -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java b/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java deleted file mode 100644 index 68df7734a..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/Multiline.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -/** - * The String field can have large multiline text - * - * @author JPEXS - */ -public @interface Multiline { - -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Optional.java b/src/com/jpexs/decompiler/flash/types/annotations/Optional.java deleted file mode 100644 index 44173f153..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/Optional.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * The field is optional anc can be unset - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Optional { - -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java b/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java deleted file mode 100644 index dd330bc99..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/Reserved.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Field is reserved - * - * @author JPEXS - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Reserved { -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java b/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java deleted file mode 100644 index 8e8dcc3e7..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionToken.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -/** - * - * @author JPEXS - */ -public class ConditionToken { - - public String value; - public ConditionTokenType type; - - public ConditionToken(ConditionTokenType type, String value) { - this.value = value; - this.type = type; - } - - @Override - public String toString() { - return type.toString() + (value != null ? "[" + value + "]" : ""); - } - -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java b/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java deleted file mode 100644 index 9dfc3f0c5..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionTokenType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -/** - * - * @author JPEXS - */ -public enum ConditionTokenType { - - FIELD, - OR, - AND, - PARENT_OPEN, - PARENT_CLOSE, - NOT -} diff --git a/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java b/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java deleted file mode 100644 index 092a633bb..000000000 --- a/src/com/jpexs/decompiler/flash/types/annotations/parser/ParseException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.types.annotations.parser; - -public class ParseException extends Exception { - - public long line; - public String text; - - public ParseException(String text, long line) { - super("ParseException:" + text + " on line " + line); - this.line = line; - this.text = text; - } -} diff --git a/src/com/jpexs/decompiler/graph/Block.java b/src/com/jpexs/decompiler/graph/Block.java deleted file mode 100644 index dfd1aaee7..000000000 --- a/src/com/jpexs/decompiler/graph/Block.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import com.jpexs.decompiler.graph.model.ContinueItem; -import java.util.List; - -public interface Block { - - public List getContinues(); - - public List> getSubs(); -} diff --git a/src/com/jpexs/decompiler/graph/CompilationException.java b/src/com/jpexs/decompiler/graph/CompilationException.java deleted file mode 100644 index b6fa3d8a0..000000000 --- a/src/com/jpexs/decompiler/graph/CompilationException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -/** - * - * @author JPEXS - */ -public class CompilationException extends Exception { - - public int line; - public String text; - - public CompilationException(String message, int line) { - super("Compilation error on line " + line + ": " + message); - this.line = line; - this.text = message; - } - -} diff --git a/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java b/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java deleted file mode 100644 index 395420bfe..000000000 --- a/src/com/jpexs/decompiler/graph/GraphSourceItemPos.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.io.Serializable; - -/** - * - * @author JPEXS - */ -public class GraphSourceItemPos implements Serializable { - - public GraphSourceItem item; - public int pos; - - public GraphSourceItemPos(GraphSourceItem item, int pos) { - this.item = item; - this.pos = pos; - } -} diff --git a/src/com/jpexs/decompiler/graph/ScopeStack.java b/src/com/jpexs/decompiler/graph/ScopeStack.java deleted file mode 100644 index 0323bd599..000000000 --- a/src/com/jpexs/decompiler/graph/ScopeStack.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.util.Stack; - -/** - * - * @author JPEXS - */ -public class ScopeStack extends Stack { - -} diff --git a/src/com/jpexs/decompiler/graph/TranslateException.java b/src/com/jpexs/decompiler/graph/TranslateException.java deleted file mode 100644 index 64ed25df9..000000000 --- a/src/com/jpexs/decompiler/graph/TranslateException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -/** - * - * @author JPEXS - */ -public class TranslateException extends RuntimeException { - - public TranslateException(String s) { - super(s); - } -} diff --git a/src/com/jpexs/decompiler/graph/TranslateStack.java b/src/com/jpexs/decompiler/graph/TranslateStack.java deleted file mode 100644 index 8669c6d27..000000000 --- a/src/com/jpexs/decompiler/graph/TranslateStack.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph; - -import java.util.Stack; - -/** - * - * @author JPEXS - */ -public class TranslateStack extends Stack { - -} diff --git a/src/com/jpexs/decompiler/graph/model/BinaryOp.java b/src/com/jpexs/decompiler/graph/model/BinaryOp.java deleted file mode 100644 index 59d05f818..000000000 --- a/src/com/jpexs/decompiler/graph/model/BinaryOp.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.List; - -/** - * - * @author JPEXS - */ -public interface BinaryOp { - - public GraphTargetItem getLeftSide(); - - public GraphTargetItem getRightSide(); - - public void setLeftSide(GraphTargetItem value); - - public void setRightSide(GraphTargetItem value); - - public int getPrecedence(); - - public List getAllSubItems(); -} diff --git a/src/com/jpexs/decompiler/graph/model/ExitItem.java b/src/com/jpexs/decompiler/graph/model/ExitItem.java deleted file mode 100644 index a84f6e1d0..000000000 --- a/src/com/jpexs/decompiler/graph/model/ExitItem.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -/** - * - * @author JPEXS - */ -public interface ExitItem { -} diff --git a/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java b/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java deleted file mode 100644 index dbfa8c64f..000000000 --- a/src/com/jpexs/decompiler/graph/model/LogicalOpItem.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public interface LogicalOpItem { - - public GraphTargetItem invert(); -} diff --git a/src/com/jpexs/decompiler/graph/model/LoopItem.java b/src/com/jpexs/decompiler/graph/model/LoopItem.java deleted file mode 100644 index 624c3c4fd..000000000 --- a/src/com/jpexs/decompiler/graph/model/LoopItem.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.graph.GraphSourceItem; -import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.Loop; - -public abstract class LoopItem extends GraphTargetItem { - - public Loop loop; - - public LoopItem(GraphSourceItem src, Loop loop) { - super(src, NOPRECEDENCE); - this.loop = loop; - } -} diff --git a/src/com/jpexs/decompiler/graph/model/UnaryOp.java b/src/com/jpexs/decompiler/graph/model/UnaryOp.java deleted file mode 100644 index 3f95e87b1..000000000 --- a/src/com/jpexs/decompiler/graph/model/UnaryOp.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.graph.model; - -import com.jpexs.decompiler.graph.GraphTargetItem; - -/** - * - * @author JPEXS - */ -public interface UnaryOp { - - public GraphTargetItem getValue(); - - public int getPrecedence(); -} diff --git a/src/com/jpexs/helpers/Callback.java b/src/com/jpexs/helpers/Callback.java deleted file mode 100644 index 075cab1b3..000000000 --- a/src/com/jpexs/helpers/Callback.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -/** - * Class with helper method - * - * @author JPEXS - * @param - */ -public abstract class Callback { - - public abstract void call(T arg1); -} diff --git a/src/com/jpexs/helpers/NulStream.java b/src/com/jpexs/helpers/NulStream.java deleted file mode 100644 index 482da60bb..000000000 --- a/src/com/jpexs/helpers/NulStream.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.OutputStream; - -/** - * - * @author JPEXS - */ -public class NulStream extends OutputStream { - - @Override - public void write(int i) { - } - -} diff --git a/src/com/jpexs/helpers/PosMarkedInputStream.java b/src/com/jpexs/helpers/PosMarkedInputStream.java deleted file mode 100644 index 9f1779cf7..000000000 --- a/src/com/jpexs/helpers/PosMarkedInputStream.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -import java.io.IOException; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public class PosMarkedInputStream extends InputStream { - - private long pos = 0; - private final InputStream is; - - public PosMarkedInputStream(InputStream is) { - this.is = is; - } - - @Override - public int read() throws IOException { - incPos(); - return is.read(); - } - - public long getPos() { - return pos; - } - - public void setPos(long pos) throws IOException { - this.pos = pos; - } - - public void incPos() { - this.pos++; - } -} diff --git a/src/com/jpexs/helpers/ProgressListener.java b/src/com/jpexs/helpers/ProgressListener.java deleted file mode 100644 index 11cd062ed..000000000 --- a/src/com/jpexs/helpers/ProgressListener.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers; - -/** - * - * @author JPEXS - */ -public interface ProgressListener { - - public void progress(int p); -} diff --git a/src/com/jpexs/helpers/streams/SeekableInputStream.java b/src/com/jpexs/helpers/streams/SeekableInputStream.java deleted file mode 100644 index aa336d94c..000000000 --- a/src/com/jpexs/helpers/streams/SeekableInputStream.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.streams; - -import java.io.IOException; -import java.io.InputStream; - -/** - * - * @author JPEXS - */ -public abstract class SeekableInputStream extends InputStream { - - public abstract void seek(long pos) throws IOException; -} diff --git a/src/com/jpexs/helpers/utf8/Utf8Helper.java b/src/com/jpexs/helpers/utf8/Utf8Helper.java deleted file mode 100644 index cc099f3ed..000000000 --- a/src/com/jpexs/helpers/utf8/Utf8Helper.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.utf8; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.nio.charset.Charset; - -/** - * - * @author JPEXS - */ -public class Utf8Helper { - - public static Charset charset = Charset.forName("UTF-8"); - - public static String urlDecode(String s) { - try { - return URLDecoder.decode(s, "UTF-8"); - } catch (UnsupportedEncodingException ex) { - throw new Error(ex); - } - } - - public static byte[] getBytes(String string) { - return string.getBytes(charset); - } -} diff --git a/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java b/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java deleted file mode 100644 index ef9dd37a0..000000000 --- a/src/com/jpexs/helpers/utf8/Utf8InputStreamReader.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.utf8; - -import java.io.InputStream; -import java.io.InputStreamReader; - -/** - * - * @author JPEXS - */ -public class Utf8InputStreamReader extends InputStreamReader { - - public Utf8InputStreamReader(InputStream in) { - super(in, Utf8Helper.charset); - } -} diff --git a/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java b/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java deleted file mode 100644 index eaadaa577..000000000 --- a/src/com/jpexs/helpers/utf8/Utf8OutputStreamWriter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.utf8; - -import java.io.OutputStream; -import java.io.OutputStreamWriter; - -/** - * - * @author JPEXS - */ -public class Utf8OutputStreamWriter extends OutputStreamWriter { - - public Utf8OutputStreamWriter(OutputStream out) { - super(out, Utf8Helper.charset); - } -} diff --git a/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java b/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java deleted file mode 100644 index 9954b9c3c..000000000 --- a/src/com/jpexs/helpers/utf8/Utf8PrintWriter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.helpers.utf8; - -import java.io.OutputStream; -import java.io.PrintWriter; - -/** - * - * @author JPEXS - */ -public class Utf8PrintWriter extends PrintWriter { - - public Utf8PrintWriter(OutputStream out) { - super(new Utf8OutputStreamWriter(out)); - } -} diff --git a/src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java b/test/SampleTest.java similarity index 76% rename from src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java rename to test/SampleTest.java index bb9a75d51..306b8f624 100644 --- a/src/com/jpexs/decompiler/flash/exporters/modes/BinaryDataExportMode.java +++ b/test/SampleTest.java @@ -1,26 +1,30 @@ -/* - * Copyright (C) 2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.exporters.modes; - -/** - * - * @author JPEXS - */ -public enum BinaryDataExportMode { - - RAW -} +/* + * Copyright (C) 2010-2014 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +import org.testng.annotations.Test; + +/** + * + * @author JPEXS + */ +public class SampleTest { + + @Test + public void testDecompilePcode() { + System.out.println("Hello, this is a test"); + } + +} diff --git a/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java b/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java deleted file mode 100644 index 7f10cded2..000000000 --- a/test/com/jpexs/decompiler/flash/ActionScriptTestBase.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010-2014 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash; - -/** - * - * @author JPEXS - */ -public class ActionScriptTestBase { - - protected String cleanPCode(String pCode) { - pCode = pCode.replaceAll(" *[\r\n]+ *", "\n").trim(); - pCode = pCode.replaceAll(" +", " ").trim(); - return pCode; - } -} diff --git a/testdata/as3/build_debug.bat b/testdata/as3/build_debug.bat deleted file mode 100644 index f71ae89e3..000000000 --- a/testdata/as3/build_debug.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -build.bat debug \ No newline at end of file