1 package org.catacomb.datalish; 2 3 import org.catacomb.be.Position; 4 import org.catacomb.datalish.SColor; 5 6 import java.util.ArrayList; 7 8 public class SpriteData { 9 10 String name; 11 12 ArrayList<SpritePart> parts; 13 ArrayList<SpriteMarker> markers; 14 15 16 17 public SpriteData(String s) { 18 name = s; 19 parts = new ArrayList<SpritePart>(); 20 markers = new ArrayList<SpriteMarker>(); 21 } 22 23 public String getName() { 24 return name; 25 } 26 27 28 public void addMarker(String id, Position position) { 29 markers.add(new SpriteMarker(id, position)); 30 31 } 32 33 public void addSpritePart(double[] xpts, double[] ypts, double lineWidth, 34 SColor lineColor, SColor fillColor, int ocf) { 35 parts.add(new SpritePart(xpts, ypts, lineWidth, lineColor, fillColor, ocf)); 36 37 } 38 39 public void pushBox(Box b) { 40 for (SpritePart sp : parts) { 41 sp.pushBox(b); 42 } 43 } 44 45 public ArrayList<SpritePart> getParts() { 46 return parts; 47 } 48 49 public ArrayList<SpriteMarker> getMarkers() { 50 return markers; 51 } 52 53 54 }