v0.9.4: removed unnecessary texture reference in TextureFilm
This commit is contained in:
parent
001c40f15e
commit
72275d240d
|
@ -34,13 +34,11 @@ public class TextureFilm {
|
||||||
private int texWidth;
|
private int texWidth;
|
||||||
private int texHeight;
|
private int texHeight;
|
||||||
|
|
||||||
private SmartTexture texture;
|
|
||||||
|
|
||||||
protected HashMap<Object,RectF> frames = new HashMap<>();
|
protected HashMap<Object,RectF> frames = new HashMap<>();
|
||||||
|
|
||||||
public TextureFilm( Object tx ) {
|
public TextureFilm( Object tx ) {
|
||||||
|
|
||||||
texture = TextureCache.get( tx );
|
SmartTexture texture = TextureCache.get( tx );
|
||||||
|
|
||||||
texWidth = texture.width;
|
texWidth = texture.width;
|
||||||
texHeight = texture.height;
|
texHeight = texture.height;
|
||||||
|
@ -54,7 +52,7 @@ public class TextureFilm {
|
||||||
|
|
||||||
public TextureFilm( Object tx, int width, int height ) {
|
public TextureFilm( Object tx, int width, int height ) {
|
||||||
|
|
||||||
texture = TextureCache.get( tx );
|
SmartTexture texture = TextureCache.get( tx );
|
||||||
|
|
||||||
texWidth = texture.width;
|
texWidth = texture.width;
|
||||||
texHeight = texture.height;
|
texHeight = texture.height;
|
||||||
|
@ -74,8 +72,6 @@ public class TextureFilm {
|
||||||
|
|
||||||
public TextureFilm( TextureFilm atlas, Object key, int width, int height ) {
|
public TextureFilm( TextureFilm atlas, Object key, int width, int height ) {
|
||||||
|
|
||||||
texture = atlas.texture;
|
|
||||||
|
|
||||||
texWidth = atlas.texWidth;
|
texWidth = atlas.texWidth;
|
||||||
texHeight = atlas.texHeight;
|
texHeight = atlas.texHeight;
|
||||||
|
|
||||||
|
@ -99,8 +95,13 @@ public class TextureFilm {
|
||||||
frames.put( id, rect );
|
frames.put( id, rect );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add( Object id, int left, int top, int right, int bottom){
|
public void add( Object id, float left, float top, float right, float bottom){
|
||||||
frames.put( id, texture.uvRect(left, top, right, bottom));
|
frames.put( id,
|
||||||
|
new RectF(
|
||||||
|
left / texWidth,
|
||||||
|
top / texHeight,
|
||||||
|
right / texWidth,
|
||||||
|
bottom / texHeight ));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RectF get( Object id ) {
|
public RectF get( Object id ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user