mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-19 23:35:32 +00:00
Factorize depth to interface
This commit is contained in:
@@ -331,6 +331,11 @@ public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MATRIX getMatrix() {
|
||||
if (placeFlagHasMatrix) {
|
||||
|
||||
@@ -518,6 +518,11 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MATRIX getMatrix() {
|
||||
if (placeFlagHasMatrix) {
|
||||
|
||||
@@ -539,6 +539,11 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MATRIX getMatrix() {
|
||||
if (placeFlagHasMatrix) {
|
||||
|
||||
@@ -173,6 +173,11 @@ public class PlaceObjectTag extends PlaceObjectTypeTag {
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MATRIX getMatrix() {
|
||||
return matrix;
|
||||
|
||||
@@ -81,4 +81,9 @@ public class RemoveObject2Tag extends RemoveTag {
|
||||
public int getDepth() {
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,11 @@ public class RemoveObjectTag extends RemoveTag implements CharacterIdTag {
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDepth(int depth) {
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCharacterId() {
|
||||
return characterId;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for 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 DepthTag {
|
||||
public int getDepth();
|
||||
|
||||
public void setDepth(int depth);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ import java.util.Objects;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag {
|
||||
public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag, DepthTag {
|
||||
|
||||
public PlaceObjectTypeTag(SWF swf, int id, String name, ByteArrayRange data) {
|
||||
super(swf, id, name, data);
|
||||
@@ -42,8 +42,6 @@ public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag {
|
||||
|
||||
public abstract int getPlaceObjectNum();
|
||||
|
||||
public abstract int getDepth();
|
||||
|
||||
public abstract MATRIX getMatrix();
|
||||
|
||||
public abstract void setMatrix(MATRIX matrix);
|
||||
|
||||
@@ -24,14 +24,12 @@ import com.jpexs.helpers.ByteArrayRange;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public abstract class RemoveTag extends Tag {
|
||||
public abstract class RemoveTag extends Tag implements DepthTag {
|
||||
|
||||
public RemoveTag(SWF swf, int id, String name, ByteArrayRange data) {
|
||||
super(swf, id, name, data);
|
||||
}
|
||||
|
||||
public abstract int getDepth();
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
String result = super.getName();
|
||||
|
||||
Reference in New Issue
Block a user