mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 13:00:47 +00:00
Initial version based on previous work. (Version alpha 7)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.jpexs.asdec.action.swf4;
|
||||
|
||||
import com.jpexs.asdec.action.Action;
|
||||
import com.jpexs.asdec.action.treemodel.ConstantPool;
|
||||
import com.jpexs.asdec.action.treemodel.DirectValueTreeItem;
|
||||
import com.jpexs.asdec.action.treemodel.GetPropertyTreeItem;
|
||||
import com.jpexs.asdec.action.treemodel.TreeItem;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
public class ActionGetProperty extends Action {
|
||||
|
||||
public ActionGetProperty() {
|
||||
super(0x22, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetProperty";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void translate(Stack<TreeItem> stack, ConstantPool constants, List<TreeItem> output) {
|
||||
TreeItem index = stack.pop();
|
||||
TreeItem target = stack.pop();
|
||||
int indexInt = 0;
|
||||
if (index instanceof DirectValueTreeItem) {
|
||||
if (((DirectValueTreeItem) index).value instanceof Long) {
|
||||
indexInt = (int) (long) (Long) ((DirectValueTreeItem) index).value;
|
||||
}
|
||||
}
|
||||
stack.push(new GetPropertyTreeItem(this, target, indexInt));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user