From: <chr...@us...> - 2006-12-23 20:54:33
|
Revision: 1231 http://svn.sourceforge.net/gridarta/?rev=1231&view=rev Author: christianhujer Date: 2006-12-23 12:54:30 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Unified CFArchAttrib. Also fixes a bug in cfeditor.CFArchAttrib. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFArchAttrib.java trunk/daimonin/src/daieditor/CFArchAttrib.java Modified: trunk/crossfire/src/cfeditor/CFArchAttrib.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-23 20:49:43 UTC (rev 1230) +++ trunk/crossfire/src/cfeditor/CFArchAttrib.java 2006-12-23 20:54:30 UTC (rev 1231) @@ -153,7 +153,7 @@ dataType = ArchAttribType.FLOAT; } else if (atype.equalsIgnoreCase("string")) { dataType = ArchAttribType.STRING; - } else if (atype.equalsIgnoreCase("text")) { + } else if (atype.equalsIgnoreCase("facename")) { dataType = ArchAttribType.FACENAME; } else if (atype.equalsIgnoreCase("animname")) { dataType = ArchAttribType.ANIMNAME; Modified: trunk/daimonin/src/daieditor/CFArchAttrib.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-12-23 20:49:43 UTC (rev 1230) +++ trunk/daimonin/src/daieditor/CFArchAttrib.java 2006-12-23 20:54:30 UTC (rev 1231) @@ -128,9 +128,9 @@ } // which type of attribute is it? - if ("bool".equalsIgnoreCase(atype)) { + if (atype.equalsIgnoreCase("bool")) { dataType = ArchAttribType.BOOL; // normal bool - } else if ("bool_special".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("bool_special")) { // customized boolean type: dataType = ArchAttribType.BOOL_SPEC; @@ -140,24 +140,24 @@ if (a1 == null || a2 == null) { log.error("In '" + IGUIConstants.TYPEDEF_FILE + "': Type " + typeName + " has bool_special attribute missing 'true' or 'false' value."); return false; - } else { - misc = new String[2]; // 'misc' string contains the values - misc[0] = a1.getValue().trim(); // string for true - misc[1] = a2.getValue().trim(); // string for false } - } else if ("int".equalsIgnoreCase(atype)) { + + misc = new String[2]; // 'misc' string contains the values + misc[0] = a1.getValue().trim(); // string for true + misc[1] = a2.getValue().trim(); // string for false + } else if (atype.equalsIgnoreCase("int")) { dataType = ArchAttribType.INT; - } else if ("long".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("long")) { dataType = ArchAttribType.LONG; - } else if ("float".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("float")) { dataType = ArchAttribType.FLOAT; - } else if ("string".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("string")) { dataType = ArchAttribType.STRING; - } else if ("facename".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("facename")) { dataType = ArchAttribType.FACENAME; - } else if ("animname".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("animname")) { dataType = ArchAttribType.ANIMNAME; - } else if ("text".equalsIgnoreCase(atype)) { + } else if (atype.equalsIgnoreCase("text")) { dataType = ArchAttribType.TEXT; // for text data, the terminating string has to be read too if ((a1 = root.getAttributeNode(XML_KEY_ARCH_BEGIN)) != null) { @@ -222,7 +222,7 @@ log.error(key); } } - } else if (atype.startsWith("doublelist")) { + } else if ("doublelist".startsWith(atype)) { // got a doublelist attribute final String listNames = atype.substring(11).trim(); final int seppos = listNames.indexOf(','); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |