|
From: Mark B. <cap...@us...> - 2004-09-28 22:10:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/model/loaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28437/src/java/org/lwjgl/util/model/loaders Modified Files: XMLLoader.java Log Message: Update tag names to prevent conflicts when validating XML files. Index: XMLLoader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/model/loaders/XMLLoader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- XMLLoader.java 12 Jun 2004 20:28:28 -0000 1.3 +++ XMLLoader.java 28 Sep 2004 22:10:39 -0000 1.4 @@ -78,9 +78,9 @@ * @throws Exception */ public Model load() throws Exception { - String name = XMLUtil.getString(src.getDocumentElement(), "name"); + String name = XMLUtil.getString(src.getDocumentElement(), "modelname"); String material = XMLUtil.getString(src.getDocumentElement(), "material"); - numVertices = XMLUtil.getInt(src.getDocumentElement(), "vertices"); + numVertices = XMLUtil.getInt(src.getDocumentElement(), "vertexcount"); if (XMLUtil.getString(src.getDocumentElement(), "type").equals("boned")) { // It's a boned model numBones = XMLUtil.getInt(src.getDocumentElement(), "bones", 0); @@ -218,7 +218,7 @@ Map animations = new HashMap(sequenceElements.size()); for (Iterator i = sequenceElements.iterator(); i.hasNext(); ) { Element sequenceElement = (Element) i.next(); - animations.put(XMLUtil.getString(sequenceElement, "name"), loadBonedAnimation(sequenceElement)); + animations.put(XMLUtil.getString(sequenceElement, "sequencename"), loadBonedAnimation(sequenceElement)); } return animations; } @@ -233,11 +233,11 @@ if (animationElement == null) { return null; } - List sequenceElements = XMLUtil.getChildren(src.getDocumentElement(), "sequence"); + List sequenceElements = XMLUtil.getChildren(animationElement, "sequence"); Map animations = new HashMap(sequenceElements.size()); for (Iterator i = sequenceElements.iterator(); i.hasNext(); ) { Element sequenceElement = (Element) i.next(); - animations.put(XMLUtil.getString(sequenceElement, "name"), loadMeshAnimation(sequenceElement)); + animations.put(XMLUtil.getString(sequenceElement, "sequencename"), loadMeshAnimation(sequenceElement)); } return animations; } @@ -372,10 +372,10 @@ */ private Color loadColor(Element element) throws Exception { return new Color( - XMLUtil.getInt(element, "r"), - XMLUtil.getInt(element, "g"), - XMLUtil.getInt(element, "b"), - XMLUtil.getInt(element, "a", 255) + XMLUtil.getInt(element, "red"), + XMLUtil.getInt(element, "green"), + XMLUtil.getInt(element, "blue"), + XMLUtil.getInt(element, "alpha", 255) ); } |