Still a problem with categories

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@356 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-11-18 18:41:25 +00:00
parent f58cefc526
commit a560ff8146
1 changed files with 45 additions and 9 deletions

View File

@ -284,19 +284,55 @@ public class RomDefinitionHandler extends DefaultHandler {
scale.setStorageType(parseStorageType(attr.getValue(ATTR_STORAGE_TYPE))); scale.setStorageType(parseStorageType(attr.getValue(ATTR_STORAGE_TYPE)));
if (attr.getIndex(ATTR_LOG_PARAM) > -1) if (attr.getIndex(ATTR_LOG_PARAM) > -1)
scale.setLogParam(attr.getValue(ATTR_LOG_PARAM)); scale.setLogParam(attr.getValue(ATTR_LOG_PARAM));
} else if (TAG_AXIS.equalsIgnoreCase(qName) || } else if (TAG_X_AXIS.equalsIgnoreCase(qName)) {
TAG_X_AXIS.equalsIgnoreCase(qName) ||
TAG_Y_AXIS.equalsIgnoreCase(qName)) {
axis = new Axis(attr.getValue(ATTR_NAME)); try {
axis = ((Table3D)table).getXaxis();
if (TAG_X_AXIS.equalsIgnoreCase(qName)) { axis.getName();
if (xAddress > 0) axis.setAddress(xAddress); } catch (NullPointerException ex) {
} else { axis = new Axis(attr.getValue(ATTR_NAME));
if (yAddress > 0) axis.setAddress(yAddress);
} }
if (xAddress > 0) axis.setAddress(xAddress);
// Set all other attributes
if (attr.getIndex(ATTR_SIZE) > -1)
axis.setSize(parseInt(attr.getValue(ATTR_SIZE)));
if (attr.getIndex(ATTR_ADDRESS) > -1)
axis.setAddress(hexToInt(attr.getValue(ATTR_ADDRESS)));
} else if (TAG_Y_AXIS.equalsIgnoreCase(qName)) {
try {
axis = ((Table3D)table).getYaxis();
axis.getName();
} catch (NullPointerException ex) {
axis = new Axis(attr.getValue(ATTR_NAME));
}
if (xAddress > 0) axis.setAddress(xAddress);
// Set all other attributes
if (attr.getIndex(ATTR_SIZE) > -1)
axis.setSize(parseInt(attr.getValue(ATTR_SIZE)));
if (attr.getIndex(ATTR_ADDRESS) > -1)
axis.setAddress(hexToInt(attr.getValue(ATTR_ADDRESS)));
} else if (TAG_AXIS.equalsIgnoreCase(qName)) {
try {
axis = ((Table2D)table).getAxis();
axis.getName();
} catch (NullPointerException ex) {
axis = new Axis(attr.getValue(ATTR_NAME));
}
if (yAddress > 0) axis.setAddress(xAddress);
// Set all other attributes // Set all other attributes
if (attr.getIndex(ATTR_SIZE) > -1) if (attr.getIndex(ATTR_SIZE) > -1)
axis.setSize(parseInt(attr.getValue(ATTR_SIZE))); axis.setSize(parseInt(attr.getValue(ATTR_SIZE)));