mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 06:46:09 +00:00
Generic tag editor: Improved tables editing (Import/Export assets, etc.)
This commit is contained in:
@@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Table;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -39,16 +40,20 @@ public class DefineSceneAndFrameLabelDataTag extends Tag {
|
||||
|
||||
@SWFType(value = BasicType.EncodedU32)
|
||||
@SWFArray(value = "offset", countField = "sceneCount")
|
||||
@Table(value = "scenes", itemName = "scene")
|
||||
public long[] sceneOffsets;
|
||||
|
||||
@SWFArray(value = "name", countField = "sceneCount")
|
||||
@Table(value = "scenes", itemName = "scene")
|
||||
public String[] sceneNames;
|
||||
|
||||
@SWFType(value = BasicType.EncodedU32)
|
||||
@SWFArray(value = "frameNum", countField = "frameLabelCount")
|
||||
@Table(value = "frames", itemName = "frame")
|
||||
public long[] frameNums;
|
||||
|
||||
@SWFArray(countField = "frameLabelCount")
|
||||
@Table(value = "frames", itemName = "frame")
|
||||
public String[] frameNames;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.tags.base.SymbolClassTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Table;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -46,9 +47,11 @@ public class ExportAssetsTag extends SymbolClassTypeTag {
|
||||
*/
|
||||
@SWFType(value = BasicType.UI16)
|
||||
@SWFArray(value = "tag", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<Integer> tags;
|
||||
|
||||
@SWFArray(value = "name", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<String> names;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Table;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -59,9 +60,11 @@ public class ImportAssets2Tag extends Tag implements ImportTag {
|
||||
*/
|
||||
@SWFType(value = BasicType.UI16)
|
||||
@SWFArray(value = "tag", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<Integer> tags;
|
||||
|
||||
@SWFArray(value = "name", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<String> names;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.tags.base.ImportTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Table;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -50,9 +51,11 @@ public class ImportAssetsTag extends Tag implements ImportTag {
|
||||
*/
|
||||
@SWFType(value = BasicType.UI16)
|
||||
@SWFArray(value = "tag", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<Integer> tags;
|
||||
|
||||
@SWFArray(value = "name", countField = "count")
|
||||
@Table(value = "assets", itemName = "asset")
|
||||
public List<String> names;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.tags.base.SymbolClassTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Table;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -38,9 +39,11 @@ public class SymbolClassTag extends SymbolClassTypeTag {
|
||||
|
||||
@SWFType(value = BasicType.UI16)
|
||||
@SWFArray(value = "tag", countField = "numSymbols")
|
||||
@Table(value = "symbols", itemName = "symbol")
|
||||
public List<Integer> tags;
|
||||
|
||||
@SWFArray(value = "name", countField = "numSymbols")
|
||||
@Table(value = "symbols", itemName = "symbol")
|
||||
public List<String> names;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for 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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface Table {
|
||||
|
||||
String value();
|
||||
|
||||
String itemName() default "";
|
||||
}
|
||||
Reference in New Issue
Block a user