more work on TextureAtlas
This commit is contained in:
parent
8d96aacf3f
commit
cd1b7e518a
@ -59,11 +59,27 @@
|
||||
*/
|
||||
package org.oscim.renderer.sublayers;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.oscim.utils.pool.Inlist;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
public class TextureAtlas {
|
||||
public class TextureAtlas{
|
||||
|
||||
public static class SpriteManager{
|
||||
TextureAtlas atlas;
|
||||
HashMap<Object, Rect> items;
|
||||
|
||||
public Rect getRegion(Object item){
|
||||
return items.get(item);
|
||||
}
|
||||
|
||||
public Rect addItem(int width, int height){
|
||||
return atlas.getRegion(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
/** Allocated slots */
|
||||
public Slot mSlots;
|
||||
private Rect mRects;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user