Jump to content

jraselin

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by jraselin

  1. I've done some patch to fix these bugs

    Character map with "hidden" object => the objects are still drawed

    inside SCMLReader


    protected void loadCharacterMaps(ArrayList maps, Entity entity) {
    for (int i = 0; i < maps.size(); i++) {
    Element map = maps.get(i);
    Entity.CharacterMap charMap = new Entity.CharacterMap(map.getInt("id"), map.getAttribute("name", "charMap"
    + i));
    entity.addCharacterMap(charMap);
    ArrayList mappings = map.getChildrenByName("map");
    for (Element mapping : mappings) {
    int folder = mapping.getInt("folder");
    int file = mapping.getInt("file");
    if (mapping.get("target_folder", null) == null) {
    charMap.put(new FileReference(folder, file), null);
    } else {
    charMap.put(new FileReference(folder, file), new FileReference(mapping.getInt("target_folder"),
    mapping.getInt("target_file")));
    }
    }
    }
    }

    and the Drawer


    public void draw(Iterator it, CharacterMap[] maps) {
    while (it.hasNext()) {
    Timeline.Key.Object object = it.next();
    if (object.ref.hasFile()) {
    // apply map
    if (maps != null) {
    for (CharacterMap map : maps) {
    // key exists
    if (map != null && map.containsKey(object.ref)) {
    // draw if not "hidden"
    if (map.get(object.ref) != null) {
    object.ref.set(map.get(object.ref));
    this.draw(object);
    }
    break;
    } else {
    this.draw(object);
    }
    }
    } else {
    this.draw(object);
    }

    }
    }
    }

    Project resize => animations KO

    It's a bug from Spriter's resize feature, images are resized but not the width and height attributes of the scml file

    initial project's scml file



    the scml file (and images) resized with ratio = 0.5



    instead of



    The importer is OK with correct width and height

×
×
  • Create New...